Skip to content

Instantly share code, notes, and snippets.

@jtackaberry
Last active January 10, 2016 00:21
Show Gist options
  • Save jtackaberry/a1eaf1d168ceea4eee0b to your computer and use it in GitHub Desktop.
Save jtackaberry/a1eaf1d168ceea4eee0b to your computer and use it in GitHub Desktop.
REAPER script: Unbypass and online all FX for selected tracks
-- 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