midi controller

Hi everyone, new to the world of arduino and just began my first project. I am trying to build a multi effect pedal controller for guitarix. I found this code which works for my 5 pots but doesn’t work for the push buttons. Basically what I am trying to do is make the push buttons send an on off signal instead of sending Note. I cant figure out how to modify the code so that the push buttons show up as a controller number instead of a note number. Can anyone point me in the right direction?

MIDI_Controller.ino (19.2 KB)

Hi, I made a MIDI-controller with a Teensy with Arduino bootloader, but I thought you can't send buttonstates without a note, like its always 'Note on' or 'Note off'. Pots are a little bit different when using MIDI because they need to go form 0 to 127 in value.

is there no midi command for "all notes off"?

YOu could make it so that if a potmeter is below some low value it sends this "note" (no midi expert)

robtillaart: is there no midi command for "all notes off"?

Yes. Use a Channel Mode Message for that. B0 7B 00 sets all notes off on channel 1.