I'm having trouble getting buttons or checkboxes to respond to MIDI control. I'm running FaustIDE in Chrome on a Mac and a MIDI controller (sending on channel 1) connected via USB. Its knobs and sliders control GUI knobs and sliders fine. Also 'badges' are appearing next to "MIDI Input" when keys are pressed. But when it comes to buttons, the corresponding GUI buttons never turn on or make an audible difference.
I am following the logic from the MIDI documentation here that says: "When a 7-bit MIDI parameter is used to drive a button or a checkbox, its maximum value (127) maps to 1 ("on") while its minimum value (0) maps to 0 ("off")."
I tried two methods:
MIDI CC with [midi:ctrl]
My button is mapped as 'momentary' on CC 58 with an On Value of 127 and an Off Value of 0.
In the FaustIDE it is mapped as follows:
button("[0]Env1 > Amp[midi:ctrl 58 1]")
One thing I noticed, if I turn the button into a checkbox, then press the corresponding button on my MIDI controller, the GUI button no longer responds to a mouse click, so the message is being received at some level.
MIDI note with [midi:key]
My button is mapped as 'momentary' and sends a C0 Note with an On Value of 127 and no off value (cannot be set)
This appears as MIDI Note 11 on the badge next to "MIDI Input", so I map in the FaustIDE as follows:
button("[0]Env1 > Amp[midi:key 11 1]")
Using this method with button or checkbox, there is no response on the GUI or audibly and the strange behaviour above is not replicated.
Any ideas? Potential bug or something I'm missing?
As an extra note, I worked around the issue for now by using a hslider configured to operate like a button:
hslider("[0]Env1 > Amp[midi:ctrl 58 1]", 0, 0, 1, 1);
and this is working fine!
Hey,
I'm having trouble getting buttons or checkboxes to respond to MIDI control. I'm running FaustIDE in Chrome on a Mac and a MIDI controller (sending on channel 1) connected via USB. Its knobs and sliders control GUI knobs and sliders fine. Also 'badges' are appearing next to "MIDI Input" when keys are pressed. But when it comes to buttons, the corresponding GUI buttons never turn on or make an audible difference.
I am following the logic from the MIDI documentation here that says: "When a 7-bit MIDI parameter is used to drive a button or a checkbox, its maximum value (127) maps to 1 ("on") while its minimum value (0) maps to 0 ("off")."
I tried two methods:
button("[0]Env1 > Amp[midi:ctrl 58 1]")
One thing I noticed, if I turn the button into a checkbox, then press the corresponding button on my MIDI controller, the GUI button no longer responds to a mouse click, so the message is being received at some level.
button("[0]Env1 > Amp[midi:key 11 1]")
Using this method with button or checkbox, there is no response on the GUI or audibly and the strange behaviour above is not replicated.
Any ideas? Potential bug or something I'm missing?