Switch for multiple values \ Switch plugin

Hi,
Is there a way to have a switch that can select different plugin? I only see the possibility to have a plugin on or off.
For example I would like to select between a Phaser/Chorus/Flanger Plugin each time I prress the switch and not 3 separate on/off swicth for each plugin.
Is it possible ?
Thank you for your help

Use Widget Groups or Scripting

Thank you

So, just to get some understanding of this (in case I need to do something like this in the future), using Widget Groups (or scripting) basically you would bypass and “un-bypass” the respective plugins?

Try to imagine how this would be done with real hardware devices… how would the routing or cabling look like? What can be done and how, and what cannot be done and why…
would you exchange a stomp box like a chorus pedal with a phaser pedal whilst you are playing?
Most probably not… you would use some kind of mixer/router/switcher… you wouldn’t unplug it and plug of another one in instead while you are playing.
In GP you would choose some similar approach… use mixers, use creative routing, don’t just switch plugins on or off, don’t try to exchange them during play, use widgets and their possibilities. Just because we are doing things digitally, it doesn’t mean things will work magically. And just because things are somehow doable (i.e. using scripts) doesn’t mean that this automatically will work well or sound good…

1 Like

Thank you that makes sens

I tried to program it as explained by @schamass .

EffectsSelector.gig (34.7 KB)

Idea: Create three effects with a mixer:

Then create a widget to swap:

And a script that keeps a counter with values 0, 1 or 2, for the effects, and switching the Mute properties from the audio mixer and also changing the text of the widget so you can see the current selection.

var EffectsSelectorSwitch: Widget
    EffectsMixer : PluginBlock
    CurrentEffect: Integer // 0 = chorus, 1 = distortion, 2 = delay
    CurrentEffectNames : String array = [ "Chorus", "Distortion", "Delay" ]

    AUDIO_MIXER_NR_OF_PARAMETERS_PER_CHANNEL: Integer = 7
    AUDIO_MIXER_MUTE_PARAMETER: Integer = 3
    NR_OF_EFFECTS : Integer = 3
    
Function BoolToDouble(value : Boolean) returns Double
    result = if value then 1.0 else 0.0 end
end

Function SetAudioMixerMuteParameter(channel: Integer)
   SetParameter(EffectsMixer, 
    channel * AUDIO_MIXER_NR_OF_PARAMETERS_PER_CHANNEL + AUDIO_MIXER_MUTE_PARAMETER,
    BoolToDouble(CurrentEffect != channel))
End

Function UpdateEffect()
    var effect : Integer
    for effect = 0; effect < NR_OF_EFFECTS; effect = effect + 1 do
        SetAudioMixerMuteParameter(effect)
    end
   
    SetWidgetLabel(EffectsSelectorSwitch, CurrentEffectNames[CurrentEffect])
end
    
    
Initialization
    CurrentEffect = 0
    UpdateEffect()
End


On WidgetValueChanged(newValue : double) from EffectsSelectorSwitch
    if newValue == 1.0 then
        CurrentEffect = (CurrentEffect + 1) % NR_OF_EFFECTS
        UpdateEffect()
    end
End

2 Likes

Thanks ! Time to write some script

1 Like

1 Like

Looks nice!
Does everything work as you wanted?

Almost, I just want the ON/OFF switch to work the other way.
I would like this behaviour: If the switch is OFF, Bypass is on
Right now If the switch is ON, Bypass is ON which is a bit misleading.
My goal is to replicate a Nord Electro 6D with Gig Performer.

Just invert the widget’s value. Should work then.

2 Likes