jcsteh / osara

OSARA: Open Source Accessibility for the REAPER Application
GNU General Public License v2.0
127 stars 46 forks source link

Question: is there anything OSARA can do to make loop segment scrubbing accessible from the keyboard? #426

Closed ScottChesworth closed 3 years ago

ScottChesworth commented 3 years ago

In Preferences -> Playback, there are options related to loop segment scrubbing toward the end of the tab order. However, all of my research indicates that the only way to actually use loop segment scrubbing in practice is to assign a mouse modifier.

Is there anything OSARA can do through the API to make loop segment mode usable with Left and Right arrows? We've had a detailed thread about this posted in the Cockos forum for a fair old while now, but it doesn't seem to be getting any movement, so figured I'd ask here.

If the answer is no, I'll refresh my efforts with Cockos.

pitermach commented 3 years ago

So much this. This is the Number 1 feature I'm missing access to compared to the audio editor I used before, it would definitely improve my workflow.

jcsteh commented 3 years ago

What's loop segment scrubbing supposed to do? Can you give me an example scenario or point me at documentation? I'm not familiar with the concept at all.

ScottChesworth commented 3 years ago

I've extracted 2 minutes from a Reapermania video for ya, because tbh Kenny demos the usefulness of it better than I can explain it. For new editors in particular, this would be way more intuitive to hear than the variant of scrub that the keyboard actions control as things stand. FYI when he goes into Prefs, he's controlling the size of the loop segment using the options toward the end of the tab order in the Playback category. https://www.dropbox.com/s/asdykf3007c3ndk/Loop%20segment%20scrubbing%20demoed%20by%20Kenny.mp3?dl=1

jcsteh commented 3 years ago

I don't see any way this could be done with the API. You can scrub an amount forward or back, but that's going to do traditional scrubbing and there's no way to change that. So, I think you're going to have to pursue this one with Cockos.

I also don't quite follow the difference between looped segment scrubbing and jogging. Traditional scrubbing slows down the audio or speeds it up depending on how fast you're moving. But if looped segment scrubbing doesn't do that, how is it any different to looped segment jogging? Only that it plays backwards when you move backwards?

Anyway, I'm closing this because I don't see any way OSARA could support this without changes in REAPER, and if Cockos were going to add an API, it'd probably be just as easy to add builtin actions. Still happy for discussion to continue here though.

ScottChesworth commented 3 years ago

Dunno, we probably need someone who's actually used the feature in other editors to chime in. @pitermach? I'll add this to my list of things to raise with Cockos, but it might not get done for a wee while because there are a few bugs and UX edges I'd like to see shored up first. CC navigation, a tweak to how the newer actions for placing envelope points behave so we can actually map those, context menu in Media Explorer, friendlier fade descriptions etc.

pitermach commented 3 years ago

As far as I understand after doing some reading IE this thread, the only difference is that scrubbing moves the cursor extremely slowly, while jogging goes much faster. For sighted people the difference is probably more obvious where I guess when they jog with the mouse it causes the play cursor to scroll much faster

ScottChesworth commented 3 years ago

Dialog is flowing fast with Cockos today so I got into this with Justin sooner than expected. Here's his proposal in response to me asking whether loop segment can be made available as a choice in Preferences -> Playback -> When moving edit cursor via action or control surface: "that mode is sort of different since it is continuous while the mouse is down, let me think about that. Maybe could make an action to "play looped segment scrub mode at cursor for 1 second" or something, would that work?" Over to you @pitermach. Would that work? Do you have another idea you want me to float?

dgl1984 commented 3 years ago

Make the length of the loop based on the zoom ratio.----- Original Message -----From: ScottChesworth To: jcsteh/osara Date: Saturday, December 19, 2020 04:05 PMSubject: Re: [jcsteh/osara] Question: is there anything OSARA can do to make loop segment scrubbing accessible from the keyboard? (#426)Dialog is flowing fast with Cockos today so I got into this with Justin sooner than expected. Here's his proposal in response to me asking whether loop segment can be made available as a choice in Preferences -> Playback -> When moving edit cursor via action or control surface:"that mode is sort of different since it is continuous while the mouse is down, let me think about that. Maybe could make an action to "play looped segment scrub mode at cursor for 1 second" or something, would that work?"Over to you @pitermach. Would that work? Do you have another idea you want me to float?—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

pitermach commented 3 years ago

The alternative suggestion I gave on the forum was having actions which would play the segment as long as a modifier was held down, (IE If you had CTRL+Alt+Right assigned to move pixel right and scrub with loop segment, it would continue as long as CTRL+Alt was held down), but that sounds like it would be harder to implement and I can't imagine ever needing to hear a segment for more than a second anyway. An alternative idea I brought up in that thread was having an action which would act as a toggle whether commands that move or select by pixel scrub normally or with loop segment mode.

Justin's idea would work great, perhaps combined with my second suggestion of having it be a toggle for the current move/select by pixel actions, this way you wouldn't need to mess with custom actions to make it work.

ScottChesworth commented 3 years ago

Make the length of the loop based on the zoom ratio.

The length of the loop is set via options that are already accessible in Prefs -> Playback. This question is how long the loop plays for when moving via actions. I could easily get behind adding a preference for that, but I don't think it's logical to link length of time the loop plays for to the zoom ratio.

ScottChesworth commented 3 years ago

The alternative suggestion I gave on the forum was having actions which would play the segment as long as a modifier was held down, (IE If you had CTRL+Alt+Right assigned to move pixel right and scrub with loop segment, it would continue as long as CTRL+Alt was held down), but that sounds like it would be harder to implement and I can't imagine ever needing to hear a segment for more than a second anyway.

That'd alter the existing behaviour. I don't really have enough sway with Cockos to push for that, sorry man.

An alternative idea I brought up in that thread was having an action which would act as a toggle whether commands that move or select by pixel scrub normally or with loop segment mode.

Yeah ok, I'm liking the idea of a toggle. OSARA could provide feedback for that so long as there's an accompanying API.

Right, I'm gonna try my luck with a toggle action and a preference to configure the length of time the loop plays back for when moving via actions. Let's see how we go.

jcsteh commented 3 years ago

Another thought is to have an action which toggles the looped segment playback. That way, you don't have to configure the length. We could potentially then even implement the modifier idea in OSARA given the right actions and APIs.

jcsteh commented 3 years ago

And if Cockos really don't want to mess with the existing behaviour, they could just add new actions for turning on and off looped segment and also scrubbing forward and backward in looped segment (3 new actions in total). That would require no default playback length, no configurable playback length and be the most flexible and easiest to implement on their side (I think).

ScottChesworth commented 3 years ago

Another thought is to have an action which toggles the looped segment playback. That way, you don't have to configure the length. We could potentially then even implement the modifier idea in OSARA given the right actions and APIs.

Possibly a daft question, but is that different from @pitermach's idea of a toggle above? If so, can you clarify a bit so I can take it to the chat with Cockos?

jcsteh commented 3 years ago

I believe the toggle originally proposed was to switch the scrub actions between normal and looped segment scrubbing. When looped segment scrubbing, however, the segment would only loop for a specific length; e.g. 1 second. The toggle I'm proposing is slightly different. Turning it on would start looping the segment forever. Scrubbing would move and continue looping. Toggling it off would stop looping. So, it's a bit more like the mouse in that you can start and stop the looped segment playback yourself, rather than it having a specific length.

jcsteh commented 3 years ago

Another idea: add new actions to scrub backward and forward in looped segment mode. While any modifier remains held down, continue looping. This way, there's no change in behaviour, yet we also get the modifier behaviour. Of course, this would only work if the action was bound to a modified key.

ScottChesworth commented 3 years ago

Nice! I sent your first toggle into Justin and he already preferred it to what I'd proposed, but will forward this one along too, seems like it might be a neater implementation.

pitermach commented 3 years ago

I've been keeping a look out for new development builds after this conversation and as always Cockos don't disappoint. The new build that dropped today, in addition to doing a bunch of other really cool things in the media explorer that I never would have thought of which will come in extremely useful, has added 3 new actions for starting loop scrubbing. Specifically we have one that acts as a toggle and the other 2 which force it to on or off. So, when you run the action to start scrubbing playback will continue until you either turn it off, or do something else with playback like playing your project. As far as I'm concerned this is already pretty amazing and it'll definitely make my life much easier and I'd be OK with just finding a hotkey to put on the toggle scrubbing action in the keymap. But if you still want to explore the possibility of this working while you hold down a modifier on the Osara side, this should be possible now. From the user side I don't see a way to add a hotkey that changes the state of a toggle based on whether the key is held down or not, which would probably make for an interesting suggestion in itself.

ScottChesworth commented 3 years ago

Alriiiight. Time to talk mappings then. Does anyone here have thoughts? I'll float it in the key map group now too.

pitermach commented 3 years ago

The one I tried it with originally was Alt+Win+L, which wasn't very comfortable to do. I gave it more thought today when I was more awake to find something closer to the arrow keys, my first thought was something with slash like CTRL or Shift+Slash, but then I realised that CTRL+Enter isn't taken. Assuming you're on a keyboard that has a right control you can easily press it without moving your hand too much and it won't change depending on what language you're using like slash might.

GarthHum commented 3 years ago

I suggest un-modified backslash

On 23 Dec 2020, at 11:26 pm, ScottChesworth notifications@github.com wrote:

Alriiiight. Time to talk mappings then. Does anyone here have thoughts? I'll float it in the key map group now too.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jcsteh/osara/issues/426#issuecomment-750300068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHSPFC5PDEJ7SJSJXC7JIMLSWHVZHANCNFSM4VBHAZVQ.

dgl1984 commented 3 years ago

I must confess to having a blind moment. I'm using reaper 6.19 and the OSARA that was released on... Saturday, I believe. I'm unable to find these actions. What are there names, so that I can do a proper search?----- Original Message -----From: Garth Humphreys To: jcsteh/osara Date: Wednesday, December 23, 2020 04:49 PMSubject: Re: [jcsteh/osara] Question: is there anything OSARA can do to make loop segment scrubbing accessible from the keyboard? (#426)I suggest un-modified backslash > On 23 Dec 2020, at 11:26 pm, ScottChesworth wrote:> > > Alriiiight. Time to talk mappings then. Does anyone here have thoughts? I'll float it in the key map group now too.> > —> You are receiving this because you are subscribed to this thread.> Reply to this email directly, view it on GitHub , or unsubscribe .> —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.

jcsteh commented 3 years ago

Regarding mappings, if I could get OSARA behaviour to turn off the toggle when modifiers are released, I'd suggest alt+control+left/rightArrow. When you first press one of those keys, it starts looping. Releasing control+alt would stop looping. That said, it's possible I won't get to this and I don't want to block progress in the meantime. Also, one disadvantage of that approach is that it uses two keys instead of one. Finally, there's a question of whether the implementation effort justifies the gain. That is, if people are happy with (or even prefer) the manual toggle, perhaps we should just keep it simple.

pitermach commented 3 years ago

@dgl1984 For now, these actions are in the development builds for reaper, which you can download from here. If you search for "scrub" in the actions dialog of the dev build you should be able to find them straight away.

I must confess to having a blind moment. I'm using reaper 6.19 and the OSARA that was released on... Saturday, I believe. I'm unable to find these actions. What are there names, so that I can do a proper search?----- Original Message -----From: Garth Humphreys To: jcsteh/osara Date: Wednesday, December 23, 2020 04:49 PMSubject: Re: [jcsteh/osara] Question: is there anything OSARA can do to make loop segment scrubbing accessible from the keyboard? (#426)I suggest un-modified backslash > On 23 Dec 2020, at 11:26 pm, ScottChesworth wrote:> > > Alriiiight. Time to talk mappings then. Does anyone here have thoughts? I'll float it in the key map group now too.> > —> You are receiving this because you are subscribed to this thread.> Reply to this email directly, view it on GitHub , or unsubscribe .> —You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.

GarthHum commented 3 years ago

Another negative of making looping stop with the release of modifiers, is that I think it might break the workflow of being able to start looping and then nudging items around under the edit cursor whilst it’s looping.

On 24 Dec 2020, at 8:45 am, James Teh notifications@github.com wrote:

Regarding mappings, if I could get OSARA behaviour to turn off the toggle when modifiers are released, I'd suggest alt+control+left/rightArrow. When you first press one of those keys, it starts looping. Releasing control+alt would stop looping. That said, it's possible I won't get to this and I don't want to block progress in the meantime. Also, one disadvantage of that approach is that it uses two keys instead of one. Finally, there's a question of whether the implementation effort justifies the gain. That is, if people are happy with (or even prefer) the manual toggle, perhaps we should just keep it simple.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jcsteh/osara/issues/426#issuecomment-750508405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHSPFC7ZJDTU5FSHMUEDAYDSWJXHPANCNFSM4VBHAZVQ.

jcsteh commented 3 years ago

I don't think sighted folk can nudge while loop scrubbing either, since they have to hold control+alt while dragging the mouse. Still, given there isn't a clear win here, I think it's simpler to just leave it as an explicit toggle.

pitermach commented 3 years ago

I never thought of using this while nudging. I don't think sighted people can do this, but I just tried it with this new hotkey and it does give you a live preview while you nudge which is kinda amazing.

In regards to the discussion of which aproach is better, Studio recorder from APH actually has both. It's version of scrubbing is activated by holding down CTRL and then pressing either right or left to move the cursor by a pixel, it'll then start playing a predefined amount of time which you can set in settings until you release the key, so basically what Jamie and I was initially suggesting. But it also has a second feature, called loop pixels, which behaves more like Reaper does now where it will continue looping whatever audio is under the cursor until you do something else, much how Reaper behaves now except the amount of audio looped varies on how zoomed in you are.

So both approaches have their advantages and disadvantages. Tying it to holding down a modifier lets you only hear the audio exactly for however long you want only while you move the cursor, while having the audio continue looping means you can perform more commands and your other hand isn't tied up holding down a key.