-
Hello there, Is there a way to call a function when a single button is pressed, the button is connected in a mux, so what i want to do is to call a custom function when this specific button is pressed and sends a midi note on Thanks for your help and great work |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
so for example this is the mux code: NoteButton LimitSwitches[] = { I want to call a function called x for example when the first button is pressed, or the third button, just a specific button in the mux array |
Beta Was this translation helpful? Give feedback.
-
You can get the button state from the if (LimitSwitches[i].getButtonState() == Button::Falling)
someFunction(); If you need more flexibility, see this example: https://tttapa.github.io/Control-Surface-doc/Doxygen/d4/d3b/Custom-MIDI-Output-Element_8ino-example.html |
Beta Was this translation helpful? Give feedback.
You can get the button state from the
NoteButton
s:If you need more flexibility, see this example: https://tttapa.github.io/Control-Surface-doc/Doxygen/d4/d3b/Custom-MIDI-Output-Element_8ino-example.html