MIDI file type 2 support

Type 2 MIDI file support :)

Note: white spate changes are due to code indenting for tidiness, but are only around areas of the code affected by the addition and modification of code for type 2 support.