MONO ON / POLY ON keyboard midi help needed


rcharlier3
 

New #UnO2 user.  My first week with the device.
Midi+synth+keyboard person, not a guitarist.
 
A few questions:
I had hoped to make a pedal to turn MONO ON (and poly off).  If it is lit up, MONO is on, and if it is not lit up, MONO is off (and so POLY is ON).
 
Gave up on that for the moment and instead thought "I'll make a pedal that will just turn MONO ON and another pedal that will turn POLY ON.  Having some trouble with that.  Its been a long day so I'm missing something basic.
 
With TWO presses of this pedal I can get MONO ON.  Further presses of the pedal do nothing.  (and that's fine for now).
 
Note:
126 = CC for MONO
127 = CC for POLY
 
 
PRESET pMono =
{
   SendMidi chOne CtrlChange 126 0
   SendMidi chOne CtrlChange 127 0
}
PRESET_RELEASE pMono = 
{
   SendMidi chOne CtrlChange 126 127
   SendMidi chOne CtrlChange 127 127
}
 
 
With TWO presses of this pedal I can get POLY ON.  Further presses of the pedal do nothing.  (and that's fine for now).
PRESET pPoly =
{
   SendMidi chOne CtrlChange 127 127
   SendMidi chOne CtrlChange 126 127
}
PRESET_RELEASE pPoly =
{
   SendMidi chOne CtrlChange 127 0
   SendMidi chOne CtrlChange 126 0
}
 
 
Why does this take two presses?
 
 
Any suggestions on the correct code to make one pedal "MONO ON when pressed and the light is lit, POLY ON if pressed again and the light is off"?
 

Join uno@fcb1010.groups.io to automatically receive all group messages.