Old 08-18-2019, 01:04 PM   #1
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default How to set envelope lane height ?

Is there a way to script an action to set an envelop lane height ? I'm trying to make an action for editing envelopes to enlarge then my current way takes about 5 seconds to run.

I'm looking at this below but don't know what to put for placeholders for params I don't want to set.

reaper.BR_EnvSetProperties( env, active, visible, armed, inLane, 400, defaultShape, faderScaling)


Custom: Rotate Envelope Out of Lane
Envelope: Show all envelopes for tracks
Script: Toggle Envelope Lanes For Selected Track.lua
Script: mpl_Minimize selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua
Script: mpl_Increase selected tracks envelopes heights.lua

Last edited by Coachz; 08-18-2019 at 01:38 PM.
Coachz is offline   Reply With Quote
Old 08-18-2019, 01:41 PM   #2
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default

I got it working by borrowing code from a previous post.


env = reaper.GetSelectedEnvelope( 0)


function SetEnvHeight(envelope, laneHeight)
local BR_env = reaper.BR_EnvAlloc( envelope, false )
local active, visible, armed, inLane, _, defaultShape, _, _, _, _, faderScaling = reaper.BR_EnvGetProperties( BR_env )
reaper.BR_EnvSetProperties( BR_env, active, visible, armed, inLane, laneHeight, defaultShape, faderScaling )
reaper.BR_EnvFree( BR_env, true )
end

SetEnvHeight(env, 100)
Coachz is offline   Reply With Quote
Old 08-18-2019, 01:53 PM   #3
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default

I'm really happy with how this worked out so wanted to post this. I have two actions. One that opens the envelope lane and sets a nice height for the track and the envelope and will toggle through envelopes (vol, pan, mute, etc).

Then I have an action to put all envelopes back in the lane. I hope it helps.



Custom: Rotate Envelope Out of Lane
Envelope: Show all envelopes for tracks
Script: Toggle Envelope Lanes For Selected Track.lua
Xenakios/SWS: Set selected tracks heights to A
Script: JB_set_envelope_height_1.lua

Set the height at the bottom of the code.

-- Script: JB_set_envelope_height_1.lua
-- clear console
reaper.ShowConsoleMsg("")

-- create simpler console messager
function Msg(param)
reaper.ShowConsoleMsg(param.."\n")
end

debug = false -- disable main messages

tr = reaper.GetSelectedTrack( 0, 0 )
curMode = reaper.GetTrackAutomationMode( tr )


--if debug then Msg("Current Automation Mode is: " .. curMode) end

env = reaper.GetSelectedEnvelope( 0)


function SetEnvHeight(envelope, laneHeight)
local BR_env = reaper.BR_EnvAlloc( envelope, false )
local active, visible, armed, inLane, _, defaultShape, _, _, _, _, faderScaling = reaper.BR_EnvGetProperties( BR_env )
reaper.BR_EnvSetProperties( BR_env, active, visible, armed, inLane, laneHeight, defaultShape, faderScaling )
reaper.BR_EnvFree( BR_env, true )
end

SetEnvHeight(env, 350)

-- reaper.BR_EnvSetProperties(BR_Envelope envelope, boolean active, boolean
--visible, boolean armed, boolean inLane, integer laneHeight, integer
--defaultShape, boolean faderScaling)


================================================== ==
Custom: Put All Envelopes Into Lanes
SWS: Save current track selection
Track: Select all tracks
Envelope: Show all envelopes for all tracks
SWS/BR: Apply next action to all visible envelopes in selected tracks
SWS/wol: Put selected envelope in media lane
SWS: Restore saved track selection

Last edited by Coachz; 08-09-2020 at 08:08 AM.
Coachz 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 03:29 AM.


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