jcsteh / osara

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

Can working with envelopes become more context sensitive? #850

Closed ScottChesworth closed 1 year ago

ScottChesworth commented 1 year ago

During my (so far) flawed attempt to implement the reporting requested in #849, an idea occurred. As things stand, we have functions to report working with track envelopes, and best I can tell, to complete the request we'd need a bunch of new code to start reporting working with take envelopes. Instead, I'm wondering whether working with envelopes could be made more context sensitive? Here's how the UX would look from user perspective, taking our current key mappings as examples.

  1. As things stand, the user selects a track, then hits Control+Alt+V to toggle track volume envelope visibility, Control+Alt+P to toggle track pan envelope, they can add Shift to those commands for pre-FX envelopes, or hit Control+Alt+F5 to toggle track mute envelope.
  2. My request is that if a take is selected instead, those same keystrokes would call and report take-based equivalents of those actions where available. We have:
    • Take: Toggle take volume envelope (ID 40693)
    • Take: Toggle take pan envelope (ID 40694)
    • Take: Toggle take mute envelope (ID 40695)
    • Note that pre-FX equivalents don't exist, but perhaps if a take is selected, Control+Alt+Shift+P could do Take: Toggle take pitch envelope (ID 41612) instead.
  3. Ideally our reporting would be adjusted to include the word track or take for clarity, "showed track volume envelope", "hid take pan envelope" etc.
  4. If implemented, this context sensitivity would already play nice with our key map concept of track-based actions mainly involving Alt, item/take-based actions mainly involving Control. There are only a handful of free training resources that would need to be updated to reflect the change, I have access to the majority of those and know how to reach the handful of other people that would need to update theirs.
  5. A while back I got a new context sensitive action from Cockos: "Envelopes: View envelopes for last touched track/item (ID 40019)". This could replace the track specific variant that's currently on Shift+L whenever we're ready to change the minimum REAPER requirement to 6.72 or newer. I'm hoping they can also provide us with a context sensitive variant of "FX: Show/hide track envelope for last touched FX parameter" if this is implemented, that would go on Control+Alt+L, so basically all of the widely used envelope stuff would be context sensitive.

I'm definitely not far enough along to write this, but I'd love it to happen, it would make working with envelopes more intuitive and squeeze more functionality onto the key map without requiring users to remember additional keystrokes. Penny for your thoughts?

jcsteh commented 1 year ago

This makes sense. As to how it would be implemented:

  1. We'd need to have an equivalent of cmdToggleTrackEnvelope for takes, which would in turn require an equivalent of getVisibleTrackEnvelopes. Ideally, we'd reuse most of the code, probably via templates.
  2. We'd implement support for the various toggle take envelope actions via the new cmdToggleTakeEnvelope function.
  3. We'd create context sensitive actions for each envelope type; e.g. OSARA: Toggle track/take volume envelope visible (depending on focus). These actions would redirect to the various builtin REAPER actions depending on fakeFocus.

So, not super hard, but somewhat tedious.

jcsteh commented 1 year ago

The hardest part is step 1 and a little bit of step 3. The rest is all basically just tedious copy pasting with adjustments for action ids. I can probably take a stab at the harder parts if you're up for taking a stab at the easier but more tedious parts after I'm done. :)

ScottChesworth commented 1 year ago

The name's Chesworth, Scott "easy but tedious" Chesworth...

No wait, the namespace is...

Gimme something to work on (so I won't have time to do these jokes)... :)

ElCrackLoko commented 1 year ago

hi guys. In Osara's help, added the new lines for pan, mute and volume in post-FX, as well as pan and mute for Pre, but one more was missing, for volume, Control Shift Alt v. Keep showing up only on the track, greetings.

ScottChesworth commented 1 year ago

That's not a mistake. Control+Alt+Shift+V is only showing/hiding a track envelope, because there isn't an equivalent take pre-FX envelope.