Sustain Message to Control a Widget

Somestimes it is necessary to control for example the Leslie Speed with the Sustain Pedal.
The new IK Multimedia Hammond plugin lacks a latch mode when using a controller for the Leslie speed.
Workaround could be to use a widget assigned to the Leslie speed and assign the Sustain Controller to the widget - BUT: now the sustain message is blocked.

Here is a simple script which allows to control the speed of the Leslie via a widget and the sustain can be further used.

var MIN : MidiInBlock
    SUS : Widget // used to control the Leslie Speed

on ControlChangeEvent(M : ControlChangeMessage) matching 64 from MIN
 SendNow(MIN, M)
 if GetCCValue(M) == 127 then
    if GetWidgetValue(SUS) == 1.0 then
        SetWidgetValue(SUS,0.0)
    else
        SetWidgetValue(SUS,1.0)
    end
 end
end

UPDATE:
With the help of @djogon I figured out how to implement that without a script
2 widgets
Both MIDI assigned to CC64 (Sustain)
Now the 1st widget is assigned to the MIDI In to send out CC64 (this way CC64 is not filtered out)
The 2nd widget “Momentary to latching” activated and assigned to the Speed Parameter of the plugin

@pianopaul,

The solution @djogon provided you is the same solution I’ve been using since February. It works well without scripting.

X

@xpansion,

because I am a Programmer I first look at gp script …

But my solution preserves space in the layout :wink:

@pianopaul,

Because I manage software engineers (and I know how much custom development costs) I usually look for a standard configuration approach before writing code… :slight_smile:

My team took away my developer card a long time ago.

X

Now I have an argument why to use scripting :wink:
The widget solutions seems to send only on Midi Channel 1, but when I need for example Channel 2?
Is there a trick?

I answer myself :wink:
Just create a separate widget and assign StickyNoteChannel.
Now the channel can be set - clever solution!

3 Likes