1 //========================================================= 2 // MusE 3 // Linux Music Editor 4 // midictrl_consts.h 5 // 6 // (C) Copyright 1999-2003 Werner Schweer (ws@seh.de) 7 // (C) Copyright 2012 Tim E. Real (terminator356 on users dot sourceforge dot net) 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; version 2 of 12 // the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with this program; if not, write to the Free Software 21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 22 // 23 //========================================================= 24 25 #ifndef __MIDICTRL_CONSTS_H__ 26 #define __MIDICTRL_CONSTS_H__ 27 28 namespace MusECore { 29 30 const int CTRL_HBANK = 0x00; 31 const int CTRL_LBANK = 0x20; 32 33 const int CTRL_HDATA = 0x06; 34 const int CTRL_LDATA = 0x26; 35 36 const int CTRL_DATA_INC = 0x60; 37 const int CTRL_DATA_DEC = 0x61; 38 39 const int CTRL_HNRPN = 0x63; 40 const int CTRL_LNRPN = 0x62; 41 42 const int CTRL_HRPN = 0x65; 43 const int CTRL_LRPN = 0x64; 44 45 const int CTRL_MODULATION = 0x01; 46 const int CTRL_PORTAMENTO_TIME = 0x05; 47 const int CTRL_VOLUME = 0x07; 48 const int CTRL_PANPOT = 0x0a; 49 const int CTRL_EXPRESSION = 0x0b; 50 const int CTRL_SUSTAIN = 0x40; 51 const int CTRL_PORTAMENTO = 0x41; 52 const int CTRL_SOSTENUTO = 0x42; 53 const int CTRL_SOFT_PEDAL = 0x43; 54 const int CTRL_HARMONIC_CONTENT = 0x47; 55 const int CTRL_RELEASE_TIME = 0x48; 56 const int CTRL_ATTACK_TIME = 0x49; 57 58 const int CTRL_BRIGHTNESS = 0x4a; 59 const int CTRL_PORTAMENTO_CONTROL = 0x54; 60 const int CTRL_REVERB_SEND = 0x5b; 61 const int CTRL_CHORUS_SEND = 0x5d; 62 const int CTRL_VARIATION_SEND = 0x5e; 63 64 // Channel Mode controllers: 65 // Same as other 7-bit controllers, but "implements Mode control and 66 // special message by using reserved controller numbers 120-127" (MMA). 67 // 68 const int CTRL_ALL_SOUNDS_OFF = 0x78; // 120 69 const int CTRL_RESET_ALL_CTRL = 0x79; // 121 70 const int CTRL_LOCAL_OFF = 0x7a; // 122 71 const int CTRL_ALL_NOTES_OFF = 0x7b; // 123 72 const int CTRL_OMNI_MODE_OFF = 0x7c; // 124 All notes off as well. 73 const int CTRL_OMNI_MODE_ON = 0x7d; // 125 All notes off as well. 74 const int CTRL_MONO_MODE_ON = 0x7e; // 126 All notes off as well. 75 const int CTRL_POLY_MODE_ON = 0x7f; // 127 All notes off as well. 76 77 78 // controller types 0x10000 - 0x1ffff are 14 bit controller with 79 // 0x1xxyy 80 // xx - MSB controller 81 // yy - LSB controller 82 83 // RPN - registered parameter numbers 0x20000 - 84 // NRPN - non registered parameter numbers 0x30000 - 85 86 // internal controller types: 87 const int CTRL_INTERNAL_OFFSET = 0x40000; 88 89 const int CTRL_PITCH = CTRL_INTERNAL_OFFSET; 90 const int CTRL_PROGRAM = CTRL_INTERNAL_OFFSET + 0x01; 91 const int CTRL_VELOCITY = CTRL_INTERNAL_OFFSET + 0x02; 92 const int CTRL_MASTER_VOLUME = CTRL_INTERNAL_OFFSET + 0x03; 93 const int CTRL_AFTERTOUCH = CTRL_INTERNAL_OFFSET + 0x04; 94 // NOTE: The range from CTRL_INTERNAL_OFFSET + 0x100 to CTRL_INTERNAL_OFFSET + 0x1ff is reserved 95 // for this control. (The low byte is reserved because this is a per-note control.) 96 const int CTRL_POLYAFTER = CTRL_INTERNAL_OFFSET + 0x1FF; // 100 to 1FF ! 97 98 const int CTRL_VAL_UNKNOWN = 0x10000000; // used as unknown hwVal 99 const int CTRL_PROGRAM_VAL_DONT_CARE = 0xffffff; // High-bank, low-bank, and program are all 0xff don't care. 100 101 const int CTRL_7_OFFSET = 0x00000; 102 const int CTRL_14_OFFSET = 0x10000; 103 const int CTRL_RPN_OFFSET = 0x20000; 104 const int CTRL_NRPN_OFFSET = 0x30000; 105 const int CTRL_RPN14_OFFSET = 0x50000; 106 const int CTRL_NRPN14_OFFSET = 0x60000; 107 const int CTRL_NONE_OFFSET = 0x70000; 108 109 const int CTRL_OFFSET_MASK = 0xf0000; 110 111 } // namespace MusECore 112 113 #endif 114 115 116