Old 01-23-2019, 02:55 PM   #1
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Location: Los Angeles, CA
Posts: 3,126
Default Auto Create Send Track and Arm Send Vol Envelope

Hi! I have everything running up until the Arm Send Volume...any help would be amazing!

Code:
function Msg(param)
reaper.ShowConsoleMsg(tostring(param).."\n")
end

function Main()

--Get selected track
  tr = reaper.GetSelectedTrack(0,0)
  tr_index = reaper.GetMediaTrackInfo_Value(tr,"IP_TRACKNUMBER")
  _,tr_name = reaper.GetTrackName(tr,0)
 
--Create receive, send to it, rename it nicely
  reaper.InsertTrackAtIndex(tr_index,1)
  tr2 = reaper.GetTrack(0,1)
  tr2_index = reaper.GetMediaTrackInfo_Value(tr2,"IP_TRACKNUMBER")
  reaper.CreateTrackSend(tr,tr2)
  reaper.GetSetMediaTrackInfo_String(tr2, "P_NAME", tr_name.." - Send", 1)
    
end

reaper.ShowConsoleMsg("")
Main()
reaper.UpdateArrange()
Just need to figure out how to automatically arm the Volume Send envelope on the original track!
ferropop is online now   Reply With Quote
Old 01-24-2019, 04:18 PM   #2
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Location: Los Angeles, CA
Posts: 3,126
Default

Any thoughts? I'm able to access the envelope if it's active, but can't figure out how to actually ARM the Send Volume envelope using LUA.
ferropop is online now   Reply With Quote
Old 01-24-2019, 06:49 PM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,109
Default

I'd suggest BR_EnvSetProperties() but there's a bug currently unfortunately.

So it seems (if I don't miss anything) your only option is doing chunk manipulation.
https://github.com/ReaTeam/Doc/blob/...finitions#L382

If you want to go that route, note that send envelopes are stored in the receiving track's chunk (<AUXVOLENV).

Last edited by nofish; 01-24-2019 at 07:02 PM.
nofish is offline   Reply With Quote
Old 01-24-2019, 10:02 PM   #4
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Location: Los Angeles, CA
Posts: 3,126
Default

Quote:
Originally Posted by nofish View Post
I'd suggest BR_EnvSetProperties() but there's a bug currently unfortunately.

So it seems (if I don't miss anything) your only option is doing chunk manipulation.
https://github.com/ReaTeam/Doc/blob/...finitions#L382

If you want to go that route, note that send envelopes are stored in the receiving track's chunk (<AUXVOLENV).
Wow man you just blew my mind, there's so much here to learn but I didn't even know you get this deep with scripting. Thanks!
ferropop is online now   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 02:49 PM.


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