Presets programming with Uno2 Control Centre

Mike Watkinson

Hey all - sorry if this has already been covered but I'm curious on some wording in the Control Centre manual:  "an effect typically has 2 states : ON or OFF"
So does that mean that an effect can have more than two states? If so how? I'm wanting to programme a switch to control the three stages of the Rec function in Mainstage's Loopback plug-in which are:
Record, Overdub, Play
If not an effect, I guess would need to send a single state command (no Off state) multiple times to cycle through the three options, so maybe a Trigger - but the manual seems confusing on this point. On P24 it states that for triggers both "Just like with an effect, you need to specify at least 2 MIDI commands" but also "In this case you will only specify a MIDI command for the footswitch press, and probably none for the footswitch release" 
Any advice on this gratefully received :)

Jack Fenton

Well the LED can only be on or off, so I recommend you make it a trigger and increment each time you push

VAR  $triggerclickstate = 0

$triggerclickstate ++
if  ($triggerclickstate > 2 
    $triggerclick = 0
Of course the above sends 0, 1 or 2 however you can change that  to any value with a case statement. The below will go between 0, 25 and 32.

switch ($triggerstate)
        case 0:
            $triggerstate = 25
        case 25:
            $triggerstate= 32
        case 32:
            $triggerstate =0


A UnO2 setup can contain presets, effects, and triggers.
- An effect does have exactly 2 states: ON or OFF, you specify MIDI messages for the ON state and for the OFF state, the switch LED shows the current state (ON or OFF)
- A trigger can be used for 2 different things : 
1) as a momentary effect (like a sustain pedal) for which you specify MIDI messages for the CLICK action and for the RELEASE action
2) as a trigger for a certain action, in which case you most probably want to send MIDI messages for the CLICK action only, not for the RELEASE action
The LED of a trigger switch is only ON for the time you are pressing the switch.
- A preset typically will send MIDI commands on the CLICK action, but just for the sake of completeness you can also specify MIDI commands for the RELEASE action if you want
The LED of the currently active preset switch remains ON until you select a different preset.

If you want to control 3 or more stages with 1 switch, you will have to rely on a data variable for which you can change the value from 1 to 2 to 3 (or more) on each click, and then send different MIDI messages depending on that value. 
You would typically use a "trigger" switch for that, because the switch LED cannot indicate more than 2 states, therefore you can as well leave the LED off, which is the behavior of a trigger switch.
Hope that explains things better. 


... and while I was typing this reply, Jack Fenton already gave you sample code of exactly that...  Thanks Jack.

Mike Watkinson

Thanks both - I seem to be achieving what I need with a single Trigger_Click message defined which is cycling the Mainstage function through its three phases
There is of course no use in the LED illuminating so this seems OK
Once I even understand what a triggerstate is I may well come back on this - forgive me I'm a noob to Uno2 and programming so it's baby steps for me atm

Jack Fenton

I wonder if you could create a Bogus Effect like


And then in a trigger add:


The only question I would have it to assign which pedal you are switching the LED on since the pedal has been defined as a Switch and not an Effect.

Maybe you could have 1 of the multiple states actually turn on the LED.


Don't forget that if you use a MIDI Note message instead of a CC, Ableton will ignore the Note Off message sent on a normal button release.  If you use Note but set it to Toggle, the second press will send a Note Off instead, and that will be ignored, and you don't want that.  Either use a CC or a normal (not toggle) Note message.