View Single Post
Old 01-20-2020, 06:31 AM   #6055
SebyMusic
Human being with feelings
 
Join Date: Apr 2018
Posts: 211
Default

Geoff , anyone please?
I really need help
Seby

Quote:
Originally Posted by SebyMusic View Post
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);
SebyMusic is offline   Reply With Quote