]> sigrok.org Git - libsigrokdecode.git/blob - decoders/midi/lists.py
dc728a9d12a68fac6c7816b4e3dde9ce3103aa27
[libsigrokdecode.git] / decoders / midi / lists.py
1 ##
2 ## This file is part of the libsigrokdecode project.
3 ##
4 ## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 status_bytes = {
22     # Channel voice messages
23     0x80: 'note off',
24     0x90: 'note on', # However, velocity = 0 means "note off".
25     0xa0: 'polyphonic key pressure / aftertouch',
26     0xb0: 'control change',
27     0xc0: 'program change',
28     0xd0: 'channel pressure / aftertouch',
29     0xe0: 'pitch bend change',
30
31     # Channel mode messages
32     # 0xb0: 'select channel mode', # Note: Same as 'control change'.
33
34     # System exclusive messages
35     0xf0: 'system exclusive (SysEx)',
36
37     # System common messages
38     0xf1: 'MIDI time code quarter frame',
39     0xf2: 'song position pointer',
40     0xf3: 'song select',
41     0xf4: 'undefined 0xf4',
42     0xf5: 'undefined 0xf5',
43     0xf6: 'tune request',
44     0xf7: 'end of system exclusive (EOX)',
45
46     # System real time messages
47     0xf8: 'timing clock',
48     0xf9: 'undefined 0xf9',
49     0xfa: 'start',
50     0xfb: 'continue',
51     0xfc: 'stop',
52     0xfd: 'undefined 0xfd',
53     0xfe: 'active sensing',
54     0xff: 'system reset',
55 }
56
57 # Universal system exclusive (SysEx) messages, non-realtime (0x7e)
58 universal_sysex_nonrealtime = {
59     (0x00, None): 'unused',
60     (0x01, None): 'sample dump header',
61     (0x02, None): 'sample data packet',
62     (0x03, None): 'sample dump request',
63
64     (0x04, None): 'MIDI time code',
65     (0x04, 0x00): 'special',
66     (0x04, 0x01): 'punch in points',
67     (0x04, 0x02): 'punch out points',
68     (0x04, 0x03): 'delete punch in point',
69     (0x04, 0x04): 'delete punch out point',
70     (0x04, 0x05): 'event start point',
71     (0x04, 0x06): 'event stop point',
72     (0x04, 0x07): 'event start points with additional info',
73     (0x04, 0x08): 'event stop points with additional info',
74     (0x04, 0x09): 'delete event start point',
75     (0x04, 0x0a): 'delete event stop point',
76     (0x04, 0x0b): 'cue points',
77     (0x04, 0x0c): 'cue points with additional info',
78     (0x04, 0x0d): 'delete cue point',
79     (0x04, 0x0e): 'event name in additional info',
80
81     (0x05, None): 'sample dump extensions',
82     (0x05, 0x01): 'multiple loop points',
83     (0x05, 0x02): 'loop points request',
84
85     (0x06, None): 'general information',
86     (0x06, 0x01): 'identity request',
87     (0x06, 0x02): 'identity reply',
88
89     (0x07, None): 'file dump',
90     (0x07, 0x01): 'header',
91     (0x07, 0x02): 'data packet',
92     (0x07, 0x03): 'request',
93
94     (0x08, None): 'MIDI tuning standard',
95     (0x08, 0x00): 'bulk dump request',
96     (0x08, 0x01): 'bulk dump reply',
97
98     (0x09, None): 'general MIDI',
99     (0x09, 0x01): 'general MIDI system on',
100     (0x09, 0x02): 'general MIDI system off',
101
102     (0x7b, None): 'end of file',
103     (0x7c, None): 'wait',
104     (0x7d, None): 'cancel',
105     (0x7e, None): 'nak',
106     (0x7f, None): 'ack',
107 }
108
109 # Universal system exclusive (SysEx) messages, realtime (0x7f)
110 universal_sysex_realtime = {
111     (0x00, None): 'unused',
112
113     (0x01, None): 'MIDI time code',
114     (0x01, 0x01): 'full message',
115     (0x01, 0x02): 'user bits',
116
117     (0x02, None): 'MIDI show control',
118     (0x02, 0x00): 'MSC extensions',
119     # (0x02, TODO): 'TODO', # 0x01 - 0x7f: MSC commands.
120
121     (0x03, None): 'notation information',
122     (0x03, 0x01): 'bar number',
123     (0x03, 0x02): 'time signature (immediate)',
124     (0x03, 0x42): 'time signature (delayed)',
125
126     (0x04, None): 'device control',
127     (0x04, 0x01): 'master volume',
128     (0x04, 0x02): 'master balance',
129
130     (0x05, None): 'real time MTC cueing',
131     (0x05, 0x00): 'special',
132     (0x05, 0x01): 'punch in points',
133     (0x05, 0x02): 'punch out points',
134     (0x05, 0x03): 'reserved',
135     (0x05, 0x04): 'reserved',
136     (0x05, 0x05): 'event start points',
137     (0x05, 0x06): 'event stop points',
138     (0x05, 0x07): 'event start points with additional info',
139     (0x05, 0x08): 'event stop points with additional info',
140     (0x05, 0x09): 'reserved',
141     (0x05, 0x0a): 'reserved',
142     (0x05, 0x0b): 'cue points',
143     (0x05, 0x0c): 'cue points with additional info',
144     (0x05, 0x0d): 'reserved',
145     (0x05, 0x0e): 'event name in additional info',
146
147     (0x06, None): 'MIDI machine control commands',
148     # (0x06, TODO): 'TODO', # 0x00 - 0x7f: MMC commands.
149
150     (0x07, None): 'MIDI machine control responses',
151     # (0x07, TODO): 'TODO', # 0x00 - 0x7f: MMC commands.
152
153     (0x08, None): 'MIDI tuning standard',
154     (0x85, 0x02): 'note change',
155 }
156
157 # Note: Not all IDs are used/listed, i.e. there are some "holes".
158 sysex_manufacturer_ids = {
159     # American group (range 01-1f, 000001-001f7f)
160     (0x01,): 'Sequential',
161     (0x02,): 'IDP',
162     (0x03,): 'Voyetra/Octave-Plateau',
163     (0x04,): 'Moog',
164     (0x05,): 'Passport Designs',
165     (0x06,): 'Lexicon',
166     (0x07,): 'Kurzweil',
167     (0x08,): 'Fender',
168     (0x09,): 'Gulbransen',
169     (0x0a,): 'AKG Acoustics',
170     (0x0b,): 'Voyce Music',
171     (0x0c,): 'Waveframe Corp',
172     (0x0d,): 'ADA Signal Processors',
173     (0x0e,): 'Garfield Electronics',
174     (0x0f,): 'Ensoniq',
175     (0x10,): 'Oberheim',
176     (0x11,): 'Apple Computer',
177     (0x12,): 'Grey Matter Response',
178     (0x13,): 'Digidesign',
179     (0x14,): 'Palm Tree Instruments',
180     (0x15,): 'JLCooper Electronics',
181     (0x16,): 'Lowrey',
182     (0x17,): 'Adams-Smith',
183     (0x18,): 'Emu Systems',
184     (0x19,): 'Harmony Systems',
185     (0x1a,): 'ART',
186     (0x1b,): 'Baldwin',
187     (0x1c,): 'Eventide',
188     (0x1d,): 'Inventronics',
189     (0x1f,): 'Clarity',
190
191     (0x00, 0x00, 0x01): 'Time Warner Interactive',
192     (0x00, 0x00, 0x07): 'Digital Music Corp.',
193     (0x00, 0x00, 0x08): 'IOTA Systems',
194     (0x00, 0x00, 0x09): 'New England Digital',
195     (0x00, 0x00, 0x0a): 'Artisyn',
196     (0x00, 0x00, 0x0b): 'IVL Technologies',
197     (0x00, 0x00, 0x0c): 'Southern Music Systems',
198     (0x00, 0x00, 0x0d): 'Lake Butler Sound Company',
199     (0x00, 0x00, 0x0e): 'Alesis',
200     (0x00, 0x00, 0x10): 'DOD Electronics',
201     (0x00, 0x00, 0x11): 'Studer-Editech',
202     (0x00, 0x00, 0x14): 'Perfect Fretworks',
203     (0x00, 0x00, 0x15): 'KAT',
204     (0x00, 0x00, 0x16): 'Opcode',
205     (0x00, 0x00, 0x17): 'Rane Corp.',
206     (0x00, 0x00, 0x18): 'Anadi Inc.',
207     (0x00, 0x00, 0x19): 'KMX',
208     (0x00, 0x00, 0x1a): 'Allen & Heath Brenell',
209     (0x00, 0x00, 0x1b): 'Peavy Electronics',
210     (0x00, 0x00, 0x1c): '360 Systems',
211     (0x00, 0x00, 0x1d): 'Spectrum Design and Development',
212     (0x00, 0x00, 0x1e): 'Marquis Music',
213     (0x00, 0x00, 0x1f): 'Zeta Systems',
214
215     (0x00, 0x00, 0x20): 'Axxes',
216     (0x00, 0x00, 0x21): 'Orban',
217     (0x00, 0x00, 0x24): 'KTI',
218     (0x00, 0x00, 0x25): 'Breakaway Technologies',
219     (0x00, 0x00, 0x26): 'CAE',
220     (0x00, 0x00, 0x29): 'Rocktron Corp.',
221     (0x00, 0x00, 0x2a): 'PianoDisc',
222     (0x00, 0x00, 0x2b): 'Cannon Research Group',
223     (0x00, 0x00, 0x2d): 'Rogers Instrument Corp.',
224     (0x00, 0x00, 0x2e): 'Blue Sky Logic',
225     (0x00, 0x00, 0x2f): 'Encore Electronics',
226
227     (0x00, 0x00, 0x30): 'Uptown',
228     (0x00, 0x00, 0x31): 'Voce',
229     (0x00, 0x00, 0x32): 'CTI Audio, Inc. (Music. Intel Dev.)',
230     (0x00, 0x00, 0x33): 'S&S Research',
231     (0x00, 0x00, 0x34): 'Broderbund Software, Inc.',
232     (0x00, 0x00, 0x35): 'Allen Organ Co.',
233     (0x00, 0x00, 0x37): 'Music Quest',
234     (0x00, 0x00, 0x38): 'APHEX',
235     (0x00, 0x00, 0x39): 'Gallien Krueger',
236     (0x00, 0x00, 0x3a): 'IBM',
237     (0x00, 0x00, 0x3c): 'Hotz Instruments Technologies',
238     (0x00, 0x00, 0x3d): 'ETA Lighting',
239     (0x00, 0x00, 0x3e): 'NSI Corporation',
240     (0x00, 0x00, 0x3f): 'Ad Lib, Inc.',
241
242     (0x00, 0x00, 0x40): 'Richmond Sound Design',
243     (0x00, 0x00, 0x41): 'Microsoft',
244     (0x00, 0x00, 0x42): 'The Software Toolworks',
245     (0x00, 0x00, 0x43): 'Niche/RJMG',
246     (0x00, 0x00, 0x44): 'Intone',
247     (0x00, 0x00, 0x47): 'GT Electronics / Groove Tubes',
248     (0x00, 0x00, 0x49): 'Timeline Vista',
249     (0x00, 0x00, 0x4a): 'Mesa Boogie',
250     (0x00, 0x00, 0x4c): 'Sequoia Development',
251     (0x00, 0x00, 0x4d): 'Studio Electronics',
252     (0x00, 0x00, 0x4e): 'Euphonix',
253     (0x00, 0x00, 0x4f): 'InterMIDI, Inc.',
254
255     (0x00, 0x00, 0x50): 'MIDI Solutions',
256     (0x00, 0x00, 0x51): '3DO Company',
257     (0x00, 0x00, 0x52): 'Lightwave Research',
258     (0x00, 0x00, 0x53): 'Micro-W',
259     (0x00, 0x00, 0x54): 'Spectral Synthesis',
260     (0x00, 0x00, 0x55): 'Lone Wolf',
261     (0x00, 0x00, 0x56): 'Studio Technologies',
262     (0x00, 0x00, 0x57): 'Peterson EMP',
263     (0x00, 0x00, 0x58): 'Atari',
264     (0x00, 0x00, 0x59): 'Marion Systems',
265     (0x00, 0x00, 0x5a): 'Design Event',
266     (0x00, 0x00, 0x5b): 'Winjammer Software',
267     (0x00, 0x00, 0x5c): 'AT&T Bell Labs',
268     (0x00, 0x00, 0x5e): 'Symetrix',
269     (0x00, 0x00, 0x5f): 'MIDI the World',
270
271     (0x00, 0x00, 0x60): 'Desper Products',
272     (0x00, 0x00, 0x61): 'Micros\'N MIDI',
273     (0x00, 0x00, 0x62): 'Accordians Intl',
274     (0x00, 0x00, 0x63): 'EuPhonics',
275     (0x00, 0x00, 0x64): 'Musonix',
276     (0x00, 0x00, 0x65): 'Turtle Beach Systems',
277     (0x00, 0x00, 0x66): 'Mackie Designs',
278     (0x00, 0x00, 0x67): 'Compuserve',
279     (0x00, 0x00, 0x68): 'BES Technologies',
280     (0x00, 0x00, 0x69): 'QRS Music Rolls',
281     (0x00, 0x00, 0x6a): 'P G Music',
282     (0x00, 0x00, 0x6b): 'Sierra Semiconductor',
283     (0x00, 0x00, 0x6c): 'EpiGraf Audio Visual',
284     (0x00, 0x00, 0x6d): 'Electronics Deiversified',
285     (0x00, 0x00, 0x6e): 'Tune 1000',
286     (0x00, 0x00, 0x6f): 'Advanced Micro Devices',
287
288     (0x00, 0x00, 0x70): 'Mediamation',
289     (0x00, 0x00, 0x71): 'Sabine Music',
290     (0x00, 0x00, 0x72): 'Woog Labs',
291     (0x00, 0x00, 0x73): 'Micropolis',
292     (0x00, 0x00, 0x74): 'Ta Horng Musical Inst.',
293     (0x00, 0x00, 0x75): 'eTek (formerly Forte)',
294     (0x00, 0x00, 0x76): 'Electrovoice',
295     (0x00, 0x00, 0x77): 'Midisoft',
296     (0x00, 0x00, 0x78): 'Q-Sound Labs',
297     (0x00, 0x00, 0x79): 'Westrex',
298     (0x00, 0x00, 0x7a): 'NVidia',
299     (0x00, 0x00, 0x7b): 'ESS Technology',
300     (0x00, 0x00, 0x7c): 'MediaTrix Peripherals',
301     (0x00, 0x00, 0x7d): 'Brooktree',
302     (0x00, 0x00, 0x7e): 'Otari',
303     (0x00, 0x00, 0x7f): 'Key Electronics',
304
305     (0x00, 0x01, 0x01): 'Crystalake Multimedia',
306     (0x00, 0x01, 0x02): 'Crystal Semiconductor',
307     (0x00, 0x01, 0x03): 'Rockwell Semiconductor',
308
309     # European group (range 20-3f, 002000-003f7f)
310     (0x20,): 'Passac',
311     (0x21,): 'SIEL',
312     (0x22,): 'Synthaxe',
313     (0x24,): 'Hohner',
314     (0x25,): 'Twister',
315     (0x26,): 'Solton',
316     (0x27,): 'Jellinghaus MS',
317     (0x28,): 'Southworth Music Systems',
318     (0x29,): 'PPG',
319     (0x2a,): 'JEN',
320     (0x2b,): 'SSL Limited',
321     (0x2c,): 'Audio Veritrieb',
322     (0x2f,): 'Elka',
323
324     (0x30,): 'Dynacord',
325     (0x31,): 'Viscount',
326     (0x33,): 'Clavia Digital Instruments',
327     (0x34,): 'Audio Architecture',
328     (0x35,): 'GeneralMusic Corp.',
329     (0x39,): 'Soundcraft Electronics',
330     (0x3b,): 'Wersi',
331     (0x3c,): 'Avab Elektronik Ab',
332     (0x3d,): 'Digigram',
333     (0x3e,): 'Waldorf Electronics',
334     (0x3f,): 'Quasimidi',
335
336     (0x00, 0x20, 0x00): 'Dream',
337     (0x00, 0x20, 0x01): 'Strand Lighting',
338     (0x00, 0x20, 0x02): 'Amek Systems',
339     (0x00, 0x20, 0x04): 'Böhm Electronic',
340     (0x00, 0x20, 0x06): 'Trident Audio',
341     (0x00, 0x20, 0x07): 'Real World Studio',
342     (0x00, 0x20, 0x09): 'Yes Technology',
343     (0x00, 0x20, 0x0a): 'Audiomatica',
344     (0x00, 0x20, 0x0b): 'Bontempi/Farfisa',
345     (0x00, 0x20, 0x0c): 'F.B.T. Elettronica',
346     (0x00, 0x20, 0x0d): 'MidiTemp',
347     (0x00, 0x20, 0x0e): 'LA Audio (Larking Audio)',
348     (0x00, 0x20, 0x0f): 'Zero 88 Lighting Limited',
349
350     (0x00, 0x20, 0x10): 'Micon Audio Electronics GmbH',
351     (0x00, 0x20, 0x11): 'Forefront Technology',
352     (0x00, 0x20, 0x13): 'Kenton Electronics',
353     (0x00, 0x20, 0x15): 'ADB',
354     (0x00, 0x20, 0x16): 'Marshall Products',
355     (0x00, 0x20, 0x17): 'DDA',
356     (0x00, 0x20, 0x18): 'BSS',
357     (0x00, 0x20, 0x19): 'MA Lighting Technology',
358     (0x00, 0x20, 0x1a): 'Fatar',
359     (0x00, 0x20, 0x1b): 'QSC Audio',
360     (0x00, 0x20, 0x1c): 'Artisan Classic Organ',
361     (0x00, 0x20, 0x1d): 'Orla Spa',
362     (0x00, 0x20, 0x1e): 'Pinnacle Audio',
363     (0x00, 0x20, 0x1f): 'TC Electronics',
364
365     (0x00, 0x20, 0x20): 'Doepfer Musikelektronik',
366     (0x00, 0x20, 0x21): 'Creative Technology Pte',
367     (0x00, 0x20, 0x22): 'Minami/Seiyddo',
368     (0x00, 0x20, 0x23): 'Goldstar',
369     (0x00, 0x20, 0x24): 'Midisoft s.a.s di M. Cima',
370     (0x00, 0x20, 0x25): 'Samick',
371     (0x00, 0x20, 0x26): 'Penny and Giles',
372     (0x00, 0x20, 0x27): 'Acorn Computer',
373     (0x00, 0x20, 0x28): 'LSC Electronics',
374     (0x00, 0x20, 0x29): 'Novation EMS',
375     (0x00, 0x20, 0x2a): 'Samkyung Mechatronics',
376     (0x00, 0x20, 0x2b): 'Medeli Electronics',
377     (0x00, 0x20, 0x2c): 'Charlie Lab',
378     (0x00, 0x20, 0x2d): 'Blue Chip Music Tech',
379     (0x00, 0x20, 0x2e): 'BEE OH Corp',
380
381     # Japanese group (range 40-5f, 004000-005f7f)
382     (0x40,): 'Kawai',
383     (0x41,): 'Roland',
384     (0x42,): 'Korg',
385     (0x43,): 'Yamaha',
386     (0x44,): 'Casio',
387     (0x46,): 'Kamiya Studio',
388     (0x47,): 'Akai',
389     (0x48,): 'Japan Victor',
390     (0x49,): 'Mesosha',
391     (0x4a,): 'Hoshino Gakki',
392     (0x4b,): 'Fujitsu Elect',
393     (0x4c,): 'Sony',
394     (0x4d,): 'Nisshin Onpa',
395     (0x4e,): 'TEAC',
396     (0x50,): 'Matsushita Electric',
397     (0x51,): 'Fostex',
398     (0x52,): 'Zoom',
399     (0x53,): 'Midori Electronics',
400     (0x54,): 'Matsushita Communication Industrial',
401     (0x55,): 'Suzuki Musical Inst. Mfg.',
402
403     # Other (range 60-7c, 006000-007f7f)
404
405     # Special (7d-7f)
406     (0x7d,): 'Non-Commercial',
407     (0x7e,): 'Universal Non-Realtime',
408     (0x7f,): 'Universal Realtime',
409 }
410
411 control_functions = {
412     0x00: 'bank select MSB',
413     0x01: 'modulation wheel/lever MSB',
414     0x02: 'breath controller MSB',
415     # 0x03: undefined MSB
416     0x04: 'foot controller MSB',
417     0x05: 'portamento time MSB',
418     0x06: 'data entry MSB',
419     0x07: 'channel volume MSB (formerly main volume)',
420     0x08: 'balance MSB',
421     # 0x09: undefined MSB
422     0x0a: 'pan MSB',
423     0x0b: 'expression controller MSB',
424     0x0c: 'effect control 1 MSB',
425     0x0d: 'effect control 2 MSB',
426     # 0x0e-0x0f: undefined MSB
427     0x10: 'general purpose controller 1 MSB',
428     0x11: 'general purpose controller 2 MSB',
429     0x12: 'general purpose controller 3 MSB',
430     0x13: 'general purpose controller 4 MSB',
431     # 0x14-0x1f: undefined MSB
432     0x20: 'bank select LSB',
433     0x21: 'modulation wheel/lever LSB',
434     0x22: 'breath controller LSB',
435     # 0x23: undefined LSB
436     0x24: 'foot controller LSB',
437     0x25: 'portamento time LSB',
438     0x26: 'data entry LSB',
439     0x27: 'channel volume LSB (formerly main volume)',
440     0x28: 'balance LSB',
441     # 0x29: undefined LSB
442     0x2a: 'pan LSB',
443     0x2b: 'expression controller LSB',
444     0x2c: 'effect control 1 LSB',
445     0x2d: 'effect control 2 LSB',
446     # 0x2e-0x2f: undefined LSB
447     0x30: 'general purpose controller 1 LSB',
448     0x31: 'general purpose controller 2 LSB',
449     0x32: 'general purpose controller 3 LSB',
450     0x33: 'general purpose controller 4 LSB',
451     # 0x34-0x3f: undefined LSB
452     0x40: 'damper pedal (sustain)',
453     0x41: 'portamento on/off',
454     0x42: 'sostenuto',
455     0x43: 'soft pedal',
456     0x44: 'legato footswitch', # vv: 00-3f = normal, 40-7f = legato
457     0x45: 'hold 2',
458     0x46: 'sound controller 1 (default: sound variation)',
459     0x47: 'sound controller 2 (default: timbre / harmonic intensity)',
460     0x48: 'sound controller 3 (default: release time)',
461     0x49: 'sound controller 4 (default: attack time)',
462     0x4a: 'sound controller 5 (default: brightness)',
463     0x4b: 'sound controller 6 (GM2 default: decay time)',
464     0x4c: 'sound controller 7 (GM2 default: vibrato rate)',
465     0x4d: 'sound controller 8 (GM2 default: vibrato depth)',
466     0x4e: 'sound controller 9 (GM2 default: vibrato delay)',
467     0x4f: 'sound controller 10',
468     0x50: 'general purpose controller 5',
469     0x51: 'general purpose controller 6',
470     0x52: 'general purpose controller 7',
471     0x53: 'general purpose controller 8',
472     0x54: 'portamento control',
473     # 0x55-0x5a: undefined
474     0x5b: 'effects 1 depth (formerly external effects depth)',
475     0x5c: 'effects 2 depth (formerly tremolo depth)',
476     0x5d: 'effects 3 depth (formerly chorus depth)',
477     0x5e: 'effects 4 depth (formerly celeste/detune depth)',
478     0x5f: 'effects 5 depth (formerly phaser depth)',
479     0x60: 'data increment',
480     0x61: 'data decrement',
481     0x62: 'Non-Registered Parameter Number LSB',
482     0x63: 'Non-Registered Parameter Number MSB',
483     0x64: 'Registered Parameter Number LSB',
484     0x65: 'Registered Parameter Number MSB',
485     # 0x66-0x77: undefined
486     # 0x78-0x7f: reserved for channel mode messages
487     0x78: 'all sound off',
488     0x79: 'reset all controllers',
489     0x7a: 'local control',
490     0x7b: 'all notes off',
491     0x7c: 'omni mode off', # all notes off
492     0x7d: 'omni mode on', # all notes off
493     0x7e: 'mono mode on', # mono mode on, all notes off
494     0x7f: 'poly mode on', # mono mode off, all notes off
495 }
496
497 gm_instruments = {
498     1:   'Acoustic Grand Piano',
499     2:   'Bright Acoustic Piano',
500     3:   'Electric Grand Piano',
501     4:   'Honky-tonk Piano',
502     5:   'Electric Piano 1',
503     6:   'Electric Piano 2',
504     7:   'Harpsichord',
505     8:   'Clavi',
506     9:   'Celesta',
507     10:  'Glockenspiel',
508     11:  'Music Box',
509     12:  'Vibraphone',
510     13:  'Marimba',
511     14:  'Xylophone',
512     15:  'Tubular Bells',
513     16:  'Dulcimer',
514     17:  'Drawbar Organ',
515     18:  'Percussive Organ',
516     19:  'Rock Organ',
517     20:  'Church Organ',
518     21:  'Reed Organ',
519     22:  'Accordion',
520     23:  'Harmonica',
521     24:  'Tango Accordion',
522     25:  'Acoustic Guitar (nylon)',
523     26:  'Acoustic Guitar (steel)',
524     27:  'Electric Guitar (jazz)',
525     28:  'Electric Guitar (clean)',
526     29:  'Electric Guitar (muted)',
527     30:  'Overdriven Guitar',
528     31:  'Distortion Guitar',
529     32:  'Guitar harmonics',
530     33:  'Acoustic Bass',
531     34:  'Electric Bass (finger)',
532     35:  'Electric Bass (pick)',
533     36:  'Fretless Bass',
534     37:  'Slap Bass 1',
535     38:  'Slap Bass 2',
536     39:  'Synth Bass 1',
537     40:  'Synth Bass 2',
538     41:  'Violin',
539     42:  'Viola',
540     43:  'Cello',
541     44:  'Contrabass',
542     45:  'Tremolo Strings',
543     46:  'Pizzicato Strings',
544     47:  'Orchestral Harp',
545     48:  'Timpani',
546     49:  'String Ensemble 1',
547     50:  'String Ensemble 2',
548     51:  'SynthStrings 1',
549     52:  'SynthStrings 2',
550     53:  'Choir Aahs',
551     54:  'Voice Oohs',
552     55:  'Synth Voice',
553     56:  'Orchestra Hit',
554     57:  'Trumpet',
555     58:  'Trombone',
556     59:  'Tuba',
557     60:  'Muted Trumpet',
558     61:  'French Horn',
559     62:  'Brass Section',
560     63:  'SynthBrass 1',
561     64:  'SynthBrass 2',
562     65:  'Soprano Sax',
563     66:  'Alto Sax',
564     67:  'Tenor Sax',
565     68:  'Baritone Sax',
566     69:  'Oboe',
567     70:  'English Horn',
568     71:  'Bassoon',
569     72:  'Clarinet',
570     73:  'Piccolo',
571     74:  'Flute',
572     75:  'Recorder',
573     76:  'Pan Flute',
574     77:  'Blown Bottle',
575     78:  'Shakuhachi',
576     79:  'Whistle',
577     80:  'Ocarina',
578     81:  'Lead 1 (square)',
579     82:  'Lead 2 (sawtooth)',
580     83:  'Lead 3 (calliope)',
581     84:  'Lead 4 (chiff)',
582     85:  'Lead 5 (charang)',
583     86:  'Lead 6 (voice)',
584     87:  'Lead 7 (fifths)',
585     88:  'Lead 8 (bass + lead)',
586     89:  'Pad 1 (new age)',
587     90:  'Pad 2 (warm)',
588     91:  'Pad 3 (polysynth)',
589     92:  'Pad 4 (choir)',
590     93:  'Pad 5 (bowed)',
591     94:  'Pad 6 (metallic)',
592     95:  'Pad 7 (halo)',
593     96:  'Pad 8 (sweep)',
594     97:  'FX 1 (rain)',
595     98:  'FX 2 (soundtrack)',
596     99:  'FX 3 (crystal)',
597     100: 'FX 4 (atmosphere)',
598     101: 'FX 5 (brightness)',
599     102: 'FX 6 (goblins)',
600     103: 'FX 7 (echoes)',
601     104: 'FX 8 (sci-fi)',
602     105: 'Sitar',
603     106: 'Banjo',
604     107: 'Shamisen',
605     108: 'Koto',
606     109: 'Kalimba',
607     110: 'Bag pipe',
608     111: 'Fiddle',
609     112: 'Shanai',
610     113: 'Tinkle Bell',
611     114: 'Agogo',
612     115: 'Steel Drums',
613     116: 'Woodblock',
614     117: 'Taiko Drum',
615     118: 'Melodic Tom',
616     119: 'Synth Drum',
617     120: 'Reverse Cymbal',
618     121: 'Guitar Fret Noise',
619     122: 'Breath Noise',
620     123: 'Seashore',
621     124: 'Bird Tweet',
622     125: 'Telephone Ring',
623     126: 'Helicopter',
624     127: 'Applause',
625     128: 'Gunshot',
626 }
627
628 drum_kit = {
629     1:   'GM Standard Kit',
630     9:   'GS Room Kit',
631     17:  'GS Power Kit',
632     25:  'GS Power Kit',
633     26:  'GS TR-808 Kit',
634     33:  'GS Jazz Kit',
635     41:  'GS Brush Kit',
636     49:  'GS Orchestra Kit',
637     57:  'GS Sound FX Kit',
638     128: 'GS CM-64/CM-32 Kit',
639 }
640
641 quarter_frame_type = {
642     0: 'frame count LS nibble',
643     1: 'frame count MS nibble',
644     2: 'seconds count LS nibble',
645     3: 'seconds count MS nibble',
646     4: 'minutes count LS nibble',
647     5: 'minutes count MS nibble',
648     6: 'hours count LS nibble',
649     7: 'hours count MS nibble and SMPTE type',
650 }
651
652 smpte_type = {
653     0: '24 frames/second',
654     1: '25 frames/second',
655     2: '30 frames/second (drop-frame)',
656     3: '30 frames/second (non-drop)',
657 }
658
659 chromatic_notes = {
660     0: 'C-2',
661     1: 'C#-2',
662     2: 'D-2',
663     3: 'D#-2',
664     4: 'E-2',
665     5: 'F-2',
666     6: 'F#-2',
667     7: 'G-2',
668     8: 'G#-2',
669     9: 'A-2',
670     10: 'A#-2',
671     11: 'B-2',
672     12: 'C-1',
673     13: 'C#-1',
674     14: 'D-1',
675     15: 'D#-1',
676     16: 'E-1',
677     17: 'F-1',
678     18: 'F#-1',
679     19: 'G-1',
680     20: 'G#-1',
681     21: 'A-1',
682     22: 'A#-1',
683     23: 'B-1',
684     24: 'C0',
685     25: 'C#0',
686     26: 'D0',
687     27: 'D#0',
688     28: 'E0',
689     29: 'F0',
690     30: 'F#0',
691     31: 'G0',
692     32: 'G#0',
693     33: 'A0',
694     34: 'A#0',
695     35: 'B0',
696     36: 'C1',
697     37: 'C#1',
698     38: 'D1',
699     39: 'D#1',
700     40: 'E1',
701     41: 'F1',
702     42: 'F#1',
703     43: 'G1',
704     44: 'G#1',
705     45: 'A1',
706     46: 'A#1',
707     47: 'B1',
708     48: 'C2',
709     49: 'C#2',
710     50: 'D2',
711     51: 'D#2',
712     52: 'E2',
713     53: 'F2',
714     54: 'F#2',
715     55: 'G2',
716     56: 'G#2',
717     57: 'A2',
718     58: 'A#2',
719     59: 'B2',
720     60: 'C3',
721     61: 'C#3',
722     62: 'D3',
723     63: 'D#3',
724     64: 'E3',
725     65: 'F3',
726     66: 'F#3',
727     67: 'G3',
728     68: 'G#3',
729     69: 'A3',
730     70: 'A#3',
731     71: 'B3',
732     72: 'C4',
733     73: 'C#4',
734     74: 'D4',
735     75: 'D#4',
736     76: 'E4',
737     77: 'F4',
738     78: 'F#4',
739     79: 'G4',
740     80: 'G#4',
741     81: 'A4',
742     82: 'A#4',
743     83: 'B4',
744     84: 'C5',
745     85: 'C#5',
746     86: 'D5',
747     87: 'D#5',
748     88: 'E5',
749     89: 'F5',
750     90: 'F#5',
751     91: 'G5',
752     92: 'G#5',
753     93: 'A5',
754     94: 'A#5',
755     95: 'B5',
756     96: 'C6',
757     97: 'C#6',
758     98: 'D6',
759     99: 'D#6',
760     100: 'E6',
761     101: 'F6',
762     102: 'F#6',
763     103: 'G6',
764     104: 'G#6',
765     105: 'A6',
766     106: 'A#6',
767     107: 'B6',
768     108: 'C7',
769     109: 'C#7',
770     110: 'D7',
771     111: 'D#7',
772     112: 'E7',
773     113: 'F7',
774     114: 'F#7',
775     115: 'G7',
776     116: 'G#7',
777     117: 'A7',
778     118: 'A#7',
779     119: 'B7',
780     120: 'C8',
781     121: 'C#8',
782     122: 'D8',
783     123: 'D#8',
784     124: 'E8',
785     125: 'F8',
786     126: 'F#8',
787     127: 'G8',
788 }
789
790 percussion_notes = {
791     35: 'Acoustic Bass Drum',
792     36: 'Bass Drum 1',
793     37: 'Side Stick',
794     38: 'Acoustic Snare',
795     39: 'Hand Clap',
796     40: 'Electric Snare',
797     41: 'Low Floor Tom',
798     42: 'Closed Hi Hat',
799     43: 'High Floor Tom',
800     44: 'Pedal Hi-Hat',
801     45: 'Low Tom',
802     46: 'Open Hi-Hat',
803     47: 'Low-Mid Tom',
804     48: 'Hi Mid Tom',
805     49: 'Crash Cymbal 1',
806     50: 'High Tom',
807     51: 'Ride Cymbal 1',
808     52: 'Chinese Cymbal',
809     53: 'Ride Bell',
810     54: 'Tambourine',
811     55: 'Splash Cymbal',
812     56: 'Cowbell',
813     57: 'Crash Cymbal 2',
814     58: 'Vibraslap',
815     59: 'Ride Cymbal 2',
816     60: 'Hi Bongo',
817     61: 'Low Bongo',
818     62: 'Mute Hi Conga',
819     63: 'Open Hi Conga',
820     64: 'Low Conga',
821     65: 'High Timbale',
822     66: 'Low Timbale',
823     67: 'High Agogo',
824     68: 'Low Agogo',
825     69: 'Cabasa',
826     70: 'Maracas',
827     71: 'Short Whistle',
828     72: 'Long Whistle',
829     73: 'Short Guiro',
830     74: 'Long Guiro',
831     75: 'Claves',
832     76: 'Hi Wood Block',
833     77: 'Low Wood Block',
834     78: 'Mute Cuica',
835     79: 'Open Cuica',
836     80: 'Mute Triangle',
837     81: 'Open Triangle',
838 }