@Orien Following the advices of @dhj (and with the help of @djogon who woke me up in another topic ), here is a version taking into account the three succesives CC messages. I cannot check if it works, as I don’t have a xk-1c. This is supposed to filter out the other CC6 messages that are not intended to control the rotary speed of your organ plugin. I hope it works
Var
MIDIin : MidiInBlock
Leslie : Widget
CC_State : IntegerInitialization
CC_State = 0;
End
On ControlChangeEvent(CC_msg:ControlChangeMessage) Matching 99,98,6 from MIDIin
Select CC_State == 0 Do CC_State = if ((GetCCNumber(CC_msg)==99)And(GetCCValue(CC_msg)==2)) Then 1 Else 0 End CC_State == 1 Do CC_State = if ((GetCCNumber(CC_msg)==98)And(GetCCValue(CC_msg)==9)) Then 2 Else 0 End CC_State == 2 Do if ((GetCCNumber(CC_msg)==6)) Then if (GetCCValue(CC_msg)!=0) Then Leslie.SetWidgetValue(100.0); Else Leslie.SetWidgetValue(0.0); End CC_State = 0; End End
End
Let me know if it works.