Hold button (midi)

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.

Thanks. Paul

Sorry, is this question for real? :roll_eyes:

If pressed, note on
Else note off?

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.

Thanks. I guess I could do with control changes, but I need to hold the button, like 'shift' on a keyboard.
How do I do this?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.