grame-cncm / faustide

Faust IDE (Integrated Development Environment)
https://faustide.grame.fr
Other
76 stars 23 forks source link

Buttons or Checkboxes don't respond to MIDI control #62

Open sidechained opened 2 years ago

sidechained commented 2 years ago

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:

  1. MIDI CC with [midi:ctrl]

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.

  1. MIDI note with [midi:key]

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?

sidechained commented 2 years ago

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!