Originally Posted by SebyMusic
Hi, I use that script below. It work well on any selected track when I trigger it directly in reaper. But if I trigger it with CSI and a controller, it only work on the track 1 if the track 1 is selected. If I select any other track, it seems that the script is not launch.
tks
Seby
Script EEL:
function ShowNamedPlugin(sPluginName, pTrack, create) local(iSel iPlugin) (
/*
If named plugin not found and create is True, add it to track FX chain
If track FX chain is hidden, float the plugin.
If track FX chain is open, switch focus to the plugin if it isn't selected
*/
iPlugin = TrackFX_GetByName(pTrack, sPluginName, create);
iPlugin > -1 ? (
iSel = TrackFX_GetChainVisible(pTrack);
iSel == -1 ? (
TrackFX_GetOpen(pTrack, iPlugin) ?
TrackFX_Show(pTrack, iPlugin, 2):
TrackFX_Show(pTrack, iPlugin, 3);
):
iSel == -2 ? TrackFX_Show(pTrack, iPlugin, 1):
iSel != iPlugin ? TrackFX_Show(pTrack, iPlugin, 1);
);
);
sPluginName = "FabFilter Pro-Q 2 (FabFilter)";
pProject = 0;
i = 0;
loop(CountSelectedTracks(pProject),
pTrack = GetSelectedTrack(pProject, i);
ShowNamedPlugin(sPluginName, pTrack, 1);
i+=1;
);
IsTrackSelected(GetMasterTrack()) ? ShowNamedPlugin(sPluginName, GetMasterTrack(), 1);
|