Set up the necessary loops for parsing MIDI