r269@gandalf: fugalh | 2006-08-03 20:18:05 -0600
[ardour.git] / libs / midi++2 / midi++ / types.h
1 #ifndef __midi_types_h__
2 #define __midi_types_h__
3
4 namespace MIDI {
5
6         typedef char           channel_t;
7         typedef float controller_value_t;
8         typedef unsigned char  byte;
9         typedef unsigned short pitchbend_t;
10
11         enum eventType {
12             none = 0x0,
13             raw = 0xF4, /* undefined in MIDI spec */
14             any = 0xF5, /* undefined in MIDI spec */
15             off = 0x80,
16             on = 0x90,
17             controller = 0xB0,
18             program = 0xC0,
19             chanpress = 0xD0,
20             polypress = 0xA0,
21             pitchbend = 0xE0,
22             sysex = 0xF0,
23             mtc_quarter = 0xF1,
24             position = 0xF2,
25             song = 0xF3,
26             tune = 0xF6,
27             eox = 0xF7,
28             timing = 0xF8,
29             start = 0xFA,
30             contineu = 0xFB, /* note spelling */
31             stop = 0xFC,
32             active = 0xFE,
33             reset = 0xFF
34     };
35
36     extern const char *controller_names[];
37         byte decode_controller_name (const char *name);
38
39     struct EventTwoBytes {
40         union {
41             byte note_number;
42             byte controller_number;
43         };
44         union {
45             byte velocity;
46             byte value;
47         };
48     };
49
50     enum MTC_FPS {
51             MTC_24_FPS = 0,
52             MTC_25_FPS = 1,
53             MTC_30_FPS_DROP = 2,
54             MTC_30_FPS = 3
55     };
56
57     enum MTC_Status {
58             MTC_Stopped = 0,
59             MTC_Forward,
60             MTC_Backward
61     };
62
63 } // namespace MIDI
64
65 #endif // __midi_types_h__
66
67
68
69