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