View Single Post
Old 02-06-2023, 08:23 AM   #18
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 2,969
Default

Or, you could save your groups as fx chains. Then throw them on the track with script(s), Probably make a bit () of a glitch when you change over though.
So best not. Probably.

I like mpl's suggestion as well, prefixing each FX name with a group identifier:

Code:
prefix = "G3"
trk = reaper.GetSelectedTrack(0,0)

for i = 0, reaper.TrackFX_GetCount(trk) -1 do
   local retval, name = reaper.TrackFX_GetFXName(trk, i)
   if(string.find(name, "^" .. prefix )) then
    reaper.TrackFX_SetEnabled(trk, i, 1)
   else
     reaper.TrackFX_SetEnabled(trk, i, 0)
   end
end
You'd need a script for each group, changing the prefix I suppose.

If you did it this way, you could even have the same fx in multiple groups...
(don't bind the pattern to the start of the name...)
You might need to pick the labels more carefully:

Code:
label = "G3"
trk = reaper.GetSelectedTrack(0,0)

for i = 0, reaper.TrackFX_GetCount(trk) -1 do
   local retval, name = reaper.TrackFX_GetFXName(trk, i)
   if(string.find(name, "[.]*" .. label )) then
    reaper.TrackFX_SetEnabled(trk, i, 1)
   else
     reaper.TrackFX_SetEnabled(trk, i, 0)
   end
end
__________________
it's meant to sound like that...

Last edited by jrk; 02-06-2023 at 09:03 AM.
jrk is offline   Reply With Quote