|
|
|
04-20-2021, 08:57 AM
|
#1
|
Human being with feelings
Join Date: Jan 2020
Posts: 1,927
|
Action (or small script) that opens specific FX
Is there a way to toggle open/close the GUI for an FX with a specific name on the selected track?
Basically I just want to open a certain FX on the selected track with a control surface, but that FX won't always be in the same FX slot. And opening the FX chain window won't necessarily display the correct GUI if there are multiple FX on the track.
|
|
|
04-20-2021, 10:14 AM
|
#2
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
|
ReaPack > Add Fx by Name in selected tracks (a description of settings inside script) (by Archie) or Add fx by name to selected track (by me2beats) seems to fit (not used myself...).
edit:
Ah scratch that, you're looking for opening, not adding, sorry.
|
|
|
04-20-2021, 02:16 PM
|
#3
|
Human being with feelings
Join Date: Jan 2020
Posts: 1,927
|
Right, and I'm not even sure if instantiated track FX names are exposed to the API. For instance, this seems like it just works off the FX slot number:
Quote:
C: void TrackFX_SetOpen(MediaTrack* track, int fx, bool open)
EEL2: TrackFX_SetOpen(MediaTrack track, int fx, bool open)
Lua: reaper.TrackFX_SetOpen(MediaTrack track, integer fx, boolean open)
Python: RPR_TrackFX_SetOpen(MediaTrack track, Int fx, Boolean open)
Open this FX UI. See TrackFX_GetOpen
|
For now I am going to use the action "Track: Open/close UI for FX #1 on last touched track," since the FX actually will be in the first slot a large portion of the time. In cases where it isn't, I will have to use the mouse for now.
|
|
|
04-21-2021, 07:55 AM
|
#4
|
Human being with feelings
Join Date: Apr 2020
Location: UK
Posts: 79
|
This will toggle open/close for the GUI of the first instance of the named FX on the first selected track. The chosen FX does not need to be first in the FX stack.
Code:
fxName = "<insert FX name here>"
trk = reaper.GetSelectedTrack(0, 0)
fxIndex = reaper.TrackFX_AddByName(trk, fxName, false, 0)
isOpen = reaper.TrackFX_GetOpen(trk, fxIndex)
if isOpen == true then
reaper.TrackFX_Show(trk, fxIndex, 2)
else
reaper.TrackFX_Show(trk, fxIndex, 3)
end
|
|
|
04-21-2021, 07:13 PM
|
#5
|
Human being with feelings
Join Date: Jan 2020
Posts: 1,927
|
Quote:
Originally Posted by AB1
This will toggle open/close for the GUI of the first instance of the named FX on the first selected track. The chosen FX does not need to be first in the FX stack.
Code:
fxName = "<insert FX name here>"
trk = reaper.GetSelectedTrack(0, 0)
fxIndex = reaper.TrackFX_AddByName(trk, fxName, false, 0)
isOpen = reaper.TrackFX_GetOpen(trk, fxIndex)
if isOpen == true then
reaper.TrackFX_Show(trk, fxIndex, 2)
else
reaper.TrackFX_Show(trk, fxIndex, 3)
end
|
Wow, thank you very much! Works perfectly!!!
|
|
|
04-22-2021, 01:28 AM
|
#6
|
Human being with feelings
Join Date: Apr 2020
Location: UK
Posts: 79
|
You're welcome. For anyone not used to this sort of thing, it's worth noting that reaper.TrackFX_AddByName "Adds or queries the position of a named FX...", which is not obvious from the function name.
|
|
|
04-22-2021, 07:18 AM
|
#7
|
Human being with feelings
Join Date: Jan 2020
Posts: 1,927
|
Quote:
Originally Posted by AB1
You're welcome. For anyone not used to this sort of thing, it's worth noting that reaper.TrackFX_AddByName "Adds or queries the position of a named FX...", which is not obvious from the function name.
|
I had noticed that description in the API, but was unsure what it actually did. Thanks again! Really appreciate that.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:36 AM.
|