26
Example 3 : programming expression pedals
CHANNEL MyGear = 10
// You can modify the MIDI commands, range and sweep type for each of the expression pedals.
// Sweep type is linear by default, but can also be set to SlowRising or FastRising
// First you define all available continuous controls or “sweeps” :
SWEEP volume = SendMidi MyGear CtrlChange 07 0-127 SlowRising
SWEEP whammy = SendMidi MyGear CtrlChange 19 0-127
…
// Then you can specify in each preset or effect which sweep
// needs to be active on each of the 2 expression pedals.
// For instance, a stomp switch could change the wah pedal into a whammy effect :
EFFECT_ON ActivateWhammy = Pedal 2 = whammy
EFFECT_OFF ActivateWhammy = Pedal 2 = wah
// you can even define a virtual “tipswitch” or “heelswitch” for each expression pedal :
Tipswitch 2 = ActivateWhammy
// If you link the effect above to the “tipswitch” of pedal 2, the pedal will toggle between
// both functions when pressing the pedal tip all the way down.
// It’s a good idea to stick a small piece of foam under the pedal. This way you have
// the full adjustment range by moving the pedal, and the virtual switch will only be activated
// when putting some extra force on the pedal tip.
// As is the case for presets, also sweeps can contain multiple commands
// surrounded by curly braces:
SWEEP volume =
{
SendMidi MySynth CtrlChange 07 0-127
SendMidi MyAmp CtrlChange 07 0-127 SlowRising
}
// This way one pedal can send multiple parallel streams of MIDI commands
// simultaneously on different MIDI channels