SwitchTrigger4 - MOD Devices

MOD Team

The Switch Trigger gets one audio stream as input and chooses one of four outputs to route the audio. The output channel can be selected by triggering the corresponding control. The switch trigger was designed to use the MOD on stage. By addressing each control to a footswitch, the musician can quickly access a desired chain of effects.


This is a companion discussion topic for the original entry at https://pedalboards.moddevices.com/plugins/aHR0cDovL21vZGRldmljZXMuY29tL3BsdWdpbnMvbW9kLWRldmVsL1N3aXRjaFRyaWdnZXI0

Is it just me or do the presets not work for this? I wanted to be able to cycle through 3 of the 4 outputs via presets and “Assign All”, but the presets have no effect.

I love this plugin and has become a mainstay in my pedalboard. I use it as four different types of sounds from super-clean to super-dirty… like four channels on an amp. First Channel goes through a super clean amp/cab. Second channel puts in the GxEpic in line for a still clean but breaks up when I dig in. Third Channel puts a distortion pedal in line for a good lead tone (Tim Ray) and the fourth channel puts a ridiculous distortion…
I assign each button to the Footswitch in a row from left to right so I can access each “channel”.
My feedback… only light the channel which is in use. All footswitches are green all the time and don’t change color or turn on/off… Either light up when that channel is being used or become a different color.

Also… why is this still a “beta” plugin?

Hey, @jon, @falkTX would be awesome if the mod-ui informs the current active channel. The simplest way that I thought is with a led next to the footswitch. I will try to do a pull request, but… which of these codes is the currently used?

1 Like

Mapped on the requests. If you get it sorted out, even better :slight_smile:
Regarding the code in use, @falkTX probably knows it better

1 Like

both are used. the code that is compiled is from the mod-utilities repo, but then the ttl is from the lv2-data one.

2 Likes

Thanks, @falkTX.

But about the css/js/image files, do I need to update both repo or just the mod-lv2-data?

–

@jon I found a bug: the SwitchTrigger4 doesn’t save correctly the state: if I save the pedalboard, change the current pedalboard and go back, the active state of this plugin is probably wrong. The reproduction steps are presented into SwitchTrigger4 - bug - MOD Devices

I don’t understood what happened. I noticed that, initially (i.e., after add a instance of the plugin on the pedalboard), the persisted state of all channels (channel1, channel2, channel3, channel4) of the plugins is saved as zero. But after press a footswich, it is saved as 1, then the active channel will be the highest channel: https://github.com/moddevices/mod-utilities/blob/master/SwitchTrigger4/src/switchtrigger4.cpp#L124-L142

I don’t know why is saved as 1, because after press the footswitch for enable it, the code disabled it (https://github.com/moddevices/mod-utilities/blob/master/SwitchTrigger4/src/switchtrigger4.cpp#L124-L142), then, in my understanding, the values should be as zero, not one. It is apparently a bug of the platform, not exactly of this plugin.

Then we have two bugs:

  • The persistence of toggle state
  • The persistence of the SwitchTrigger4 plugin state

To solve specifically the plugin bug, I’m thinking to create a “select” input controller (lv2:enumeration), that will save the last selected channel. A plus of this approach is that will be also possible to assign footswitch(es) to change the current channel (just like the SwitchBox 1-2, but for 4 outputs :star_struck:)
Note that I will not remove the four channels input controls, I will just add the lv2:enumeration that will not be directly accessible over the mod-ui pedalboard view but will be accessible over the parameter settings view (image).

What you think about it, guys?

I actually found similar bugs recently with some other plugins.
I will check if we can replicate it.
What OS version are you in? 1.11?

Briefly reading the idea, it sound good. If doesn’t mess up somewhere else. But that part I didn’t put much thought.

1 Like

the plugin is incomplete, the triggers per lv2 spec revert to their default position after every run.
so that part is fine and working as intended.

the plugin simply needs to save the “channel” variable in some form, either by an enumeration as you say, or a state property.
if you do that, then the trigger needs to notify the host that it changed its own input control port (which is not allowed in core lv2 spec).
mod-host implements https://github.com/KXStudio/LV2-Extensions/tree/master/kx-control-input-port-change-request.lv2 as a way around this, which would then make it a nice and neat way to solve the missing state.

It is a bit messy at the moment, the lv2-data likely has changes that were not pushed into the original repo.
so you will have to:

  1. copy the lv2-data ttl regarding switchtrigger to the repo where the source code lives
  2. edit source code and ttl to add the new parameter and feature
  3. push the ttl changes back to lv2-data repo
2 Likes