Old 06-01-2019, 08:34 AM   #1
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,917
Default REQ: Clear ALL Envelopes

Hey scripters,
Is there already a script which will clear all envelopes for a selected track?
This would be the native action Envelope: Clear Envelope, but does every envelope for a selected track.

The SWS action SWS/S&M: Remove all envelopes for selected tracks doesn't work as it simply deletes the envelope without resetting the track value. (For example, if I have envelope at -1dB and track at -1dB, the result of deleting the envelope should be that track volume = -2dB, but that doesn't happen with that action.)
(Also, I believe that S&M action might have been the cause of a bug I reported about a year ago which, as I showed and hid the volume envelope, would cause the volume value to get smaller and smaller, as if the offset/offset flag was being ignored.)


Cheers!
Dax.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 06-01-2019, 08:40 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,874
Default

Wasn't that something for Script: X-Raym_Clean inactive and hidden envelopes.lua I made for you ?
Pretty sure you can do what you want with that a a custom action. (but I may be wrong)
X-Raym is offline   Reply With Quote
Old 06-03-2019, 06:00 AM   #3
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,917
Default

Maybe it is? Does it work the same as Clear Envelope?
Perhaps renaming Clean to Clear would be useful, too.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 06-03-2019, 06:27 AM   #4
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,045
Default

Dax wants it for visible envelopes, not hidden or inactive, if I'm reading correctly.

It's sounds to me more like X-Raym_Delete envelope points.lua, but applied to all envelopes in all selected tracks (regardless of whichever envelope is selected for editing). So, a non-smart version of it that doesn't take currently selected envelope into account, just removes all of them.
EvilDragon is online now   Reply With Quote
Old 06-03-2019, 06:53 AM   #5
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,228
Default

Funny,
asked for exactly the same on the Facebook Reaper group the other day.

Closest I found was:
Script: X-Raym_Reset envelope with value at edit cursor.lua
and a macro with delete env.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is offline   Reply With Quote
Old 06-03-2019, 07:24 AM   #6
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,317
Default

Modifying one to only do visible envelopes shouldn't be hard, with using EnvStateChunks to get visibility state:

https://github.com/Ultraschall/ultra...k-Doku.txt#L36
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is online now   Reply With Quote
Old 06-05-2019, 04:47 AM   #7
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,917
Default

Hey everyone, thanks for your contributions. I'll explain the ultimate goal of why I want this.

I've been searching for the holy grail of session template/transfer. Because I have a lot of automation in my mixes, this rules out simply saving track templates and the otherwise excellent SWS Snapshots.

The current thinking is this: Find a moment of the mix that best represents the average, put the play cursor there, then reset all automation to static parameter values.
(There are a couple other steps, like starting with unfreezing all tracks and ending with saving tracks to a track template.)


Raymond and I worked on this some years ago but it ended up being being a custom action because Raymond wanted to keep the scripts 'modular'. Something in REAPER must have changed because at some point it stopped working.

I started rebuilding this custom action and met up with the Clear Envelope problem. The native action only works 1) on the selected envelopes and 2) prompts for user confirmation, neither of which are suitable for 50+ envelopes across 100+ tracks.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 06-05-2019, 04:54 AM   #8
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,917
Default

Just to be clear, the ideal action should reset all envelopes for the selected track, regardless of whether they're visible, hidden, armed, etc.

It also must result in no net change. For example, we have a script/action now which will delete the envelope, but does not account for the envelope value vs the track parameter value.
I gave an example of this in my original post.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 07-06-2019, 11:02 AM   #9
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,917
Default

Hey everyone!
I believe I have found the solution. The last piece of the puzzle was extremely simple: Just needed to hide all envelopes. By default, this native action will correctly reset volume envelopes by combining them with track volume values.

@Raymond, yes, you were right. I added X-Raym_Clean inactive and hidden envelopes.lua to the custom action along with Hide all envelopes and we have lift-off!!
Thanks again for these scripts!!


All the best,
Dax.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 07-06-2019, 02:39 PM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,874
Default

Glad you figured a solution :P


Best,
X-Raym is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.