Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWS/S&M: Toggle selected FX bypass for selected tracks #1444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jameadows
Copy link

Iterate through selected effects on selected tracks and toggle
the enabled state.

Fixes #1443

@AppVeyorBot

This comment was marked as outdated.

@AppVeyorBot

This comment was marked as outdated.

@jameadows
Copy link
Author

That last push falls back to the legacy behavior if the FX window is not open for a selected track, i.e. it toggles the selected FX index for the track(s) if it's a valid index.

@AppVeyorBot

This comment was marked as outdated.

@nofishonfriday nofishonfriday mentioned this pull request Dec 6, 2020
SnM/SnM_FX.cpp Outdated
{
int index=-1;
// enumerate selected FX
while( (index = CF_EnumSelectedFX(fxChain, index)) >= 0)
Copy link
Member

@cfillion cfillion Dec 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fxChain is NULL at this point, so the action fails to find the last active FX when the chain is closed. The last active FX index is stored in fxId.

Updating the meaning of "selected FX" from "the last FX shown in the chain" to "all selected FXs in the chain" is interesting, but I think it should be done across all SWS actions dealing with "selected FX". #1432 (comment)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fxChain is NULL at this point, so the action fails to find the last active FX when the chain is closed. The last active FX index is stored in fxId.

Strange, I have the same code in both blocks, but I remember testing this with FX window opened and closed. Anyhow, sorry, I pushed an update that reverts to the previous behavior if the FX window is not opened.

Updating the meaning of "selected FX" from "the last FX shown in the chain" to "all selected FXs in the chain" is interesting, but I think it should be done across all SWS actions dealing with "selected FX". #1432 (comment)

IIUC the original request was to make the action behave the same as the menu command (Ctrl-B). I searched for other actions that affected selected FX, are these what you were wanting to include?:

SWS/S&M: Show FX chain for selected tracks (selected FX)
SWS/S&M: Float selected FX for selected tracks
SWS/S&M: Unfloat selected FX for selected tracks
SWS/S&M: Toggle float selected FX for selected tracks
SWS/S&M: Move selected FX up in chain for selected tracks
SWS/S&M: Move selected FX down in chain for selected tracks
SWS/S&M: Remove selected FX for selected tracks
SWS/S&M: Toggle selected FX online/offline for selected tracks
SWS/S&M: Set selected FX online for selected tracks
SWS/S&M: Set selected FX offline for selected tracks
SWS/S&M: Bypass selected FX for selected tracks
SWS/S&M: Unbypass selected FX for selected tracks
SWS/S&M: Trigger preset for selected FX of selected track (MIDI/OSC only)
SWS/S&M: Trigger next preset for selected FX of selected tracks
SWS/S&M: Trigger previous preset for selected FX of selected tracks
SWS/S&M: Reassign MIDI learned channels of selected FX for selected tracks (prompt)

For each selected track, if the effects window is open
then iterate through effects and toggle the enabled state.

Fall back to previous behavior if the effects window for the track
is not opened, i.e. toggle the current fx index for the track.

Fixes reaper-oss#1443
@daeavelwyn
Copy link

daeavelwyn commented Feb 26, 2021

Hi folks,
Reaper 6.24rc7 here on windows 64 and sws v2.12.1.3 featured build (February 6, 2021) and this action still doesn't work. I get the same issue as the one mentioned in #1443
It works if I use FXchain selection but not on the floating FX having the focus.
any workaround ?

@cfillion cfillion mentioned this pull request Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants