|
|
|
02-02-2020, 04:38 PM
|
#1
|
Human being with feelings
Join Date: Apr 2014
Posts: 4,175
|
Request for API functions to release an envelopes latch
The problem:
Due to the lack of proper touch state (when automation mode is Touch) for FX and track parameters that aren't volume/pan (eg send volume/pan) - I'm trying to develop my own touch mode in a script.
I have tried many solutions - and pretty much got the FX parameters one working great by simply unarming the envelope when I detect that the controllers touch sensitive fader is not touched, and rearming it when the controller fader is touched again. This works pretty well.
But... this does not work for most track parameters - as volume/pan/send volume etc all revert to the trim value when you bypass the envelope while in latch/touch/write automation modes. There appears to be no way to change this.
The problem with this is that the controller's faders will jump to the trim value when I need it to continue to feedback the envelope value. I'm using the UI API's such as GetTrackUIVolPan - to get the envelope current values during playback - but these APIs return the trim value when an envelope is bypassed.
There is also the Clear Track Envelope Latches action - but this clears all of them so is not suitable when I may be automating two track envelopes from the same track at any time. If I trigger the action when I 'untouch' one fader - it releases the latch for the other fader I'm still touching - causing a blip in the envelope until that fader moves again. If I don't call the action until I untouch all faders - the ones untouched first continue to write the last captured value until the action is called - so not performing as touch mode should.
I've tried plenty of other workarounds with the available functions (some pretty exotic) - but nothing works well enough.
The solution:
There are several things that could solve this - that I don't think are currently available. One is to allow the GetTrackUIVolPan style API's to continue to output the envelope value even when the envelope is unarmed. But this is changing existing functionality - so probably not the best solution.
The ideal solution would be to provide an API where I can simply pass in the envelope pointer - and it will release the latch for that envelope (if one is set). This won't alter any existing functionality - and I presume would be pretty trivial as there are already actions to do this - albeit for all track parameters at once.
Being able to do this means I can leave the envelope armed throughout the automation capture - which means I can ensure the controller's faders will follow the actual envelope when the controller's fader is 'untouched'.
So my request would be for new API functions - something like:
ReleaseTrackEnvelopeLatch(TrackEnvelope env)
(and even - for completeness)
ReleaseFXEnvelopeLatch(TrackEnvelope env)
(EDIT: mespotine has a better suggestion here: https://forum.cockos.com/showpost.ph...8&postcount=18 )
Using these - I can recreate touch mode for all types of parameters - not just the subset available currently (which appears to be just track volume and pan). Touch mode doesn't work for FX parameters or other track parameters such as sends as far as I can tell.
Of course - if there is already a way to release the latch for a specific envelope - I'd be ecstatic to learn how
Many thanks,
Leon.
Last edited by lb0; 02-28-2020 at 05:26 PM.
|
|
|
02-03-2020, 07:14 PM
|
#2
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
Yes, please, this would enable us to make every external controller touch-aware and make it work with any paramter.
|
|
|
02-05-2020, 05:03 PM
|
#3
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
@devs: or is the info stored somewhere in the state chunk?
|
|
|
02-06-2020, 03:23 PM
|
#4
|
Human being with feelings
Join Date: Apr 2014
Posts: 4,175
|
Quote:
Originally Posted by _Stevie_
@devs: or is the info stored somewhere in the state chunk?
|
A good question - but not according to:
https://github.com/ReaTeam/Doc/blob/...%20Definitions
I'm not sure altering the chunk would be suitable in an automation capturing context (too slow).
And I don't think that data would likely be stored in there anyway - the chunks are for more persistent data that you want saved in the rpp file - for recall when you reload the project. I don't think saving touch state in the rpp file would be of any use.
|
|
|
02-06-2020, 03:34 PM
|
#5
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
|
I also took a quick look out of curiousity (using the ChunkEditor script which I find quite handy for such things) but yeah, latch state doesn't seem to be stored there (and actually I also wouldn't have expected it would, for the reasons lbo states).
|
|
|
02-06-2020, 04:18 PM
|
#6
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
Yeah, good point! So an API function would be the best solution.
|
|
|
02-07-2020, 02:11 AM
|
#7
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Could someone make a LiceCap of how to release a latch with Reaper?
Maybe I can find something, but I never used latch in envelopes before.
|
|
|
02-07-2020, 03:35 AM
|
#8
|
Human being with feelings
Join Date: Apr 2014
Posts: 4,175
|
Quote:
Originally Posted by mespotine
Could someone make a LiceCap of how to release a latch with Reaper?
Maybe I can find something, but I never used latch in envelopes before.
|
Thanks,
Here's an example of releasing the latch while capturing automation. This uses the action to release all latches for a single track's envelopes. I need to be able to release a single envelope's latch - while leaving any others intact.
|
|
|
02-08-2020, 09:39 AM
|
#9
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
I'll have a look.
|
|
|
02-08-2020, 09:41 AM
|
#10
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
Awesome, very much appreciated!
|
|
|
02-20-2020, 12:18 PM
|
#11
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
@lbo
With latch, do you refer to the automation mode "Latch"?
|
|
|
02-20-2020, 03:00 PM
|
#12
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
Answering for Leon on this, since I'm not sure if he has subscribed to the thread: yes, it's about latch automation.
|
|
|
02-20-2020, 03:11 PM
|
#13
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Ok, then I probably have bad news for you:
There seems to be only one automationmode for all envelopes in each track, signaled by AUTOMODE-entry in a TrackStateChunk.
That means, when changing latch to something else, it is always for all envelopes in a track, as far as I could find out.
Correct me, if I'm wrong, so I can dig deeper....
|
|
|
02-21-2020, 10:20 AM
|
#14
|
Human being with feelings
Join Date: Apr 2014
Posts: 4,175
|
Quote:
Originally Posted by mespotine
Ok, then I probably have bad news for you:
There seems to be only one automationmode for all envelopes in each track, signaled by AUTOMODE-entry in a TrackStateChunk.
That means, when changing latch to something else, it is always for all envelopes in a track, as far as I could find out.
Correct me, if I'm wrong, so I can dig deeper....
|
Hi Mespotine,
No - that's not what I mean for this.
Each parameter has a latch state (has it been touched or not) - this is what I mean when I want to be able to release a parameters latch - to stop it being touched.
The automation mode will be latch for all parameters - this is what I want. But in latch automation mode - every parameter has a latch on/off state - which is currently handled entirely by Reaper - but I would like to be able to manipulate it via an API.
Currently - it's only possible to release all latches at once via an action - but it must be possible to enable/release a latch per parameter - as this is something Reaper itself does in latch mode.
|
|
|
02-22-2020, 10:54 AM
|
#15
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Ok, I think I got it.
Yes you're right, that this is handled internally. It isn't even represented in projectfiles when I store one with latch and one with release latch.
Still, I hope this can be managed somehow, so I digged deeper into it.
The first thing I managed is to find a way to get, whether latch isn't released currently on a certain Envelope, so this could be helpful to get at least, whether latch is currently activated.
I hope, I can find a way of activating(this can be done by using actions who move the slider) and releasing(dunno how to do it properly yet) it as well.
PS: I think, this could be handled very nice in the API. Would be nice to have the full control over it, without having to release all latches and without having to add dummy-envelopepoints to activate latch.
|
|
|
02-22-2020, 11:39 AM
|
#16
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
May I add that we are SUPER grateful that you are taking the time to dive into this. THANK YOU!!!
And yes, an API feature would be a great way to deal with this.
|
|
|
02-23-2020, 12:44 PM
|
#17
|
Human being with feelings
Join Date: Apr 2014
Posts: 4,175
|
Quote:
Originally Posted by mespotine
Ok, I think I got it.
...
PS: I think, this could be handled very nice in the API. Would be nice to have the full control over it, without having to release all latches and without having to add dummy-envelopepoints to activate latch.
|
Thank you for taking time and looking into this - much further than I've gone.
Yes - I'm hopeful that an API might be considered - the dummy envelope idea is interesting - but probably too messy for my preference. Doing it this way might leave a tiny door open between releasing all latches and re-latching those that should still be latched - for an existing bit of automation being left in the envelope when it should have been overwritten. Not really something I would like to risk.
So it's fingers crossed for now. It would be really nice to be able to implement Touch style automation capturing for those parameters where it is not currently implemented (using Latch mode).
|
|
|
02-28-2020, 07:28 AM
|
#18
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
I have thought about that for a few days and I think, I have a better idea for an API-function that solves your problem AND gives you even more.
You probably need only one function:
Code:
boolean retval = reaper.GetSetEnvelopeActivatedLatch(TrackEnvelope env, boolean is_set, boolean is_activated)
Retval:
boolean retval - true, if latch is currently activated for TrackEnvelope; false, if not
Parameters:
TrackEnvelope env - the Track/FXEnvelope whose Latch you want to get/set
boolean is_set - true, set it; false, get the current state
boolean is_activated - if is_set=true: true, activate latch; false, deactivate latch on envelope
This gives you a way to activate/deactivate the current state of activation of latch on an envelope.
It also gives you the opportunity to get, whether latch is currently activated or not, which could be helpful with some automation-usecases you want to create.
With activated, I mean in reference of your gif, when the latch-state is red. With deactivated, when the latch-state is yellow.
|
|
|
02-28-2020, 05:22 PM
|
#19
|
Human being with feelings
Join Date: Apr 2014
Posts: 4,175
|
Quote:
Originally Posted by mespotine
I have thought about that for a few days and I think, I have a better idea for an API-function that solves your problem AND gives you even more.
You probably need only one function:
Code:
boolean retval = reaper.GetSetEnvelopeActivatedLatch(TrackEnvelope env, boolean is_set, boolean is_activated)
Retval:
boolean retval - true, if latch is currently activated for TrackEnvelope; false, if not
Parameters:
TrackEnvelope env - the Track/FXEnvelope whose Latch you want to get/set
boolean is_set - true, set it; false, get the current state
boolean is_activated - if is_set=true: true, activate latch; false, deactivate latch on envelope
This gives you a way to activate/deactivate the current state of activation of latch on an envelope.
It also gives you the opportunity to get, whether latch is currently activated or not, which could be helpful with some automation-usecases you want to create.
With activated, I mean in reference of your gif, when the latch-state is red. With deactivated, when the latch-state is yellow.
|
Yep - I agree wholeheartedly with this This would work for my purpose and be more versatile to boot!
Thanks for taking the time to think about it.
Now fingers crossed the devs might be interested sometime...
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:16 AM.
|