Old 06-07-2019, 05:51 AM   #1
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,306
Default Set Master Volume Envelope Bypassed ?

I'm still trying to find an action to set my Master volume envelope to bypassed please. If anyone knows how to do it I'd really appreciate it. Not a toggle, simply bypass it. Thanks in advance for any help.

Coachz is online now   Reply With Quote
Old 06-07-2019, 07:21 AM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,057
Default

Couldn't find an action either but this Lua script seems to work here on first short test (needs SWS):

Code:
masterTrack = reaper.GetMasterTrack(0)
masterVolEnv =  reaper.GetTrackEnvelopeByName(masterTrack, "Volume")

if masterVolEnv ~= nil then
  BR_masterVolEnv = reaper.BR_EnvAlloc(masterVolEnv, false)
  if BR_masterVolEnv ~= nil then
    active, visible, armed, inLane, laneHeight, defaultShape, minValue, maxValue, centerValue, _type, faderScaling 
      = reaper.BR_EnvGetProperties(BR_masterVolEnv)
    reaper.BR_EnvSetProperties(BR_masterVolEnv, false, visible, armed, inLane, laneHeight, defaultShape, faderScaling)
    reaper.BR_EnvFree(BR_masterVolEnv, true)
  end
end
nofish is offline   Reply With Quote
Old 06-07-2019, 07:27 AM   #3
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,306
Default

Quote:
Originally Posted by nofish View Post
Couldn't find an action either but this Lua script seems to work here on first short test (needs SWS):

Code:
masterTrack = reaper.GetMasterTrack(0)
masterVolEnv =  reaper.GetTrackEnvelopeByName(masterTrack, "Volume")

if masterVolEnv ~= nil then
  BR_masterVolEnv = reaper.BR_EnvAlloc(masterVolEnv, false)
  if BR_masterVolEnv ~= nil then
    active, visible, armed, inLane, laneHeight, defaultShape, minValue, maxValue, centerValue, _type, faderScaling 
      = reaper.BR_EnvGetProperties(BR_masterVolEnv)
    reaper.BR_EnvSetProperties(BR_masterVolEnv, false, visible, armed, inLane, laneHeight, defaultShape, faderScaling)
    reaper.BR_EnvFree(BR_masterVolEnv, true)
  end
end

Isnt that TOGGLE. I need for a bypassed track to also stay bypassed while toggle will then unbypass it
Coachz is online now   Reply With Quote
Old 06-07-2019, 07:42 AM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,057
Default

Have you tried it?
Here it doesn't toggle when run on an already bypassed master vol. env.
nofish is offline   Reply With Quote
Old 06-07-2019, 07:55 AM   #5
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 7,306
Default

Just tried it and it works perfectly. Thanks so much ! I really appreciate the help.
Coachz is online now   Reply With Quote
Old 06-07-2019, 08:01 AM   #6
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,057
Default

You're welcome.

Though your remark got me thinking it could be improved a bit (performance wise) in that it only sets the envelope bypassed if it's actually active (and not in any case):

Code:
masterTrack = reaper.GetMasterTrack(0)
masterVolEnv =  reaper.GetTrackEnvelopeByName(masterTrack, "Volume")

if masterVolEnv ~= nil then
  BR_masterVolEnv = reaper.BR_EnvAlloc(masterVolEnv, false)
  if BR_masterVolEnv ~= nil then
    active, visible, armed, inLane, laneHeight, defaultShape, minValue, maxValue, centerValue, _type, faderScaling 
      = reaper.BR_EnvGetProperties(BR_masterVolEnv)
    if active == true then
      reaper.BR_EnvSetProperties(BR_masterVolEnv, false, visible, armed, inLane, laneHeight, defaultShape, faderScaling)
    end
    reaper.BR_EnvFree(BR_masterVolEnv, true)
  end
end
nofish 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 10:23 AM.


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