View Single Post
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: 8,846
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