Add a handler to record notes from MIDI.