Adding a MIDI event listener that polls the input buffer.