1 2 #ifndef _MIDI2_DEFS_H 3 #define _MIDI2_DEFS_H 4 5 #include <OS.h> 6 #include <Errors.h> 7 8 #ifndef _MIDI_CONSTANTS_ 9 #define _MIDI_CONSTANTS_ 10 11 /* Channel Message Masks */ 12 const uchar B_NOTE_OFF = 0x80; 13 const uchar B_NOTE_ON = 0x90; 14 const uchar B_KEY_PRESSURE = 0xa0; 15 const uchar B_CONTROL_CHANGE = 0xb0; 16 const uchar B_PROGRAM_CHANGE = 0xc0; 17 const uchar B_CHANNEL_PRESSURE = 0xd0; 18 const uchar B_PITCH_BEND = 0xe0; 19 20 /* System Messages */ 21 const uchar B_SYS_EX_START = 0xf0; 22 const uchar B_MIDI_TIME_CODE = 0xf1; 23 const uchar B_SONG_POSITION = 0xf2; 24 const uchar B_SONG_SELECT = 0xf3; 25 const uchar B_CABLE_MESSAGE = 0xf5; 26 const uchar B_TUNE_REQUEST = 0xf6; 27 const uchar B_SYS_EX_END = 0xf7; 28 const uchar B_TIMING_CLOCK = 0xf8; 29 const uchar B_START = 0xfa; 30 const uchar B_CONTINUE = 0xfb; 31 const uchar B_STOP = 0xfc; 32 const uchar B_ACTIVE_SENSING = 0xfe; 33 const uchar B_SYSTEM_RESET = 0xff; 34 35 /* Controller Numbers */ 36 const uchar B_MODULATION = 0x01; 37 const uchar B_BREATH_CONTROLLER = 0x02; 38 const uchar B_FOOT_CONTROLLER = 0x04; 39 const uchar B_PORTAMENTO_TIME = 0x05; 40 const uchar B_DATA_ENTRY = 0x06; 41 const uchar B_MAIN_VOLUME = 0x07; 42 const uchar B_MIDI_BALANCE = 0x08; 43 const uchar B_PAN = 0x0a; 44 const uchar B_EXPRESSION_CTRL = 0x0b; 45 const uchar B_GENERAL_CTRL_1 = 0x10; 46 const uchar B_GENERAL_CTRL_2 = 0x11; 47 const uchar B_GENERAL_CTRL_3 = 0x12; 48 const uchar B_GENERAL_CTRL_4 = 0x13; 49 const uchar B_SUSTAIN_PEDAL = 0x40; 50 const uchar B_PORTAMENTO = 0x41; 51 const uchar B_SOSTENUTO = 0x42; 52 const uchar B_SOFT_PEDAL = 0x43; 53 const uchar B_HOLD_2 = 0x45; 54 const uchar B_GENERAL_CTRL_5 = 0x50; 55 const uchar B_GENERAL_CTRL_6 = 0x51; 56 const uchar B_TEMPO_CHANGE = 0x51; 57 const uchar B_GENERAL_CTRL_7 = 0x52; 58 const uchar B_GENERAL_CTRL_8 = 0x53; 59 const uchar B_EFFECTS_DEPTH = 0x5b; 60 const uchar B_TREMOLO_DEPTH = 0x5c; 61 const uchar B_CHORUS_DEPTH = 0x5d; 62 const uchar B_CELESTE_DEPTH = 0x5e; 63 const uchar B_PHASER_DEPTH = 0x5f; 64 const uchar B_DATA_INCREMENT = 0x60; 65 const uchar B_DATA_DECREMENT = 0x61; 66 const uchar B_RESET_ALL_CONTROLLERS = 0x79; 67 const uchar B_LOCAL_CONTROL = 0x7a; 68 const uchar B_ALL_NOTES_OFF = 0x7b; 69 const uchar B_OMNI_MODE_OFF = 0x7c; 70 const uchar B_OMNI_MODE_ON = 0x7d; 71 const uchar B_MONO_MODE_ON = 0x7e; 72 const uchar B_POLY_MODE_ON = 0x7f; 73 74 #endif // _MIDI_CONSTANTS_ 75 76 #endif // _MIDI2_DEFS_H 77