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