Cleanup MIDI and OSC callback logic.