Hello, I'm working on a Midi controller with encoders and buttons.
I haven't recieved the hardware yet, but I'm trying to get a headstart with the code.
I'm wondering, if I want to send a midi note or controlchange (i'm using midiusb.h), hold that button, twist an encoder (encoder.h) and then release the button, is there anything I should keep in mind?
should I use if/else, or just if for the button?
I know this is an open question, but I'm sure someone can help me on my way.
MIDI Events are sent when something changes, so key press/key release could generate 2 events - depending on your midi gears configuration. Usually it's not "XYZ is on/XYZ is off", it's "XYZ got pressed/XYZ is released". Note events are not what they seam: note-off is kind of random an not enforced. Control Change events are more useful, your DAW can at least be configured to do meaningful stuff with them.