1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
#ifndef __ALSA_SEQ_EVENT_H
#define __ALSA_SEQ_EVENT_H
typedef unsigned char snd_seq_event_type_t;
enum snd_seq_event_type {
SND_SEQ_EVENT_SYSTEM = 0,
SND_SEQ_EVENT_RESULT,
SND_SEQ_EVENT_NOTE = 5,
SND_SEQ_EVENT_NOTEON,
SND_SEQ_EVENT_NOTEOFF,
SND_SEQ_EVENT_KEYPRESS,
SND_SEQ_EVENT_CONTROLLER = 10,
SND_SEQ_EVENT_PGMCHANGE,
SND_SEQ_EVENT_CHANPRESS,
SND_SEQ_EVENT_PITCHBEND,
SND_SEQ_EVENT_CONTROL14,
SND_SEQ_EVENT_NONREGPARAM,
SND_SEQ_EVENT_REGPARAM,
SND_SEQ_EVENT_SONGPOS = 20,
SND_SEQ_EVENT_SONGSEL,
SND_SEQ_EVENT_QFRAME,
SND_SEQ_EVENT_TIMESIGN,
SND_SEQ_EVENT_KEYSIGN,
SND_SEQ_EVENT_START = 30,
SND_SEQ_EVENT_CONTINUE,
SND_SEQ_EVENT_STOP,
SND_SEQ_EVENT_SETPOS_TICK,
SND_SEQ_EVENT_SETPOS_TIME,
SND_SEQ_EVENT_TEMPO,
SND_SEQ_EVENT_CLOCK,
SND_SEQ_EVENT_TICK,
SND_SEQ_EVENT_QUEUE_SKEW,
SND_SEQ_EVENT_SYNC_POS,
SND_SEQ_EVENT_TUNE_REQUEST = 40,
SND_SEQ_EVENT_RESET,
SND_SEQ_EVENT_SENSING,
SND_SEQ_EVENT_ECHO = 50,
SND_SEQ_EVENT_OSS,
SND_SEQ_EVENT_CLIENT_START = 60,
SND_SEQ_EVENT_CLIENT_EXIT,
SND_SEQ_EVENT_CLIENT_CHANGE,
SND_SEQ_EVENT_PORT_START,
SND_SEQ_EVENT_PORT_EXIT,
SND_SEQ_EVENT_PORT_CHANGE,
SND_SEQ_EVENT_PORT_SUBSCRIBED,
SND_SEQ_EVENT_PORT_UNSUBSCRIBED,
SND_SEQ_EVENT_USR0 = 90,
SND_SEQ_EVENT_USR1,
SND_SEQ_EVENT_USR2,
SND_SEQ_EVENT_USR3,
SND_SEQ_EVENT_USR4,
SND_SEQ_EVENT_USR5,
SND_SEQ_EVENT_USR6,
SND_SEQ_EVENT_USR7,
SND_SEQ_EVENT_USR8,
SND_SEQ_EVENT_USR9,
SND_SEQ_EVENT_SYSEX = 130,
SND_SEQ_EVENT_BOUNCE,
SND_SEQ_EVENT_USR_VAR0 = 135,
SND_SEQ_EVENT_USR_VAR1,
SND_SEQ_EVENT_USR_VAR2,
SND_SEQ_EVENT_USR_VAR3,
SND_SEQ_EVENT_USR_VAR4,
SND_SEQ_EVENT_NONE = 255
};
typedef struct snd_seq_addr {
unsigned char client;
unsigned char port;
} snd_seq_addr_t;
typedef struct snd_seq_connect {
snd_seq_addr_t sender;
snd_seq_addr_t dest;
} snd_seq_connect_t;
typedef struct snd_seq_real_time {
unsigned int tv_sec;
unsigned int tv_nsec;
} snd_seq_real_time_t;
typedef unsigned int snd_seq_tick_time_t;
typedef union snd_seq_timestamp {
snd_seq_tick_time_t tick;
struct snd_seq_real_time time;
} snd_seq_timestamp_t;
#define SND_SEQ_TIME_STAMP_TICK (0<<0)
#define SND_SEQ_TIME_STAMP_REAL (1<<0)
#define SND_SEQ_TIME_STAMP_MASK (1<<0)
#define SND_SEQ_TIME_MODE_ABS (0<<1)
#define SND_SEQ_TIME_MODE_REL (1<<1)
#define SND_SEQ_TIME_MODE_MASK (1<<1)
#define SND_SEQ_EVENT_LENGTH_FIXED (0<<2)
#define SND_SEQ_EVENT_LENGTH_VARIABLE (1<<2)
#define SND_SEQ_EVENT_LENGTH_VARUSR (2<<2)
#define SND_SEQ_EVENT_LENGTH_MASK (3<<2)
#define SND_SEQ_PRIORITY_NORMAL (0<<4)
#define SND_SEQ_PRIORITY_HIGH (1<<4)
#define SND_SEQ_PRIORITY_MASK (1<<4)
typedef struct snd_seq_ev_note {
unsigned char channel;
unsigned char note;
unsigned char velocity;
unsigned char off_velocity;
unsigned int duration;
} snd_seq_ev_note_t;
typedef struct snd_seq_ev_ctrl {
unsigned char channel;
unsigned char unused[3];
unsigned int param;
signed int value;
} snd_seq_ev_ctrl_t;
typedef struct snd_seq_ev_raw8 {
unsigned char d[12];
} snd_seq_ev_raw8_t;
typedef struct snd_seq_ev_raw32 {
unsigned int d[3];
} snd_seq_ev_raw32_t;
struct snd_seq_ev_ext {
unsigned int len;
void *ptr;
} __attribute__((packed));
typedef struct snd_seq_ev_ext snd_seq_ev_ext_t;
#ifdef DOC_HIDDEN
typedef snd_seq_ev_ext snd_seq_ev_ext_t;
#endif
typedef struct snd_seq_result {
int event;
int result;
} snd_seq_result_t;
typedef struct snd_seq_queue_skew {
unsigned int value;
unsigned int base;
} snd_seq_queue_skew_t;
typedef struct snd_seq_ev_queue_control {
unsigned char queue;
unsigned char unused[3];
union {
signed int value;
snd_seq_timestamp_t time;
unsigned int position;
snd_seq_queue_skew_t skew;
unsigned int d32[2];
unsigned char d8[8];
} param;
} snd_seq_ev_queue_control_t;
typedef struct snd_seq_event {
snd_seq_event_type_t type;
unsigned char flags;
unsigned char tag;
unsigned char queue;
snd_seq_timestamp_t time;
snd_seq_addr_t source;
snd_seq_addr_t dest;
union {
snd_seq_ev_note_t note;
snd_seq_ev_ctrl_t control;
snd_seq_ev_raw8_t raw8;
snd_seq_ev_raw32_t raw32;
snd_seq_ev_ext_t ext;
snd_seq_ev_queue_control_t queue;
snd_seq_timestamp_t time;
snd_seq_addr_t addr;
snd_seq_connect_t connect;
snd_seq_result_t result;
} data;
} snd_seq_event_t;
#endif
|