|
|
|
06-16-2021, 01:31 PM
|
#1
|
Human being with feelings
Join Date: Aug 2010
Posts: 396
|
How to delete a track envelope?
Can anyone help me out with this? I'm looking for a way to delete all envelopes from a track by script. I see there is an SWS action 'Envelope: Clear or remove envelope' however..., running that pops up a message box asking if you want to delete the envelope...., which seems very odd to me. Because, well..., that's the reason for running the action.
My end goal is simply to duplicate the selected track where the duplicated track has all the envelopes from the original track removed/cleared/deleted. There are other things I want to do with the duplicated track that I can figure out..., but getting rid of the envelopes is a mystery to me. I'm also not seeing anything in the API for something like 'remove selected envelope' or anything along those lines.
Maybe this has to do with 'chunks'?
|
|
|
06-16-2021, 01:42 PM
|
#2
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
I use "SWS/S&M: Remove all envelopes for selected tracks" and was told to stop it from showing the confirmation dialog I had to edit my S&M.ini...
Code:
[Misc]
RemoveAllEnvsSelTracksPrompt=0
|
|
|
06-16-2021, 02:10 PM
|
#3
|
Human being with feelings
Join Date: Aug 2010
Posts: 396
|
Quote:
Originally Posted by Edgemeal
I use "SWS/S&M: Remove all envelopes for selected tracks" and was told to stop it from showing the confirmation dialog I had to edit my S&M.ini...
Code:
[Misc]
RemoveAllEnvsSelTracksPrompt=0
|
Thank you!!
|
|
|
06-16-2021, 02:32 PM
|
#4
|
Human being with feelings
Join Date: Aug 2010
Posts: 396
|
Hmmm. Actually..., this still isn't quite what I was hoping for. You can see in the licecap, that when I duplicate the track with the script, and then check the duplicated tracks send envelope, the send envelope is automatically set at 0/unity. It should be at -infinity (I would think). I know somewhere, in some preference I have it set so Reaper will have sends default to -infinity.
I'm wondering if a better way to achieve what I want (a duplicated track, with the same routing, same name, same color, same FX, same sends, but NO automation or envelopes and no items is to simply 'create a new track', and copy the name, color, routing, etc. from the selected track.
|
|
|
06-16-2021, 02:41 PM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
It's still possible, by working with statechunks. You can eliminate the envelopes from there, keeping the rest.
|
|
|
06-16-2021, 02:56 PM
|
#6
|
Human being with feelings
Join Date: Aug 2010
Posts: 396
|
Quote:
Originally Posted by Meo-Ada Mespotine
It's still possible, by working with statechunks. You can eliminate the envelopes from there, keeping the rest.
|
Thanks, that's sort of what I was afraid of. 'Chunks'...., I need to do a ton of homework on. I have no idea what they are..., except that (I think) they are basically long strings that contain various bits of info/data. Which if that's the case, I still need to better understand how to parse strings in LUA using 'patterns', which I've done a bit of..., but not much.
|
|
|
06-16-2021, 03:38 PM
|
#7
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
Quote:
Originally Posted by benmrx
You can see in the licecap, that when I duplicate the track with the script, and then check the duplicated tracks send envelope, the send envelope is automatically set at 0/unity. It should be at -infinity (I would think). I know somewhere, in some preference I have it set so Reaper will have sends default to -infinity.
|
I think the 'issue' here is that the send is already existing (as you duplicated a track with a send) and so the envelope is created at the level that send currently is.
I currently can't think of a straightforward way to 'fix' it though (so that it'd work as you intend).
|
|
|
06-16-2021, 03:54 PM
|
#8
|
Human being with feelings
Join Date: Aug 2010
Posts: 396
|
Quote:
Originally Posted by nofish
I think the 'issue' here is that the send is already existing (as you duplicated a track with a send) and so the envelope is created at the level that send currently is.
I currently can't think of a straightforward way to 'fix' it though (so that it'd work as you intend).
|
I see what you're saying. And I'm probably misunderstanding what it means to 'remove all envelopes for selected tracks'. And/or I misunderstand this project preference.
Thank you, everyone! Always learning something new.
Last edited by benmrx; 06-16-2021 at 04:51 PM.
|
|
|
06-16-2021, 05:02 PM
|
#9
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
Yes, what you marked in red applies to new sends, I use the same setting.
When you remove the send envelope you don't remove the send itself though and hence the send envelope for the send on the duplicated track comes up at the value the send is at. Hard to describe for me in words, maybe more clear when also looking at the mixer? (doing essentially what your script does)
What you could probably do is iterate over the sends on the duplicated tracks and set them to -inf, something like this:
Code:
-- set sends on selected tracks to -inf
for i = 0, reaper.CountSelectedTracks(0)-1 do
local tr = reaper.GetSelectedTrack(0, i)
local numSends = reaper.GetTrackNumSends(tr, 0)
for j = 0, numSends-1 do
reaper.SetTrackSendInfo_Value(tr, 0, j, "D_VOL", 0)
end -- loop through sends
end -- loop through selected tracks
Last edited by nofish; 06-16-2021 at 05:17 PM.
|
|
|
06-17-2021, 11:53 AM
|
#10
|
Human being with feelings
Join Date: Aug 2010
Posts: 396
|
Quote:
Originally Posted by nofish
What you could probably do is iterate over the sends on the duplicated tracks and set them to -inf, something like this:
Code:
-- set sends on selected tracks to -inf
for i = 0, reaper.CountSelectedTracks(0)-1 do
local tr = reaper.GetSelectedTrack(0, i)
local numSends = reaper.GetTrackNumSends(tr, 0)
for j = 0, numSends-1 do
reaper.SetTrackSendInfo_Value(tr, 0, j, "D_VOL", 0)
end -- loop through sends
end -- loop through selected tracks
|
Thanks!!
I missed that function in the API as I was only searching for 'envelope'.
|
|
|
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 11:26 PM.
|