Last active
January 10, 2016 00:21
-
-
Save jtackaberry/a1eaf1d168ceea4eee0b to your computer and use it in GitHub Desktop.
REAPER script: Unbypass and online all FX for selected tracks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Unbypasses and onlines all FX for selected tracks | |
-- | |
-- Released to the public domain. | |
lastSelection = '' | |
function enableFX() | |
-- Track: Unlock track controls | |
reaper.Main_OnCommandEx(41313, 0, 0) | |
-- Unbypass FX of selected tracks | |
cmd = reaper.NamedCommandLookup('_XENAKIOS_UNBYPASSFXOFSELTRAX') | |
reaper.Main_OnCommandEx(cmd, 0, 0) | |
-- Set all FX online for selected tracks | |
reaper.Main_OnCommandEx(40536, 0, 0) | |
end | |
function main() | |
selection = '' | |
idx = 0 | |
while true do | |
track = reaper.GetSelectedTrack(0, idx) | |
if track then | |
selection = selection .. reaper.GetTrackGUID(track) | |
idx = idx + 1 | |
else | |
break | |
end | |
end | |
if lastSelection ~= selection then | |
lastSelection = selection | |
enableFX() | |
end | |
reaper.defer(main) | |
end | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment