Detecting MIDI events

Press buttons, push sliders or adjust knobs on your hardware, you will see the MIDI events generated by your hardware. That MIDI event will be associated with a command and the command will be executed whenever that MIDI event happens.