# MIDI Input Callback Receive and handle incoming MIDI messages using the `MIDI_Callbacks` class. > Original: `MIDI-Input.ino` ```cpp pico #include "pico/stdlib.h" #include "pico/cyw43_arch.h" #include using namespace cs; BluetoothMIDI_Interface midi; struct MyMIDI_Callbacks : MIDI_Callbacks { void onChannelMessage(MIDI_Interface &, ChannelMessage msg) override { (void)msg; } void onSysExMessage(MIDI_Interface &, SysExMessage msg) override { (void)msg; } void onRealTimeMessage(MIDI_Interface &, RealTimeMessage msg) override { (void)msg; } } callback; int main() { stdio_init_all(); if (cyw43_arch_init()) return 1; midi.begin(); midi.setCallbacks(callback); while (true) { midi.update(); sleep_ms(1); } } ```