1 #ifndef MIDI_H 2 #define MIDI_H 3 4 5 /******************************************************************************* 6 * midi.h - Common MIDI declarations. 7 * 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2.1 of the License, or (at your option) any later version. 13 * 14 * This library 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 GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * 23 * Contact: jabberdabber@hotmail.com 24 * 25 * Last modified: 09/22/2003 26 ******************************************************************************/ 27 28 29 namespace midi 30 { 31 //---------------------------------------------------------------- 32 // Constants 33 //---------------------------------------------------------------- 34 35 36 // Status byte for Active Sensing message 37 const unsigned char ACTIVE_SENSING = 0xFE; 38 39 // Command value for Channel Pressure (Aftertouch) 40 const unsigned char CHANNEL_PRESSURE = 0xD0; 41 42 // Status byte for Continue message 43 const unsigned char CONTINUE = 0xFB; 44 45 // Command value for Control Change message 46 const unsigned char CONTROL_CHANGE = 0xB0; 47 48 // Status byte for System Exclusive message 49 const unsigned char SYSTEM_EXCLUSIVE = 0xF0; 50 51 // Status byte for End of System Exclusive message 52 const unsigned char END_OF_EXCLUSIVE = 0xF7; 53 54 // Status byte for MIDI Time Code Quarter Fram message 55 const unsigned char MIDI_TIME_CODE = 0xF1; 56 57 // Command value for Note Off message 58 const unsigned char NOTE_OFF = 0x80; 59 60 // Command value for Note On message 61 const unsigned char NOTE_ON = 0x90; 62 63 // Command value for Pitch Bend message 64 const unsigned char PITCH_BEND = 0xE0; 65 66 // Command value for Polyphonic Key Pressure (Aftertouch) 67 const unsigned char POLY_PRESSURE = 0xA0; 68 69 // Command value for Program Change message 70 const unsigned char PROGRAM_CHANGE = 0xC0; 71 72 // Status byte for Song Position Pointer message 73 const unsigned char SONG_POSITION_POINTER = 0xF2; 74 75 // Status byte for MIDI Song Select message 76 const unsigned char SONG_SELECT = 0xF3; 77 78 // Status byte for Start message 79 const unsigned char START = 0xFA; 80 81 // Status byte for Stop message 82 const unsigned char STOP = 0xFC; 83 84 // Status byte for System Reset message 85 const unsigned char SYSTEM_RESET = 0xFF; 86 87 // Status byte for Timing Clock message 88 const unsigned char TIMING_CLOCK = 0xF8; 89 90 // Status byte for Tune Request message 91 const unsigned char TUNE_REQUEST = 0xF6; 92 93 // 94 // For unpacking and packing short messages 95 // 96 const unsigned char SHORT_MSG_MASK = 15; 97 const unsigned char SHORT_MSG_SHIFT = 8; 98 } 99 100 101 #endif 102 103