]> sigrok.org Git - libsigrokdecode.git/blob - decoders/midi/lists.py
bc0f9b8ab5c59582ea335eb4c071501dbc9ee83b
[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',
42     0xf5: 'undefined',
43     0xf6: 'tune request',
44     0xf7: 'end of system exclusive (EOX)',
45
46     # System real time messages
47     0xf8: 'timing clock',
48     0xf9: 'undefined',
49     0xfa: 'start',
50     0xfb: 'continue',
51     0xfc: 'stop',
52     0xfd: 'undefined',
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
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
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
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
404 control_functions = {
405     0x00: 'bank select',
406     0x01: 'modulation wheel/lever',
407     0x02: 'breath controller',
408     # 0x03: undefined
409     0x04: 'foot controller',
410     0x05: 'portamento time',
411     0x06: 'data entry MSB',
412     0x07: 'channel volume (formerly main volume)',
413     0x08: 'balance',
414     # 0x09: undefined
415     0x0a: 'pan',
416     0x0b: 'expression controller',
417     0x0c: 'effect control 1',
418     0x0d: 'effect control 2',
419     # 0x0e-0x0f: undefined
420     0x10: 'general purpose controller 1',
421     0x11: 'general purpose controller 2',
422     0x12: 'general purpose controller 3',
423     0x13: 'general purpose controller 4',
424     # 0x14-0x1f: undefined
425     # 0x20-0x3f: LSB for values 0x00-0x1f
426     0x40: 'damper pedal (sustain)',
427     0x41: 'portamento on/off',
428     0x42: 'sostenuto',
429     0x43: 'soft pedal',
430     0x44: 'legato footswitch', # vv: 00-3f = normal, 40-7f = legato
431     0x45: 'hold 2',
432     0x46: 'sound controller 1 (default: sound variation)',
433     0x47: 'sound controller 2 (default: timbre / harmonic intensity)',
434     0x48: 'sound controller 3 (default: release time)',
435     0x49: 'sound controller 4 (default: attack time)',
436     0x4a: 'sound controller 5 (default: brightness)',
437     0x4b: 'sound controller 6 (GM2 default: decay time)',
438     0x4c: 'sound controller 7 (GM2 default: vibrato rate)',
439     0x4d: 'sound controller 8 (GM2 default: vibrato depth)',
440     0x4e: 'sound controller 9 (GM2 default: vibrato delay)',
441     0x4f: 'sound controller 10',
442     0x50: 'general purpose controller 5',
443     0x51: 'general purpose controller 6',
444     0x52: 'general purpose controller 7',
445     0x53: 'general purpose controller 8',
446     0x54: 'portamento control',
447     # 0x55-0x5a: undefined
448     0x5b: 'effects 1 depth (formerly external effects depth)',
449     0x5c: 'effects 2 depth (formerly tremolo depth)',
450     0x5d: 'effects 3 depth (formerly chorus depth)',
451     0x5e: 'effects 4 depth (formerly celeste/detune depth)',
452     0x5f: 'effects 5 depth (formerly phaser depth)',
453     0x60: 'data increment',
454     0x61: 'data decrement',
455     0x62: 'non-registered parameter number LSB',
456     0x63: 'non-registered parameter number MSB',
457     0x64: 'registered parameter number LSB',
458     0x65: 'registered parameter number MSB',
459     # 0x66-0x77: undefined
460     # 0x78-0x7f: reserved for channel mode messages
461     0x78: 'all sound off',
462     0x79: 'reset all controllers',
463     0x7a: 'local control on/off',
464     0x7b: 'all notes off',
465     0x7c: 'omni mode off', # all notes off
466     0x7d: 'omni mode on', # all notes off
467     0x7e: 'poly mode off', # mono mode on, all notes off
468     0x7f: 'poly mode on', # mono mode off, all notes off
469 }
470