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