+
+gm_instruments = {
+ 1: 'Acoustic Grand Piano',
+ 2: 'Bright Acoustic Piano',
+ 3: 'Electric Grand Piano',
+ 4: 'Honky-tonk Piano',
+ 5: 'Electric Piano 1',
+ 6: 'Electric Piano 2',
+ 7: 'Harpsichord',
+ 8: 'Clavi',
+ 9: 'Celesta',
+ 10: 'Glockenspiel',
+ 11: 'Music Box',
+ 12: 'Vibraphone',
+ 13: 'Marimba',
+ 14: 'Xylophone',
+ 15: 'Tubular Bells',
+ 16: 'Dulcimer',
+ 17: 'Drawbar Organ',
+ 18: 'Percussive Organ',
+ 19: 'Rock Organ',
+ 20: 'Church Organ',
+ 21: 'Reed Organ',
+ 22: 'Accordion',
+ 23: 'Harmonica',
+ 24: 'Tango Accordion',
+ 25: 'Acoustic Guitar (nylon)',
+ 26: 'Acoustic Guitar (steel)',
+ 27: 'Electric Guitar (jazz)',
+ 28: 'Electric Guitar (clean)',
+ 29: 'Electric Guitar (muted)',
+ 30: 'Overdriven Guitar',
+ 31: 'Distortion Guitar',
+ 32: 'Guitar harmonics',
+ 33: 'Acoustic Bass',
+ 34: 'Electric Bass (finger)',
+ 35: 'Electric Bass (pick)',
+ 36: 'Fretless Bass',
+ 37: 'Slap Bass 1',
+ 38: 'Slap Bass 2',
+ 39: 'Synth Bass 1',
+ 40: 'Synth Bass 2',
+ 41: 'Violin',
+ 42: 'Viola',
+ 43: 'Cello',
+ 44: 'Contrabass',
+ 45: 'Tremolo Strings',
+ 46: 'Pizzicato Strings',
+ 47: 'Orchestral Harp',
+ 48: 'Timpani',
+ 49: 'String Ensemble 1',
+ 50: 'String Ensemble 2',
+ 51: 'SynthStrings 1',
+ 52: 'SynthStrings 2',
+ 53: 'Choir Aahs',
+ 54: 'Voice Oohs',
+ 55: 'Synth Voice',
+ 56: 'Orchestra Hit',
+ 57: 'Trumpet',
+ 58: 'Trombone',
+ 59: 'Tuba',
+ 60: 'Muted Trumpet',
+ 61: 'French Horn',
+ 62: 'Brass Section',
+ 63: 'SynthBrass 1',
+ 64: 'SynthBrass 2',
+ 65: 'Soprano Sax',
+ 66: 'Alto Sax',
+ 67: 'Tenor Sax',
+ 68: 'Baritone Sax',
+ 69: 'Oboe',
+ 70: 'English Horn',
+ 71: 'Bassoon',
+ 72: 'Clarinet',
+ 73: 'Piccolo',
+ 74: 'Flute',
+ 75: 'Recorder',
+ 76: 'Pan Flute',
+ 77: 'Blown Bottle',
+ 78: 'Shakuhachi',
+ 79: 'Whistle',
+ 80: 'Ocarina',
+ 81: 'Lead 1 (square)',
+ 82: 'Lead 2 (sawtooth)',
+ 83: 'Lead 3 (calliope)',
+ 84: 'Lead 4 (chiff)',
+ 85: 'Lead 5 (charang)',
+ 86: 'Lead 6 (voice)',
+ 87: 'Lead 7 (fifths)',
+ 88: 'Lead 8 (bass + lead)',
+ 89: 'Pad 1 (new age)',
+ 90: 'Pad 2 (warm)',
+ 91: 'Pad 3 (polysynth)',
+ 92: 'Pad 4 (choir)',
+ 93: 'Pad 5 (bowed)',
+ 94: 'Pad 6 (metallic)',
+ 95: 'Pad 7 (halo)',
+ 96: 'Pad 8 (sweep)',
+ 97: 'FX 1 (rain)',
+ 98: 'FX 2 (soundtrack)',
+ 99: 'FX 3 (crystal)',
+ 100: 'FX 4 (atmosphere)',
+ 101: 'FX 5 (brightness)',
+ 102: 'FX 6 (goblins)',
+ 103: 'FX 7 (echoes)',
+ 104: 'FX 8 (sci-fi)',
+ 105: 'Sitar',
+ 106: 'Banjo',
+ 107: 'Shamisen',
+ 108: 'Koto',
+ 109: 'Kalimba',
+ 110: 'Bag pipe',
+ 111: 'Fiddle',
+ 112: 'Shanai',
+ 113: 'Tinkle Bell',
+ 114: 'Agogo',
+ 115: 'Steel Drums',
+ 116: 'Woodblock',
+ 117: 'Taiko Drum',
+ 118: 'Melodic Tom',
+ 119: 'Synth Drum',
+ 120: 'Reverse Cymbal',
+ 121: 'Guitar Fret Noise',
+ 122: 'Breath Noise',
+ 123: 'Seashore',
+ 124: 'Bird Tweet',
+ 125: 'Telephone Ring',
+ 126: 'Helicopter',
+ 127: 'Applause',
+ 128: 'Gunshot',
+}
+
+drum_kit = {
+ 1: 'GM Standard Kit',
+ 9: 'GS Room Kit',
+ 17: 'GS Power Kit',
+ 25: 'GS Power Kit',
+ 26: 'GS TR-808 Kit',
+ 33: 'GS Jazz Kit',
+ 41: 'GS Brush Kit',
+ 49: 'GS Orchestra Kit',
+ 57: 'GS Sound FX Kit',
+ 128: 'GS CM-64/CM-32 Kit',
+}
+
+quarter_frame_type = {
+ 0: 'frame count LS nibble',
+ 1: 'frame count MS nibble',
+ 2: 'seconds count LS nibble',
+ 3: 'seconds count MS nibble',
+ 4: 'minutes count LS nibble',
+ 5: 'minutes count MS nibble',
+ 6: 'hours count LS nibble',
+ 7: 'hours count MS nibble and SMPTE type',
+}
+
+smpte_type = {
+ 0: '24 frames/second',
+ 1: '25 frames/second',
+ 2: '30 frames/second (drop-frame)',
+ 3: '30 frames/second (non-drop)',
+}
+
+chromatic_notes = {
+ 0: 'C-2',
+ 1: 'C#-2',
+ 2: 'D-2',
+ 3: 'D#-2',
+ 4: 'E-2',
+ 5: 'F-2',
+ 6: 'F#-2',
+ 7: 'G-2',
+ 8: 'G#-2',
+ 9: 'A-2',
+ 10: 'A#-2',
+ 11: 'B-2',
+ 12: 'C-1',
+ 13: 'C#-1',
+ 14: 'D-1',
+ 15: 'D#-1',
+ 16: 'E-1',
+ 17: 'F-1',
+ 18: 'F#-1',
+ 19: 'G-1',
+ 20: 'G#-1',
+ 21: 'A-1',
+ 22: 'A#-1',
+ 23: 'B-1',
+ 24: 'C0',
+ 25: 'C#0',
+ 26: 'D0',
+ 27: 'D#0',
+ 28: 'E0',
+ 29: 'F0',
+ 30: 'F#0',
+ 31: 'G0',
+ 32: 'G#0',
+ 33: 'A0',
+ 34: 'A#0',
+ 35: 'B0',
+ 36: 'C1',
+ 37: 'C#1',
+ 38: 'D1',
+ 39: 'D#1',
+ 40: 'E1',
+ 41: 'F1',
+ 42: 'F#1',
+ 43: 'G1',
+ 44: 'G#1',
+ 45: 'A1',
+ 46: 'A#1',
+ 47: 'B1',
+ 48: 'C2',
+ 49: 'C#2',
+ 50: 'D2',
+ 51: 'D#2',
+ 52: 'E2',
+ 53: 'F2',
+ 54: 'F#2',
+ 55: 'G2',
+ 56: 'G#2',
+ 57: 'A2',
+ 58: 'A#2',
+ 59: 'B2',
+ 60: 'C3',
+ 61: 'C#3',
+ 62: 'D3',
+ 63: 'D#3',
+ 64: 'E3',
+ 65: 'F3',
+ 66: 'F#3',
+ 67: 'G3',
+ 68: 'G#3',
+ 69: 'A3',
+ 70: 'A#3',
+ 71: 'B3',
+ 72: 'C4',
+ 73: 'C#4',
+ 74: 'D4',
+ 75: 'D#4',
+ 76: 'E4',
+ 77: 'F4',
+ 78: 'F#4',
+ 79: 'G4',
+ 80: 'G#4',
+ 81: 'A4',
+ 82: 'A#4',
+ 83: 'B4',
+ 84: 'C5',
+ 85: 'C#5',
+ 86: 'D5',
+ 87: 'D#5',
+ 88: 'E5',
+ 89: 'F5',
+ 90: 'F#5',
+ 91: 'G5',
+ 92: 'G#5',
+ 93: 'A5',
+ 94: 'A#5',
+ 95: 'B5',
+ 96: 'C6',
+ 97: 'C#6',
+ 98: 'D6',
+ 99: 'D#6',
+ 100: 'E6',
+ 101: 'F6',
+ 102: 'F#6',
+ 103: 'G6',
+ 104: 'G#6',
+ 105: 'A6',
+ 106: 'A#6',
+ 107: 'B6',
+ 108: 'C7',
+ 109: 'C#7',
+ 110: 'D7',
+ 111: 'D#7',
+ 112: 'E7',
+ 113: 'F7',
+ 114: 'F#7',
+ 115: 'G7',
+ 116: 'G#7',
+ 117: 'A7',
+ 118: 'A#7',
+ 119: 'B7',
+ 120: 'C8',
+ 121: 'C#8',
+ 122: 'D8',
+ 123: 'D#8',
+ 124: 'E8',
+ 125: 'F8',
+ 126: 'F#8',
+ 127: 'G8',
+}
+
+percussion_notes = {
+ 35: 'Acoustic Bass Drum',
+ 36: 'Bass Drum 1',
+ 37: 'Side Stick',
+ 38: 'Acoustic Snare',
+ 39: 'Hand Clap',
+ 40: 'Electric Snare',
+ 41: 'Low Floor Tom',
+ 42: 'Closed Hi Hat',
+ 43: 'High Floor Tom',
+ 44: 'Pedal Hi-Hat',
+ 45: 'Low Tom',
+ 46: 'Open Hi-Hat',
+ 47: 'Low-Mid Tom',
+ 48: 'Hi Mid Tom',
+ 49: 'Crash Cymbal 1',
+ 50: 'High Tom',
+ 51: 'Ride Cymbal 1',
+ 52: 'Chinese Cymbal',
+ 53: 'Ride Bell',
+ 54: 'Tambourine',
+ 55: 'Splash Cymbal',
+ 56: 'Cowbell',
+ 57: 'Crash Cymbal 2',
+ 58: 'Vibraslap',
+ 59: 'Ride Cymbal 2',
+ 60: 'Hi Bongo',
+ 61: 'Low Bongo',
+ 62: 'Mute Hi Conga',
+ 63: 'Open Hi Conga',
+ 64: 'Low Conga',
+ 65: 'High Timbale',
+ 66: 'Low Timbale',
+ 67: 'High Agogo',
+ 68: 'Low Agogo',
+ 69: 'Cabasa',
+ 70: 'Maracas',
+ 71: 'Short Whistle',
+ 72: 'Long Whistle',
+ 73: 'Short Guiro',
+ 74: 'Long Guiro',
+ 75: 'Claves',
+ 76: 'Hi Wood Block',
+ 77: 'Low Wood Block',
+ 78: 'Mute Cuica',
+ 79: 'Open Cuica',
+ 80: 'Mute Triangle',
+ 81: 'Open Triangle',
+}