]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/midi/lists.py
license: remove FSF postal address from boiler plate license text
[libsigrokdecode.git] / decoders / midi / lists.py
index a42388adea9cc17245587489869e8f334f5f85ed..1e6286151ba6a837200710da1b3636c2f843104c 100644 (file)
@@ -1,7 +1,8 @@
 ##
 ## This file is part of the libsigrokdecode project.
 ##
-## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2013-2016 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2016 Chris Dreher <chrisdreher@hotmail.com>
 ##
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -14,8 +15,7 @@
 ## GNU General Public License for more details.
 ##
 ## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
 ##
 
 # Each status byte has 3 string names, each shorter than the previous
@@ -24,7 +24,7 @@ status_bytes = {
     0x80: ['note off', 'note off', 'N off'],
     0x90: ['note on', 'note on', 'N on'], # However, velocity = 0 means "note off".
     0xa0: ['polyphonic key pressure / aftertouch', 'key pressure', 'KP' ],
-    0xb0: ['control change', 'ctl chg', 'CC'],
+    0xb0: ['control change', 'ctrl chg', 'CC'],
     0xc0: ['program change', 'prgm chg', 'PC'],
     0xd0: ['channel pressure / aftertouch', 'channel pressure', 'CP'],
     0xe0: ['pitch bend change', 'pitch bend', 'PB'],
@@ -37,22 +37,22 @@ status_bytes = {
 
     # System common messages
     0xf1: ['MIDI time code quarter frame', 'MIDI time code', 'MIDI time'],
-    0xf2: ['song position pointer', 'song position', 'position'],
-    0xf3: ['song select', 'song select', 'song select'],
+    0xf2: ['song position pointer', 'song position', 'song pos'],
+    0xf3: ['song select', 'song select', 'song sel'],
     0xf4: ['undefined 0xf4', 'undef 0xf4', 'undef'],
     0xf5: ['undefined 0xf5', 'undef 0xf5', 'undef'],
-    0xf6: ['tune request', 'tune request', 'tune request'],
+    0xf6: ['tune request', 'tune request', 'tune req'],
     0xf7: ['end of system exclusive (EOX)', 'end of SysEx', 'EOX'],
 
     # System real time messages
-    0xf8: ['timing clock', 'timing clock', 'timing clock'],
+    0xf8: ['timing clock', 'timing clock', 'clock'],
     0xf9: ['undefined 0xf9', 'undef 0xf9', 'undef'],
-    0xfa: ['start', 'start', 'start'],
-    0xfb: ['continue', 'continue', 'continue'],
-    0xfc: ['stop', 'stop', 'stop'],
+    0xfa: ['start', 'start', 's'],
+    0xfb: ['continue', 'continue', 'cont'],
+    0xfc: ['stop', 'stop', 'st'],
     0xfd: ['undefined 0xfd', 'undef 0xfd', 'undef'],
     0xfe: ['active sensing', 'active sensing', 'sensing'],
-    0xff: ['system reset', 'reset', 'reset'],
+    0xff: ['system reset', 'reset', 'rst'],
 }
 
 # Universal system exclusive (SysEx) messages, non-realtime (0x7e)
@@ -415,68 +415,68 @@ control_functions = {
     0x02: ['breath controller MSB', 'breath MSB', 'breath-M'],
     # 0x03: undefined MSB
     0x04: ['foot controller MSB', 'foot MSB', 'foot-M'],
-    0x05: ['portamento time MSB', 'portamento MSB', 'porta.-M'],
+    0x05: ['portamento time MSB', 'portamento MSB', 'porta-M'],
     0x06: ['data entry MSB', 'data entry MSB', 'data-M'],
     0x07: ['channel volume MSB (formerly main volume)', 'channel volume MSB', 'ch vol-M'],
     0x08: ['balance MSB', 'bal MSB', 'bal-M'],
     # 0x09: undefined MSB
     0x0a: ['pan MSB', 'pan MSB', 'pan-M'],
     0x0b: ['expression controller MSB', 'expression MSB', 'expr-M'],
-    0x0c: ['effect control 1 MSB', 'effect 1 MSB', 'effect-1-M'],
-    0x0d: ['effect control 2 MSB', 'effect 2 MSB', 'effect-2-M'],
+    0x0c: ['effect control 1 MSB', 'effect 1 MSB', 'eff-1-M'],
+    0x0d: ['effect control 2 MSB', 'effect 2 MSB', 'eff-2-M'],
     # 0x0e-0x0f: undefined MSB
-    0x10: ['general purpose controller 1 MSB', 'GP controller 1 MSB', 'GPC-1-M'],
-    0x11: ['general purpose controller 2 MSB', 'GP controller 2 MSB', 'GPC-2-M'],
-    0x12: ['general purpose controller 3 MSB', 'GP controller 3 MSB', 'GPC-3-M'],
-    0x13: ['general purpose controller 4 MSB', 'GP controller 4 MSB', 'GPC-4-M'],
+    0x10: ['general purpose controller 1 MSB', 'GP ctrl 1 MSB', 'GPC-1-M'],
+    0x11: ['general purpose controller 2 MSB', 'GP ctrl 2 MSB', 'GPC-2-M'],
+    0x12: ['general purpose controller 3 MSB', 'GP ctrl 3 MSB', 'GPC-3-M'],
+    0x13: ['general purpose controller 4 MSB', 'GP ctrl 4 MSB', 'GPC-4-M'],
     # 0x14-0x1f: undefined MSB
     0x20: ['bank select LSB', 'bank LSB', 'bank-L'],
     0x21: ['modulation wheel/lever LSB', 'modulation LSB', 'mod-L'],
     0x22: ['breath controller LSB', 'breath LSB', 'breath-L'],
     # 0x23: undefined LSB
     0x24: ['foot controller LSB', 'foot LSB', 'foot-L'],
-    0x25: ['portamento time LSB', 'portamento LSB', 'porta.-L'],
+    0x25: ['portamento time LSB', 'portamento LSB', 'porta-L'],
     0x26: ['data entry LSB', 'data entry LSB', 'data-L'],
     0x27: ['channel volume LSB (formerly main volume)', 'channel volume LSB', 'ch vol-L'],
     0x28: ['balance LSB', 'bal LSB', 'bal-L'],
     # 0x29: undefined LSB
     0x2a: ['pan LSB', 'pan LSB', 'pan-L'],
     0x2b: ['expression controller LSB', 'expression LSB', 'expr-L'],
-    0x2c: ['effect control 1 LSB', 'effect 1 LSB', 'effect-1-L'],
-    0x2d: ['effect control 2 LSB', 'effect 2 LSB', 'effect-2-L'],
+    0x2c: ['effect control 1 LSB', 'effect 1 LSB', 'eff-1-L'],
+    0x2d: ['effect control 2 LSB', 'effect 2 LSB', 'eff-2-L'],
     # 0x2e-0x2f: undefined LSB
-    0x30: ['general purpose controller 1 LSB', 'GP controller 1 LSB', 'GPC-1-L'],
-    0x31: ['general purpose controller 2 LSB', 'GP controller 2 LSB', 'GPC-2-L'],
-    0x32: ['general purpose controller 3 LSB', 'GP controller 3 LSB', 'GPC-3-L'],
-    0x33: ['general purpose controller 4 LSB', 'GP controller 4 LSB', 'GPC-4-L'],
+    0x30: ['general purpose controller 1 LSB', 'GP ctrl 1 LSB', 'GPC-1-L'],
+    0x31: ['general purpose controller 2 LSB', 'GP ctrl 2 LSB', 'GPC-2-L'],
+    0x32: ['general purpose controller 3 LSB', 'GP ctrl 3 LSB', 'GPC-3-L'],
+    0x33: ['general purpose controller 4 LSB', 'GP ctrl 4 LSB', 'GPC-4-L'],
     # 0x34-0x3f: undefined LSB
-    0x40: ['damper pedal (sustain)', 'sustain', 'sust.'],
-    0x41: ['portamento on/off', 'porta. on/off', 'porta. on/off'],
+    0x40: ['damper pedal (sustain)', 'sustain', 'sust'],
+    0x41: ['portamento on/off', 'porta on/off', 'porta on/off'],
     0x42: ['sostenuto', 'sostenuto', 'sostenuto'],
     0x43: ['soft pedal', 'soft pedal', 'soft pedal'],
-    0x44: ['legato footswitch', 'legato switch', 'legato?'], # vv: 00-3f = normal, 40-7f = legato
+    0x44: ['legato footswitch', 'legato switch', 'legato'], # vv: 00-3f = normal, 40-7f = legato
     0x45: ['hold 2', 'hold 2', 'hold 2'],
-    0x46: ['sound controller 1 (default: sound variation)', 'sound controller 1', 'snd cntlr 1'],
-    0x47: ['sound controller 2 (default: timbre / harmonic intensity)', 'sound controller 2', 'snd cntlr 2'],
-    0x48: ['sound controller 3 (default: release time)', 'sound controller 3', 'snd cntlr 3'],
-    0x49: ['sound controller 4 (default: attack time)', 'sound controller 4', 'snd cntlr 4'],
-    0x4a: ['sound controller 5 (default: brightness)', 'sound controller 5', 'snd cntlr 5'],
-    0x4b: ['sound controller 6 (GM2 default: decay time)', 'sound controller 6', 'snd cntlr 6'],
-    0x4c: ['sound controller 7 (GM2 default: vibrato rate)', 'sound controller 7', 'snd cntlr 7'],
-    0x4d: ['sound controller 8 (GM2 default: vibrato depth)', 'sound controller 8', 'snd cntlr 8'],
-    0x4e: ['sound controller 9 (GM2 default: vibrato delay)', 'sound controller 9', 'snd cntlr 9'],
-    0x4f: ['sound controller 10', 'sound controller 10', 'snd cntlr 10'],
+    0x46: ['sound controller 1 (default: sound variation)', 'sound ctrl 1', 'snd ctrl 1'],
+    0x47: ['sound controller 2 (default: timbre / harmonic intensity)', 'sound ctrl 2', 'snd ctrl 2'],
+    0x48: ['sound controller 3 (default: release time)', 'sound ctrl 3', 'snd ctrl 3'],
+    0x49: ['sound controller 4 (default: attack time)', 'sound ctrl 4', 'snd ctrl 4'],
+    0x4a: ['sound controller 5 (default: brightness)', 'sound ctrl 5', 'snd ctrl 5'],
+    0x4b: ['sound controller 6 (GM2 default: decay time)', 'sound ctrl 6', 'snd ctrl 6'],
+    0x4c: ['sound controller 7 (GM2 default: vibrato rate)', 'sound ctrl 7', 'snd ctrl 7'],
+    0x4d: ['sound controller 8 (GM2 default: vibrato depth)', 'sound ctrl 8', 'snd ctrl 8'],
+    0x4e: ['sound controller 9 (GM2 default: vibrato delay)', 'sound ctrl 9', 'snd ctrl 9'],
+    0x4f: ['sound controller 10', 'sound ctrl 10', 'snd ctrl 10'],
     0x50: ['general purpose controller 5', 'GP controller 5', 'GPC-5'],
     0x51: ['general purpose controller 6', 'GP controller 6', 'GPC-6'],
     0x52: ['general purpose controller 7', 'GP controller 7', 'GPC-7'],
     0x53: ['general purpose controller 8', 'GP controller 8', 'GPC-8'],
-    0x54: ['portamento control', 'portamento ctl', 'porta. ctl'],
+    0x54: ['portamento control', 'portamento ctrl', 'porta ctrl'],
     # 0x55-0x5a: undefined
-    0x5b: ['effects 1 depth (formerly external effects depth)', 'effects 1 depth', 'effects 1 depth'],
-    0x5c: ['effects 2 depth (formerly tremolo depth)', 'effects 2 depth', 'effects 2 depth'],
-    0x5d: ['effects 3 depth (formerly chorus depth)', 'effects 3 depth', 'effects 3 depth'],
-    0x5e: ['effects 4 depth (formerly celeste/detune depth)', 'effects 4 depth', 'effects 4 depth'],
-    0x5f: ['effects 5 depth (formerly phaser depth)', 'effects 5 depth', 'effects 5 depth'],
+    0x5b: ['effects 1 depth (formerly external effects depth)', 'effects 1 depth', 'eff 1 depth'],
+    0x5c: ['effects 2 depth (formerly tremolo depth)', 'effects 2 depth', 'eff 2 depth'],
+    0x5d: ['effects 3 depth (formerly chorus depth)', 'effects 3 depth', 'eff 3 depth'],
+    0x5e: ['effects 4 depth (formerly celeste/detune depth)', 'effects 4 depth', 'eff 4 depth'],
+    0x5f: ['effects 5 depth (formerly phaser depth)', 'effects 5 depth', 'eff 5 depth'],
     0x60: ['data increment', 'data inc', 'data++'],
     0x61: ['data decrement', 'data dec', 'data--'],
     0x62: ['Non-Registered Parameter Number LSB', 'NRPN LSB', 'NRPN-L'],
@@ -486,8 +486,8 @@ control_functions = {
     # 0x66-0x77: undefined
     # 0x78-0x7f: reserved for channel mode messages
     0x78: ['all sound off', 'all snd off', 'snd off'],
-    0x79: ['reset all controllers', 'reset all cntlrs', 'reset cntlrs'],
-    0x7a: ['local control', 'local cntl', 'local ctl'],
+    0x79: ['reset all controllers', 'reset all ctrls', 'reset ctrls'],
+    0x7a: ['local control', 'local ctrl', 'local ctrl'],
     0x7b: ['all notes off', 'notes off', 'notes off'],
     0x7c: ['omni mode off', 'omni off', 'omni off'], # all notes off
     0x7d: ['omni mode on', 'omni on', 'omni on'], # all notes off
@@ -659,134 +659,134 @@ smpte_type = {
 }
 
 chromatic_notes = {
-    0: 'C-2',
-    1: 'C#-2',
-    2: 'D-2',
-    3: 'D#-2',
-    4: 'E-2',
-    5: 'F-2',
-    6: 'F#-2',
-    7: 'G-2',
-    8: 'G#-2',
-    9: 'A-2',
-    10: 'A#-2',
-    11: 'B-2',
-    12: 'C-1',
-    13: 'C#-1',
-    14: 'D-1',
-    15: 'D#-1',
-    16: 'E-1',
-    17: 'F-1',
-    18: 'F#-1',
-    19: 'G-1',
-    20: 'G#-1',
-    21: 'A-1',
-    22: 'A#-1',
-    23: 'B-1',
-    24: 'C0',
-    25: 'C#0',
-    26: 'D0',
-    27: 'D#0',
-    28: 'E0',
-    29: 'F0',
-    30: 'F#0',
-    31: 'G0',
-    32: 'G#0',
-    33: 'A0',
-    34: 'A#0',
-    35: 'B0',
-    36: 'C1',
-    37: 'C#1',
-    38: 'D1',
-    39: 'D#1',
-    40: 'E1',
-    41: 'F1',
-    42: 'F#1',
-    43: 'G1',
-    44: 'G#1',
-    45: 'A1',
-    46: 'A#1',
-    47: 'B1',
-    48: 'C2',
-    49: 'C#2',
-    50: 'D2',
-    51: 'D#2',
-    52: 'E2',
-    53: 'F2',
-    54: 'F#2',
-    55: 'G2',
-    56: 'G#2',
-    57: 'A2',
-    58: 'A#2',
-    59: 'B2',
-    60: 'C3',
-    61: 'C#3',
-    62: 'D3',
-    63: 'D#3',
-    64: 'E3',
-    65: 'F3',
-    66: 'F#3',
-    67: 'G3',
-    68: 'G#3',
-    69: 'A3',
-    70: 'A#3',
-    71: 'B3',
-    72: 'C4',
-    73: 'C#4',
-    74: 'D4',
-    75: 'D#4',
-    76: 'E4',
-    77: 'F4',
-    78: 'F#4',
-    79: 'G4',
-    80: 'G#4',
-    81: 'A4',
-    82: 'A#4',
-    83: 'B4',
-    84: 'C5',
-    85: 'C#5',
-    86: 'D5',
-    87: 'D#5',
-    88: 'E5',
-    89: 'F5',
-    90: 'F#5',
-    91: 'G5',
-    92: 'G#5',
-    93: 'A5',
-    94: 'A#5',
-    95: 'B5',
-    96: 'C6',
-    97: 'C#6',
-    98: 'D6',
-    99: 'D#6',
-    100: 'E6',
-    101: 'F6',
-    102: 'F#6',
-    103: 'G6',
-    104: 'G#6',
-    105: 'A6',
-    106: 'A#6',
-    107: 'B6',
-    108: 'C7',
-    109: 'C#7',
-    110: 'D7',
-    111: 'D#7',
-    112: 'E7',
-    113: 'F7',
-    114: 'F#7',
-    115: 'G7',
-    116: 'G#7',
-    117: 'A7',
-    118: 'A#7',
-    119: 'B7',
-    120: 'C8',
-    121: 'C#8',
-    122: 'D8',
-    123: 'D#8',
-    124: 'E8',
-    125: 'F8',
-    126: 'F#8',
-    127: 'G8',
+    0: 'C-1',
+    1: 'C#-1',
+    2: 'D-1',
+    3: 'D#-1',
+    4: 'E-1',
+    5: 'F-1',
+    6: 'F#-1',
+    7: 'G-1',
+    8: 'G#-1',
+    9: 'A-1',
+    10: 'A#-1',
+    11: 'B-1',
+    12: 'C0',
+    13: 'C#0',
+    14: 'D0',
+    15: 'D#0',
+    16: 'E0',
+    17: 'F0',
+    18: 'F#0',
+    19: 'G0',
+    20: 'G#0',
+    21: 'A0',
+    22: 'A#0',
+    23: 'B0',
+    24: 'C1',
+    25: 'C#1',
+    26: 'D1',
+    27: 'D#1',
+    28: 'E1',
+    29: 'F1',
+    30: 'F#1',
+    31: 'G1',
+    32: 'G#1',
+    33: 'A1',
+    34: 'A#1',
+    35: 'B1',
+    36: 'C2',
+    37: 'C#2',
+    38: 'D2',
+    39: 'D#2',
+    40: 'E2',
+    41: 'F2',
+    42: 'F#2',
+    43: 'G2',
+    44: 'G#2',
+    45: 'A2',
+    46: 'A#2',
+    47: 'B2',
+    48: 'C3',
+    49: 'C#3',
+    50: 'D3',
+    51: 'D#3',
+    52: 'E3',
+    53: 'F3',
+    54: 'F#3',
+    55: 'G3',
+    56: 'G#3',
+    57: 'A3',
+    58: 'A#3',
+    59: 'B3',
+    60: 'C4',
+    61: 'C#4',
+    62: 'D4',
+    63: 'D#4',
+    64: 'E4',
+    65: 'F4',
+    66: 'F#4',
+    67: 'G4',
+    68: 'G#4',
+    69: 'A4',
+    70: 'A#4',
+    71: 'B4',
+    72: 'C5',
+    73: 'C#5',
+    74: 'D5',
+    75: 'D#5',
+    76: 'E5',
+    77: 'F5',
+    78: 'F#5',
+    79: 'G5',
+    80: 'G#5',
+    81: 'A5',
+    82: 'A#5',
+    83: 'B5',
+    84: 'C6',
+    85: 'C#6',
+    86: 'D6',
+    87: 'D#6',
+    88: 'E6',
+    89: 'F6',
+    90: 'F#6',
+    91: 'G6',
+    92: 'G#6',
+    93: 'A6',
+    94: 'A#6',
+    95: 'B6',
+    96: 'C7',
+    97: 'C#7',
+    98: 'D7',
+    99: 'D#7',
+    100: 'E7',
+    101: 'F7',
+    102: 'F#7',
+    103: 'G7',
+    104: 'G#7',
+    105: 'A7',
+    106: 'A#7',
+    107: 'B7',
+    108: 'C8',
+    109: 'C#8',
+    110: 'D8',
+    111: 'D#8',
+    112: 'E8',
+    113: 'F8',
+    114: 'F#8',
+    115: 'G8',
+    116: 'G#8',
+    117: 'A8',
+    118: 'A#8',
+    119: 'B8',
+    120: 'C9',
+    121: 'C#9',
+    122: 'D9',
+    123: 'D#9',
+    124: 'E9',
+    125: 'F9',
+    126: 'F#9',
+    127: 'G9',
 }
 
 percussion_notes = {