Old 11-15-2014, 08:16 PM   #1
Claudiohbsantos
Human being with feelings
 
Join Date: Aug 2014
Location: New York
Posts: 135
Default EEL: Add a FX to the selected takes

I just thought I could share a simple script I figured out recently. It is actually a simple trick but it took me a while to figure out how to do it since the API has no controls for the Take Fx Chains. The following code adds a fx that you can specify by name on the eel to the selected takes and opens the FX chain in the end for tweaking.

(the code needs SWS extension to work)

Add Reacomp to the selected takes
Code:
Undo_BeginBlock();

ntracks = CountSelectedTracks(0);

while (i < ntracks) 
(
track[i] = GetSelectedTrack(0,i);
i += 1;
);

Main_OnCommand(NamedCommandLookup("_SWS_CREATETRK1"), 0);

temptrack = GetSelectedTrack(0,0);

TrackFX_GetByName(temptrack, "ReaComp (Cockos)",1);

Main_OnCommand(NamedCommandLookup("_S&M_COPYFXCHAIN5"), 0);

Main_OnCommand(NamedCommandLookup("_S&M_COPYFXCHAIN8"), 0);

Main_OnCommand(40005, 0);

Main_OnCommand(40638, 0);

i = 0;
while (i < ntracks)
(
SetTrackSelected(track[i],1);
i += 1;
);

Undo_EndBlock("Add ReaComp to selected takes",-1);
To change the FX to be added to the take all you have to do is substitute the name of the FX in bold in the code.

Let me know if you find any glitches or exceptions, hope it's of some use to someone.

Edit: New version that adds the fx to the selected tracks or items depending on focus

Add Reacomp to selected tracks/takes (depending on focus)
Code:
//Write name of fx to be added below:

fxname = "ReaComp (Cockos)";

/////////////


Undo_BeginBlock();

focus = GetCursorContext();

nitems = CountSelectedMediaItems(0);

focus != 2 ? (

focus == 1 && nitems != 0 ? (

ntracks = CountSelectedTracks(0);

while (i < ntracks) 
(
track[i] = GetSelectedTrack(0,i);
i += 1;
);

Main_OnCommand(NamedCommandLookup("_SWS_CREATETRK1"), 0);

temptrack = GetSelectedTrack(0,0);

TrackFX_GetByName(temptrack,fxname,1);

Main_OnCommand(NamedCommandLookup("_S&M_COPYFXCHAIN5"), 0);

Main_OnCommand(NamedCommandLookup("_S&M_COPYFXCHAIN8"), 0);

Main_OnCommand(40005, 0);

Main_OnCommand(40638, 0);

i = 0;
while (i < ntracks)
(
SetTrackSelected(track[i],1);
i += 1;
);

):(

focus == 0 || nitems == 0 ? (

ntracks = CountSelectedTracks(0);

while (i < ntracks) 
(
TrackFX_GetByName(GetSelectedTrack(0,i),fxname,1);
i += 1;
);

);
);
);

Undo_EndBlock("Add TrueVerb Stereo to selected tracks or takes",-1);
__________________
My Reapack Repo - Reapack Extension

Last edited by Claudiohbsantos; 11-16-2014 at 04:47 PM.
Claudiohbsantos is offline   Reply With Quote
Old 11-15-2014, 11:41 PM   #2
pakkuncung
Human being with feelings
 
pakkuncung's Avatar
 
Join Date: Sep 2012
Location: Indonesia
Posts: 91
Default

Great! Thank you for sharing this.

I'm a total EEL newbie. Would you mind telling me which line should i modify, if i want the script to add FX to the selected tracks (instead of items/takes)?

Thanks again

EDIT:

nevermind. just found it. on the other thread by spk77

http://forum.cockos.com/showpost.php...63&postcount=2
__________________
JRENG!
EHX

Last edited by pakkuncung; 11-15-2014 at 11:54 PM.
pakkuncung is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.