Mercurial > hg > svcore
comparison plugin/api/alsa/seq_event.h @ 1527:710e6250a401 zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 17 Sep 2018 13:51:14 +0100 |
parents | 48e9f538e6e9 |
children |
comparison
equal
deleted
inserted
replaced
1324:d4a28d1479a8 | 1527:710e6250a401 |
---|---|
46 */ | 46 */ |
47 typedef unsigned char snd_seq_event_type_t; | 47 typedef unsigned char snd_seq_event_type_t; |
48 | 48 |
49 /** Sequencer event type */ | 49 /** Sequencer event type */ |
50 enum snd_seq_event_type { | 50 enum snd_seq_event_type { |
51 /** system status; event data type = #snd_seq_result_t */ | 51 /** system status; event data type = #snd_seq_result_t */ |
52 SND_SEQ_EVENT_SYSTEM = 0, | 52 SND_SEQ_EVENT_SYSTEM = 0, |
53 /** returned result status; event data type = #snd_seq_result_t */ | 53 /** returned result status; event data type = #snd_seq_result_t */ |
54 SND_SEQ_EVENT_RESULT, | 54 SND_SEQ_EVENT_RESULT, |
55 | 55 |
56 /** note on and off with duration; event data type = #snd_seq_ev_note_t */ | 56 /** note on and off with duration; event data type = #snd_seq_ev_note_t */ |
57 SND_SEQ_EVENT_NOTE = 5, | 57 SND_SEQ_EVENT_NOTE = 5, |
58 /** note on; event data type = #snd_seq_ev_note_t */ | 58 /** note on; event data type = #snd_seq_ev_note_t */ |
59 SND_SEQ_EVENT_NOTEON, | 59 SND_SEQ_EVENT_NOTEON, |
60 /** note off; event data type = #snd_seq_ev_note_t */ | 60 /** note off; event data type = #snd_seq_ev_note_t */ |
61 SND_SEQ_EVENT_NOTEOFF, | 61 SND_SEQ_EVENT_NOTEOFF, |
62 /** key pressure change (aftertouch); event data type = #snd_seq_ev_note_t */ | 62 /** key pressure change (aftertouch); event data type = #snd_seq_ev_note_t */ |
63 SND_SEQ_EVENT_KEYPRESS, | 63 SND_SEQ_EVENT_KEYPRESS, |
64 | 64 |
65 /** controller; event data type = #snd_seq_ev_ctrl_t */ | 65 /** controller; event data type = #snd_seq_ev_ctrl_t */ |
66 SND_SEQ_EVENT_CONTROLLER = 10, | 66 SND_SEQ_EVENT_CONTROLLER = 10, |
67 /** program change; event data type = #snd_seq_ev_ctrl_t */ | 67 /** program change; event data type = #snd_seq_ev_ctrl_t */ |
68 SND_SEQ_EVENT_PGMCHANGE, | 68 SND_SEQ_EVENT_PGMCHANGE, |
69 /** channel pressure; event data type = #snd_seq_ev_ctrl_t */ | 69 /** channel pressure; event data type = #snd_seq_ev_ctrl_t */ |
70 SND_SEQ_EVENT_CHANPRESS, | 70 SND_SEQ_EVENT_CHANPRESS, |
71 /** pitchwheel; event data type = #snd_seq_ev_ctrl_t; data is from -8192 to 8191) */ | 71 /** pitchwheel; event data type = #snd_seq_ev_ctrl_t; data is from -8192 to 8191) */ |
72 SND_SEQ_EVENT_PITCHBEND, | 72 SND_SEQ_EVENT_PITCHBEND, |
73 /** 14 bit controller value; event data type = #snd_seq_ev_ctrl_t */ | 73 /** 14 bit controller value; event data type = #snd_seq_ev_ctrl_t */ |
74 SND_SEQ_EVENT_CONTROL14, | 74 SND_SEQ_EVENT_CONTROL14, |
75 /** 14 bit NRPN; event data type = #snd_seq_ev_ctrl_t */ | 75 /** 14 bit NRPN; event data type = #snd_seq_ev_ctrl_t */ |
76 SND_SEQ_EVENT_NONREGPARAM, | 76 SND_SEQ_EVENT_NONREGPARAM, |
77 /** 14 bit RPN; event data type = #snd_seq_ev_ctrl_t */ | 77 /** 14 bit RPN; event data type = #snd_seq_ev_ctrl_t */ |
78 SND_SEQ_EVENT_REGPARAM, | 78 SND_SEQ_EVENT_REGPARAM, |
79 | 79 |
80 /** SPP with LSB and MSB values; event data type = #snd_seq_ev_ctrl_t */ | 80 /** SPP with LSB and MSB values; event data type = #snd_seq_ev_ctrl_t */ |
81 SND_SEQ_EVENT_SONGPOS = 20, | 81 SND_SEQ_EVENT_SONGPOS = 20, |
82 /** Song Select with song ID number; event data type = #snd_seq_ev_ctrl_t */ | 82 /** Song Select with song ID number; event data type = #snd_seq_ev_ctrl_t */ |
83 SND_SEQ_EVENT_SONGSEL, | 83 SND_SEQ_EVENT_SONGSEL, |
84 /** midi time code quarter frame; event data type = #snd_seq_ev_ctrl_t */ | 84 /** midi time code quarter frame; event data type = #snd_seq_ev_ctrl_t */ |
85 SND_SEQ_EVENT_QFRAME, | 85 SND_SEQ_EVENT_QFRAME, |
86 /** SMF Time Signature event; event data type = #snd_seq_ev_ctrl_t */ | 86 /** SMF Time Signature event; event data type = #snd_seq_ev_ctrl_t */ |
87 SND_SEQ_EVENT_TIMESIGN, | 87 SND_SEQ_EVENT_TIMESIGN, |
88 /** SMF Key Signature event; event data type = #snd_seq_ev_ctrl_t */ | 88 /** SMF Key Signature event; event data type = #snd_seq_ev_ctrl_t */ |
89 SND_SEQ_EVENT_KEYSIGN, | 89 SND_SEQ_EVENT_KEYSIGN, |
90 | 90 |
91 /** MIDI Real Time Start message; event data type = #snd_seq_ev_queue_control_t */ | 91 /** MIDI Real Time Start message; event data type = #snd_seq_ev_queue_control_t */ |
92 SND_SEQ_EVENT_START = 30, | 92 SND_SEQ_EVENT_START = 30, |
93 /** MIDI Real Time Continue message; event data type = #snd_seq_ev_queue_control_t */ | 93 /** MIDI Real Time Continue message; event data type = #snd_seq_ev_queue_control_t */ |
94 SND_SEQ_EVENT_CONTINUE, | 94 SND_SEQ_EVENT_CONTINUE, |
95 /** MIDI Real Time Stop message; event data type = #snd_seq_ev_queue_control_t */ | 95 /** MIDI Real Time Stop message; event data type = #snd_seq_ev_queue_control_t */ |
96 SND_SEQ_EVENT_STOP, | 96 SND_SEQ_EVENT_STOP, |
97 /** Set tick queue position; event data type = #snd_seq_ev_queue_control_t */ | 97 /** Set tick queue position; event data type = #snd_seq_ev_queue_control_t */ |
98 SND_SEQ_EVENT_SETPOS_TICK, | 98 SND_SEQ_EVENT_SETPOS_TICK, |
99 /** Set real-time queue position; event data type = #snd_seq_ev_queue_control_t */ | 99 /** Set real-time queue position; event data type = #snd_seq_ev_queue_control_t */ |
100 SND_SEQ_EVENT_SETPOS_TIME, | 100 SND_SEQ_EVENT_SETPOS_TIME, |
101 /** (SMF) Tempo event; event data type = #snd_seq_ev_queue_control_t */ | 101 /** (SMF) Tempo event; event data type = #snd_seq_ev_queue_control_t */ |
102 SND_SEQ_EVENT_TEMPO, | 102 SND_SEQ_EVENT_TEMPO, |
103 /** MIDI Real Time Clock message; event data type = #snd_seq_ev_queue_control_t */ | 103 /** MIDI Real Time Clock message; event data type = #snd_seq_ev_queue_control_t */ |
104 SND_SEQ_EVENT_CLOCK, | 104 SND_SEQ_EVENT_CLOCK, |
105 /** MIDI Real Time Tick message; event data type = #snd_seq_ev_queue_control_t */ | 105 /** MIDI Real Time Tick message; event data type = #snd_seq_ev_queue_control_t */ |
106 SND_SEQ_EVENT_TICK, | 106 SND_SEQ_EVENT_TICK, |
107 /** Queue timer skew; event data type = #snd_seq_ev_queue_control_t */ | 107 /** Queue timer skew; event data type = #snd_seq_ev_queue_control_t */ |
108 SND_SEQ_EVENT_QUEUE_SKEW, | 108 SND_SEQ_EVENT_QUEUE_SKEW, |
109 /** Sync position changed; event data type = #snd_seq_ev_queue_control_t */ | 109 /** Sync position changed; event data type = #snd_seq_ev_queue_control_t */ |
110 SND_SEQ_EVENT_SYNC_POS, | 110 SND_SEQ_EVENT_SYNC_POS, |
111 | 111 |
112 /** Tune request; event data type = none */ | 112 /** Tune request; event data type = none */ |
113 SND_SEQ_EVENT_TUNE_REQUEST = 40, | 113 SND_SEQ_EVENT_TUNE_REQUEST = 40, |
114 /** Reset to power-on state; event data type = none */ | 114 /** Reset to power-on state; event data type = none */ |
115 SND_SEQ_EVENT_RESET, | 115 SND_SEQ_EVENT_RESET, |
116 /** Active sensing event; event data type = none */ | 116 /** Active sensing event; event data type = none */ |
117 SND_SEQ_EVENT_SENSING, | 117 SND_SEQ_EVENT_SENSING, |
118 | 118 |
119 /** Echo-back event; event data type = any type */ | 119 /** Echo-back event; event data type = any type */ |
120 SND_SEQ_EVENT_ECHO = 50, | 120 SND_SEQ_EVENT_ECHO = 50, |
121 /** OSS emulation raw event; event data type = any type */ | 121 /** OSS emulation raw event; event data type = any type */ |
122 SND_SEQ_EVENT_OSS, | 122 SND_SEQ_EVENT_OSS, |
123 | 123 |
124 /** New client has connected; event data type = #snd_seq_addr_t */ | 124 /** New client has connected; event data type = #snd_seq_addr_t */ |
125 SND_SEQ_EVENT_CLIENT_START = 60, | 125 SND_SEQ_EVENT_CLIENT_START = 60, |
126 /** Client has left the system; event data type = #snd_seq_addr_t */ | 126 /** Client has left the system; event data type = #snd_seq_addr_t */ |
127 SND_SEQ_EVENT_CLIENT_EXIT, | 127 SND_SEQ_EVENT_CLIENT_EXIT, |
128 /** Client status/info has changed; event data type = #snd_seq_addr_t */ | 128 /** Client status/info has changed; event data type = #snd_seq_addr_t */ |
129 SND_SEQ_EVENT_CLIENT_CHANGE, | 129 SND_SEQ_EVENT_CLIENT_CHANGE, |
130 /** New port was created; event data type = #snd_seq_addr_t */ | 130 /** New port was created; event data type = #snd_seq_addr_t */ |
131 SND_SEQ_EVENT_PORT_START, | 131 SND_SEQ_EVENT_PORT_START, |
132 /** Port was deleted from system; event data type = #snd_seq_addr_t */ | 132 /** Port was deleted from system; event data type = #snd_seq_addr_t */ |
133 SND_SEQ_EVENT_PORT_EXIT, | 133 SND_SEQ_EVENT_PORT_EXIT, |
134 /** Port status/info has changed; event data type = #snd_seq_addr_t */ | 134 /** Port status/info has changed; event data type = #snd_seq_addr_t */ |
135 SND_SEQ_EVENT_PORT_CHANGE, | 135 SND_SEQ_EVENT_PORT_CHANGE, |
136 | 136 |
137 /** Ports connected; event data type = #snd_seq_connect_t */ | 137 /** Ports connected; event data type = #snd_seq_connect_t */ |
138 SND_SEQ_EVENT_PORT_SUBSCRIBED, | 138 SND_SEQ_EVENT_PORT_SUBSCRIBED, |
139 /** Ports disconnected; event data type = #snd_seq_connect_t */ | 139 /** Ports disconnected; event data type = #snd_seq_connect_t */ |
140 SND_SEQ_EVENT_PORT_UNSUBSCRIBED, | 140 SND_SEQ_EVENT_PORT_UNSUBSCRIBED, |
141 | 141 |
142 /** Sample select; event data type = #snd_seq_ev_sample_control_t */ | 142 /** Sample select; event data type = #snd_seq_ev_sample_control_t */ |
143 SND_SEQ_EVENT_SAMPLE = 70, | 143 SND_SEQ_EVENT_SAMPLE = 70, |
144 /** Sample cluster select; event data type = #snd_seq_ev_sample_control_t */ | 144 /** Sample cluster select; event data type = #snd_seq_ev_sample_control_t */ |
145 SND_SEQ_EVENT_SAMPLE_CLUSTER, | 145 SND_SEQ_EVENT_SAMPLE_CLUSTER, |
146 /** voice start */ | 146 /** voice start */ |
147 SND_SEQ_EVENT_SAMPLE_START, | 147 SND_SEQ_EVENT_SAMPLE_START, |
148 /** voice stop */ | 148 /** voice stop */ |
149 SND_SEQ_EVENT_SAMPLE_STOP, | 149 SND_SEQ_EVENT_SAMPLE_STOP, |
150 /** playback frequency */ | 150 /** playback frequency */ |
151 SND_SEQ_EVENT_SAMPLE_FREQ, | 151 SND_SEQ_EVENT_SAMPLE_FREQ, |
152 /** volume and balance */ | 152 /** volume and balance */ |
153 SND_SEQ_EVENT_SAMPLE_VOLUME, | 153 SND_SEQ_EVENT_SAMPLE_VOLUME, |
154 /** sample loop */ | 154 /** sample loop */ |
155 SND_SEQ_EVENT_SAMPLE_LOOP, | 155 SND_SEQ_EVENT_SAMPLE_LOOP, |
156 /** sample position */ | 156 /** sample position */ |
157 SND_SEQ_EVENT_SAMPLE_POSITION, | 157 SND_SEQ_EVENT_SAMPLE_POSITION, |
158 /** private (hardware dependent) event */ | 158 /** private (hardware dependent) event */ |
159 SND_SEQ_EVENT_SAMPLE_PRIVATE1, | 159 SND_SEQ_EVENT_SAMPLE_PRIVATE1, |
160 | 160 |
161 /** user-defined event; event data type = any (fixed size) */ | 161 /** user-defined event; event data type = any (fixed size) */ |
162 SND_SEQ_EVENT_USR0 = 90, | 162 SND_SEQ_EVENT_USR0 = 90, |
163 /** user-defined event; event data type = any (fixed size) */ | 163 /** user-defined event; event data type = any (fixed size) */ |
164 SND_SEQ_EVENT_USR1, | 164 SND_SEQ_EVENT_USR1, |
165 /** user-defined event; event data type = any (fixed size) */ | 165 /** user-defined event; event data type = any (fixed size) */ |
166 SND_SEQ_EVENT_USR2, | 166 SND_SEQ_EVENT_USR2, |
167 /** user-defined event; event data type = any (fixed size) */ | 167 /** user-defined event; event data type = any (fixed size) */ |
168 SND_SEQ_EVENT_USR3, | 168 SND_SEQ_EVENT_USR3, |
169 /** user-defined event; event data type = any (fixed size) */ | 169 /** user-defined event; event data type = any (fixed size) */ |
170 SND_SEQ_EVENT_USR4, | 170 SND_SEQ_EVENT_USR4, |
171 /** user-defined event; event data type = any (fixed size) */ | 171 /** user-defined event; event data type = any (fixed size) */ |
172 SND_SEQ_EVENT_USR5, | 172 SND_SEQ_EVENT_USR5, |
173 /** user-defined event; event data type = any (fixed size) */ | 173 /** user-defined event; event data type = any (fixed size) */ |
174 SND_SEQ_EVENT_USR6, | 174 SND_SEQ_EVENT_USR6, |
175 /** user-defined event; event data type = any (fixed size) */ | 175 /** user-defined event; event data type = any (fixed size) */ |
176 SND_SEQ_EVENT_USR7, | 176 SND_SEQ_EVENT_USR7, |
177 /** user-defined event; event data type = any (fixed size) */ | 177 /** user-defined event; event data type = any (fixed size) */ |
178 SND_SEQ_EVENT_USR8, | 178 SND_SEQ_EVENT_USR8, |
179 /** user-defined event; event data type = any (fixed size) */ | 179 /** user-defined event; event data type = any (fixed size) */ |
180 SND_SEQ_EVENT_USR9, | 180 SND_SEQ_EVENT_USR9, |
181 | 181 |
182 /** begin of instrument management */ | 182 /** begin of instrument management */ |
183 SND_SEQ_EVENT_INSTR_BEGIN = 100, | 183 SND_SEQ_EVENT_INSTR_BEGIN = 100, |
184 /** end of instrument management */ | 184 /** end of instrument management */ |
185 SND_SEQ_EVENT_INSTR_END, | 185 SND_SEQ_EVENT_INSTR_END, |
186 /** query instrument interface info */ | 186 /** query instrument interface info */ |
187 SND_SEQ_EVENT_INSTR_INFO, | 187 SND_SEQ_EVENT_INSTR_INFO, |
188 /** result of instrument interface info */ | 188 /** result of instrument interface info */ |
189 SND_SEQ_EVENT_INSTR_INFO_RESULT, | 189 SND_SEQ_EVENT_INSTR_INFO_RESULT, |
190 /** query instrument format info */ | 190 /** query instrument format info */ |
191 SND_SEQ_EVENT_INSTR_FINFO, | 191 SND_SEQ_EVENT_INSTR_FINFO, |
192 /** result of instrument format info */ | 192 /** result of instrument format info */ |
193 SND_SEQ_EVENT_INSTR_FINFO_RESULT, | 193 SND_SEQ_EVENT_INSTR_FINFO_RESULT, |
194 /** reset instrument instrument memory */ | 194 /** reset instrument instrument memory */ |
195 SND_SEQ_EVENT_INSTR_RESET, | 195 SND_SEQ_EVENT_INSTR_RESET, |
196 /** get instrument interface status */ | 196 /** get instrument interface status */ |
197 SND_SEQ_EVENT_INSTR_STATUS, | 197 SND_SEQ_EVENT_INSTR_STATUS, |
198 /** result of instrument interface status */ | 198 /** result of instrument interface status */ |
199 SND_SEQ_EVENT_INSTR_STATUS_RESULT, | 199 SND_SEQ_EVENT_INSTR_STATUS_RESULT, |
200 /** put an instrument to port */ | 200 /** put an instrument to port */ |
201 SND_SEQ_EVENT_INSTR_PUT, | 201 SND_SEQ_EVENT_INSTR_PUT, |
202 /** get an instrument from port */ | 202 /** get an instrument from port */ |
203 SND_SEQ_EVENT_INSTR_GET, | 203 SND_SEQ_EVENT_INSTR_GET, |
204 /** result of instrument query */ | 204 /** result of instrument query */ |
205 SND_SEQ_EVENT_INSTR_GET_RESULT, | 205 SND_SEQ_EVENT_INSTR_GET_RESULT, |
206 /** free instrument(s) */ | 206 /** free instrument(s) */ |
207 SND_SEQ_EVENT_INSTR_FREE, | 207 SND_SEQ_EVENT_INSTR_FREE, |
208 /** get instrument list */ | 208 /** get instrument list */ |
209 SND_SEQ_EVENT_INSTR_LIST, | 209 SND_SEQ_EVENT_INSTR_LIST, |
210 /** result of instrument list */ | 210 /** result of instrument list */ |
211 SND_SEQ_EVENT_INSTR_LIST_RESULT, | 211 SND_SEQ_EVENT_INSTR_LIST_RESULT, |
212 /** set cluster parameters */ | 212 /** set cluster parameters */ |
213 SND_SEQ_EVENT_INSTR_CLUSTER, | 213 SND_SEQ_EVENT_INSTR_CLUSTER, |
214 /** get cluster parameters */ | 214 /** get cluster parameters */ |
215 SND_SEQ_EVENT_INSTR_CLUSTER_GET, | 215 SND_SEQ_EVENT_INSTR_CLUSTER_GET, |
216 /** result of cluster parameters */ | 216 /** result of cluster parameters */ |
217 SND_SEQ_EVENT_INSTR_CLUSTER_RESULT, | 217 SND_SEQ_EVENT_INSTR_CLUSTER_RESULT, |
218 /** instrument change */ | 218 /** instrument change */ |
219 SND_SEQ_EVENT_INSTR_CHANGE, | 219 SND_SEQ_EVENT_INSTR_CHANGE, |
220 | 220 |
221 /** system exclusive data (variable length); event data type = #snd_seq_ev_ext_t */ | 221 /** system exclusive data (variable length); event data type = #snd_seq_ev_ext_t */ |
222 SND_SEQ_EVENT_SYSEX = 130, | 222 SND_SEQ_EVENT_SYSEX = 130, |
223 /** error event; event data type = #snd_seq_ev_ext_t */ | 223 /** error event; event data type = #snd_seq_ev_ext_t */ |
224 SND_SEQ_EVENT_BOUNCE, | 224 SND_SEQ_EVENT_BOUNCE, |
225 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ | 225 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ |
226 SND_SEQ_EVENT_USR_VAR0 = 135, | 226 SND_SEQ_EVENT_USR_VAR0 = 135, |
227 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ | 227 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ |
228 SND_SEQ_EVENT_USR_VAR1, | 228 SND_SEQ_EVENT_USR_VAR1, |
229 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ | 229 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ |
230 SND_SEQ_EVENT_USR_VAR2, | 230 SND_SEQ_EVENT_USR_VAR2, |
231 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ | 231 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ |
232 SND_SEQ_EVENT_USR_VAR3, | 232 SND_SEQ_EVENT_USR_VAR3, |
233 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ | 233 /** reserved for user apps; event data type = #snd_seq_ev_ext_t */ |
234 SND_SEQ_EVENT_USR_VAR4, | 234 SND_SEQ_EVENT_USR_VAR4, |
235 | 235 |
236 /** NOP; ignored in any case */ | 236 /** NOP; ignored in any case */ |
237 SND_SEQ_EVENT_NONE = 255 | 237 SND_SEQ_EVENT_NONE = 255 |
238 }; | 238 }; |
239 | 239 |
240 | 240 |
241 /** Sequencer event address */ | 241 /** Sequencer event address */ |
242 typedef struct snd_seq_addr { | 242 typedef struct snd_seq_addr { |
243 unsigned char client; /**< Client id */ | 243 unsigned char client; /**< Client id */ |
244 unsigned char port; /**< Port id */ | 244 unsigned char port; /**< Port id */ |
245 } snd_seq_addr_t; | 245 } snd_seq_addr_t; |
246 | 246 |
247 /** Connection (subscription) between ports */ | 247 /** Connection (subscription) between ports */ |
248 typedef struct snd_seq_connect { | 248 typedef struct snd_seq_connect { |
249 snd_seq_addr_t sender; /**< sender address */ | 249 snd_seq_addr_t sender; /**< sender address */ |
250 snd_seq_addr_t dest; /**< destination address */ | 250 snd_seq_addr_t dest; /**< destination address */ |
251 } snd_seq_connect_t; | 251 } snd_seq_connect_t; |
252 | 252 |
253 | 253 |
254 /** Real-time data record */ | 254 /** Real-time data record */ |
255 typedef struct snd_seq_real_time { | 255 typedef struct snd_seq_real_time { |
256 unsigned int tv_sec; /**< seconds */ | 256 unsigned int tv_sec; /**< seconds */ |
257 unsigned int tv_nsec; /**< nanoseconds */ | 257 unsigned int tv_nsec; /**< nanoseconds */ |
258 } snd_seq_real_time_t; | 258 } snd_seq_real_time_t; |
259 | 259 |
260 /** (MIDI) Tick-time data record */ | 260 /** (MIDI) Tick-time data record */ |
261 typedef unsigned int snd_seq_tick_time_t; | 261 typedef unsigned int snd_seq_tick_time_t; |
262 | 262 |
263 /** unioned time stamp */ | 263 /** unioned time stamp */ |
264 typedef union snd_seq_timestamp { | 264 typedef union snd_seq_timestamp { |
265 snd_seq_tick_time_t tick; /**< tick-time */ | 265 snd_seq_tick_time_t tick; /**< tick-time */ |
266 struct snd_seq_real_time time; /**< real-time */ | 266 struct snd_seq_real_time time; /**< real-time */ |
267 } snd_seq_timestamp_t; | 267 } snd_seq_timestamp_t; |
268 | 268 |
269 | 269 |
270 /** | 270 /** |
271 * Event mode flags | 271 * Event mode flags |
272 * | 272 * |
273 * NOTE: only 8 bits available! | 273 * NOTE: only 8 bits available! |
274 */ | 274 */ |
275 #define SND_SEQ_TIME_STAMP_TICK (0<<0) /**< timestamp in clock ticks */ | 275 #define SND_SEQ_TIME_STAMP_TICK (0<<0) /**< timestamp in clock ticks */ |
276 #define SND_SEQ_TIME_STAMP_REAL (1<<0) /**< timestamp in real time */ | 276 #define SND_SEQ_TIME_STAMP_REAL (1<<0) /**< timestamp in real time */ |
277 #define SND_SEQ_TIME_STAMP_MASK (1<<0) /**< mask for timestamp bits */ | 277 #define SND_SEQ_TIME_STAMP_MASK (1<<0) /**< mask for timestamp bits */ |
278 | 278 |
279 #define SND_SEQ_TIME_MODE_ABS (0<<1) /**< absolute timestamp */ | 279 #define SND_SEQ_TIME_MODE_ABS (0<<1) /**< absolute timestamp */ |
280 #define SND_SEQ_TIME_MODE_REL (1<<1) /**< relative to current time */ | 280 #define SND_SEQ_TIME_MODE_REL (1<<1) /**< relative to current time */ |
281 #define SND_SEQ_TIME_MODE_MASK (1<<1) /**< mask for time mode bits */ | 281 #define SND_SEQ_TIME_MODE_MASK (1<<1) /**< mask for time mode bits */ |
282 | 282 |
283 #define SND_SEQ_EVENT_LENGTH_FIXED (0<<2) /**< fixed event size */ | 283 #define SND_SEQ_EVENT_LENGTH_FIXED (0<<2) /**< fixed event size */ |
284 #define SND_SEQ_EVENT_LENGTH_VARIABLE (1<<2) /**< variable event size */ | 284 #define SND_SEQ_EVENT_LENGTH_VARIABLE (1<<2) /**< variable event size */ |
285 #define SND_SEQ_EVENT_LENGTH_VARUSR (2<<2) /**< variable event size - user memory space */ | 285 #define SND_SEQ_EVENT_LENGTH_VARUSR (2<<2) /**< variable event size - user memory space */ |
286 #define SND_SEQ_EVENT_LENGTH_MASK (3<<2) /**< mask for event length bits */ | 286 #define SND_SEQ_EVENT_LENGTH_MASK (3<<2) /**< mask for event length bits */ |
287 | 287 |
288 #define SND_SEQ_PRIORITY_NORMAL (0<<4) /**< normal priority */ | 288 #define SND_SEQ_PRIORITY_NORMAL (0<<4) /**< normal priority */ |
289 #define SND_SEQ_PRIORITY_HIGH (1<<4) /**< event should be processed before others */ | 289 #define SND_SEQ_PRIORITY_HIGH (1<<4) /**< event should be processed before others */ |
290 #define SND_SEQ_PRIORITY_MASK (1<<4) /**< mask for priority bits */ | 290 #define SND_SEQ_PRIORITY_MASK (1<<4) /**< mask for priority bits */ |
291 | 291 |
292 | 292 |
293 /** Note event */ | 293 /** Note event */ |
294 typedef struct snd_seq_ev_note { | 294 typedef struct snd_seq_ev_note { |
295 unsigned char channel; /**< channel number */ | 295 unsigned char channel; /**< channel number */ |
296 unsigned char note; /**< note */ | 296 unsigned char note; /**< note */ |
297 unsigned char velocity; /**< velocity */ | 297 unsigned char velocity; /**< velocity */ |
298 unsigned char off_velocity; /**< note-off velocity; only for #SND_SEQ_EVENT_NOTE */ | 298 unsigned char off_velocity; /**< note-off velocity; only for #SND_SEQ_EVENT_NOTE */ |
299 unsigned int duration; /**< duration until note-off; only for #SND_SEQ_EVENT_NOTE */ | 299 unsigned int duration; /**< duration until note-off; only for #SND_SEQ_EVENT_NOTE */ |
300 } snd_seq_ev_note_t; | 300 } snd_seq_ev_note_t; |
301 | 301 |
302 /** Controller event */ | 302 /** Controller event */ |
303 typedef struct snd_seq_ev_ctrl { | 303 typedef struct snd_seq_ev_ctrl { |
304 unsigned char channel; /**< channel number */ | 304 unsigned char channel; /**< channel number */ |
305 unsigned char unused[3]; /**< reserved */ | 305 unsigned char unused[3]; /**< reserved */ |
306 unsigned int param; /**< control parameter */ | 306 unsigned int param; /**< control parameter */ |
307 signed int value; /**< control value */ | 307 signed int value; /**< control value */ |
308 } snd_seq_ev_ctrl_t; | 308 } snd_seq_ev_ctrl_t; |
309 | 309 |
310 /** generic set of bytes (12x8 bit) */ | 310 /** generic set of bytes (12x8 bit) */ |
311 typedef struct snd_seq_ev_raw8 { | 311 typedef struct snd_seq_ev_raw8 { |
312 unsigned char d[12]; /**< 8 bit value */ | 312 unsigned char d[12]; /**< 8 bit value */ |
313 } snd_seq_ev_raw8_t; | 313 } snd_seq_ev_raw8_t; |
314 | 314 |
315 /** generic set of integers (3x32 bit) */ | 315 /** generic set of integers (3x32 bit) */ |
316 typedef struct snd_seq_ev_raw32 { | 316 typedef struct snd_seq_ev_raw32 { |
317 unsigned int d[3]; /**< 32 bit value */ | 317 unsigned int d[3]; /**< 32 bit value */ |
318 } snd_seq_ev_raw32_t; | 318 } snd_seq_ev_raw32_t; |
319 | 319 |
320 /** external stored data */ | 320 /** external stored data */ |
321 typedef struct snd_seq_ev_ext { | 321 typedef struct snd_seq_ev_ext { |
322 unsigned int len; /**< length of data */ | 322 unsigned int len; /**< length of data */ |
323 void *ptr; /**< pointer to data (note: can be 64-bit) */ | 323 void *ptr; /**< pointer to data (note: can be 64-bit) */ |
324 } | 324 } |
325 #ifdef __GNUC__ | 325 #ifdef __GNUC__ |
326 __attribute__((packed)) | 326 __attribute__((packed)) |
327 #endif | 327 #endif |
328 snd_seq_ev_ext_t; | 328 snd_seq_ev_ext_t; |
330 /** Instrument cluster type */ | 330 /** Instrument cluster type */ |
331 typedef unsigned int snd_seq_instr_cluster_t; | 331 typedef unsigned int snd_seq_instr_cluster_t; |
332 | 332 |
333 /** Instrument type */ | 333 /** Instrument type */ |
334 typedef struct snd_seq_instr { | 334 typedef struct snd_seq_instr { |
335 snd_seq_instr_cluster_t cluster; /**< cluster id */ | 335 snd_seq_instr_cluster_t cluster; /**< cluster id */ |
336 unsigned int std; /**< instrument standard id; the upper byte means a private instrument (owner - client id) */ | 336 unsigned int std; /**< instrument standard id; the upper byte means a private instrument (owner - client id) */ |
337 unsigned short bank; /**< instrument bank id */ | 337 unsigned short bank; /**< instrument bank id */ |
338 unsigned short prg; /**< instrument program id */ | 338 unsigned short prg; /**< instrument program id */ |
339 } snd_seq_instr_t; | 339 } snd_seq_instr_t; |
340 | 340 |
341 /** sample number */ | 341 /** sample number */ |
342 typedef struct snd_seq_ev_sample { | 342 typedef struct snd_seq_ev_sample { |
343 unsigned int std; /**< sample standard id */ | 343 unsigned int std; /**< sample standard id */ |
344 unsigned short bank; /**< sample bank id */ | 344 unsigned short bank; /**< sample bank id */ |
345 unsigned short prg; /**< sample program id */ | 345 unsigned short prg; /**< sample program id */ |
346 } snd_seq_ev_sample_t; | 346 } snd_seq_ev_sample_t; |
347 | 347 |
348 /** sample cluster */ | 348 /** sample cluster */ |
349 typedef struct snd_seq_ev_cluster { | 349 typedef struct snd_seq_ev_cluster { |
350 snd_seq_instr_cluster_t cluster; /**< cluster id */ | 350 snd_seq_instr_cluster_t cluster; /**< cluster id */ |
351 } snd_seq_ev_cluster_t; | 351 } snd_seq_ev_cluster_t; |
352 | 352 |
353 /** sample position */ | 353 /** sample position */ |
354 typedef unsigned int snd_seq_position_t; /**< playback position (in samples) * 16 */ | 354 typedef unsigned int snd_seq_position_t; /**< playback position (in samples) * 16 */ |
355 | 355 |
356 /** sample stop mode */ | 356 /** sample stop mode */ |
357 typedef enum snd_seq_stop_mode { | 357 typedef enum snd_seq_stop_mode { |
358 SND_SEQ_SAMPLE_STOP_IMMEDIATELY = 0, /**< terminate playing immediately */ | 358 SND_SEQ_SAMPLE_STOP_IMMEDIATELY = 0, /**< terminate playing immediately */ |
359 SND_SEQ_SAMPLE_STOP_VENVELOPE = 1, /**< finish volume envelope */ | 359 SND_SEQ_SAMPLE_STOP_VENVELOPE = 1, /**< finish volume envelope */ |
360 SND_SEQ_SAMPLE_STOP_LOOP = 2 /**< terminate loop and finish wave */ | 360 SND_SEQ_SAMPLE_STOP_LOOP = 2 /**< terminate loop and finish wave */ |
361 } snd_seq_stop_mode_t; | 361 } snd_seq_stop_mode_t; |
362 | 362 |
363 /** sample frequency */ | 363 /** sample frequency */ |
364 typedef int snd_seq_frequency_t; /**< playback frequency in HZ * 16 */ | 364 typedef int snd_seq_frequency_t; /**< playback frequency in HZ * 16 */ |
365 | 365 |
366 /** sample volume control; if any value is set to -1 == do not change */ | 366 /** sample volume control; if any value is set to -1 == do not change */ |
367 typedef struct snd_seq_ev_volume { | 367 typedef struct snd_seq_ev_volume { |
368 signed short volume; /**< range: 0-16383 */ | 368 signed short volume; /**< range: 0-16383 */ |
369 signed short lr; /**< left-right balance; range: 0-16383 */ | 369 signed short lr; /**< left-right balance; range: 0-16383 */ |
370 signed short fr; /**< front-rear balance; range: 0-16383 */ | 370 signed short fr; /**< front-rear balance; range: 0-16383 */ |
371 signed short du; /**< down-up balance; range: 0-16383 */ | 371 signed short du; /**< down-up balance; range: 0-16383 */ |
372 } snd_seq_ev_volume_t; | 372 } snd_seq_ev_volume_t; |
373 | 373 |
374 /** simple loop redefinition */ | 374 /** simple loop redefinition */ |
375 typedef struct snd_seq_ev_loop { | 375 typedef struct snd_seq_ev_loop { |
376 unsigned int start; /**< loop start (in samples) * 16 */ | 376 unsigned int start; /**< loop start (in samples) * 16 */ |
377 unsigned int end; /**< loop end (in samples) * 16 */ | 377 unsigned int end; /**< loop end (in samples) * 16 */ |
378 } snd_seq_ev_loop_t; | 378 } snd_seq_ev_loop_t; |
379 | 379 |
380 /** Sample control events */ | 380 /** Sample control events */ |
381 typedef struct snd_seq_ev_sample_control { | 381 typedef struct snd_seq_ev_sample_control { |
382 unsigned char channel; /**< channel */ | 382 unsigned char channel; /**< channel */ |
383 unsigned char unused[3]; /**< reserved */ | 383 unsigned char unused[3]; /**< reserved */ |
384 union { | 384 union { |
385 snd_seq_ev_sample_t sample; /**< sample number */ | 385 snd_seq_ev_sample_t sample; /**< sample number */ |
386 snd_seq_ev_cluster_t cluster; /**< cluster number */ | 386 snd_seq_ev_cluster_t cluster; /**< cluster number */ |
387 snd_seq_position_t position; /**< position */ | 387 snd_seq_position_t position; /**< position */ |
388 snd_seq_stop_mode_t stop_mode; /**< stop mode */ | 388 snd_seq_stop_mode_t stop_mode; /**< stop mode */ |
389 snd_seq_frequency_t frequency; /**< frequency */ | 389 snd_seq_frequency_t frequency; /**< frequency */ |
390 snd_seq_ev_volume_t volume; /**< volume */ | 390 snd_seq_ev_volume_t volume; /**< volume */ |
391 snd_seq_ev_loop_t loop; /**< loop control */ | 391 snd_seq_ev_loop_t loop; /**< loop control */ |
392 unsigned char raw8[8]; /**< raw 8-bit */ | 392 unsigned char raw8[8]; /**< raw 8-bit */ |
393 } param; /**< control parameters */ | 393 } param; /**< control parameters */ |
394 } snd_seq_ev_sample_control_t; | 394 } snd_seq_ev_sample_control_t; |
395 | 395 |
396 | 396 |
397 | 397 |
398 /** INSTR_BEGIN event */ | 398 /** INSTR_BEGIN event */ |
399 typedef struct snd_seq_ev_instr_begin { | 399 typedef struct snd_seq_ev_instr_begin { |
400 int timeout; /**< zero = forever, otherwise timeout in ms */ | 400 int timeout; /**< zero = forever, otherwise timeout in ms */ |
401 } snd_seq_ev_instr_begin_t; | 401 } snd_seq_ev_instr_begin_t; |
402 | 402 |
403 /** Result events */ | 403 /** Result events */ |
404 typedef struct snd_seq_result { | 404 typedef struct snd_seq_result { |
405 int event; /**< processed event type */ | 405 int event; /**< processed event type */ |
406 int result; /**< status */ | 406 int result; /**< status */ |
407 } snd_seq_result_t; | 407 } snd_seq_result_t; |
408 | 408 |
409 /** Queue skew values */ | 409 /** Queue skew values */ |
410 typedef struct snd_seq_queue_skew { | 410 typedef struct snd_seq_queue_skew { |
411 unsigned int value; /**< skew value */ | 411 unsigned int value; /**< skew value */ |
412 unsigned int base; /**< skew base */ | 412 unsigned int base; /**< skew base */ |
413 } snd_seq_queue_skew_t; | 413 } snd_seq_queue_skew_t; |
414 | 414 |
415 /** queue timer control */ | 415 /** queue timer control */ |
416 typedef struct snd_seq_ev_queue_control { | 416 typedef struct snd_seq_ev_queue_control { |
417 unsigned char queue; /**< affected queue */ | 417 unsigned char queue; /**< affected queue */ |
418 unsigned char unused[3]; /**< reserved */ | 418 unsigned char unused[3]; /**< reserved */ |
419 union { | 419 union { |
420 signed int value; /**< affected value (e.g. tempo) */ | 420 signed int value; /**< affected value (e.g. tempo) */ |
421 snd_seq_timestamp_t time; /**< time */ | 421 snd_seq_timestamp_t time; /**< time */ |
422 unsigned int position; /**< sync position */ | 422 unsigned int position; /**< sync position */ |
423 snd_seq_queue_skew_t skew; /**< queue skew */ | 423 snd_seq_queue_skew_t skew; /**< queue skew */ |
424 unsigned int d32[2]; /**< any data */ | 424 unsigned int d32[2]; /**< any data */ |
425 unsigned char d8[8]; /**< any data */ | 425 unsigned char d8[8]; /**< any data */ |
426 } param; /**< data value union */ | 426 } param; /**< data value union */ |
427 } snd_seq_ev_queue_control_t; | 427 } snd_seq_ev_queue_control_t; |
428 | 428 |
429 | 429 |
430 /** Sequencer event */ | 430 /** Sequencer event */ |
431 typedef struct snd_seq_event { | 431 typedef struct snd_seq_event { |
432 snd_seq_event_type_t type; /**< event type */ | 432 snd_seq_event_type_t type; /**< event type */ |
433 unsigned char flags; /**< event flags */ | 433 unsigned char flags; /**< event flags */ |
434 unsigned char tag; /**< tag */ | 434 unsigned char tag; /**< tag */ |
435 | 435 |
436 unsigned char queue; /**< schedule queue */ | 436 unsigned char queue; /**< schedule queue */ |
437 snd_seq_timestamp_t time; /**< schedule time */ | 437 snd_seq_timestamp_t time; /**< schedule time */ |
438 | 438 |
439 snd_seq_addr_t source; /**< source address */ | 439 snd_seq_addr_t source; /**< source address */ |
440 snd_seq_addr_t dest; /**< destination address */ | 440 snd_seq_addr_t dest; /**< destination address */ |
441 | 441 |
442 union { | 442 union { |
443 snd_seq_ev_note_t note; /**< note information */ | 443 snd_seq_ev_note_t note; /**< note information */ |
444 snd_seq_ev_ctrl_t control; /**< MIDI control information */ | 444 snd_seq_ev_ctrl_t control; /**< MIDI control information */ |
445 snd_seq_ev_raw8_t raw8; /**< raw8 data */ | 445 snd_seq_ev_raw8_t raw8; /**< raw8 data */ |
446 snd_seq_ev_raw32_t raw32; /**< raw32 data */ | 446 snd_seq_ev_raw32_t raw32; /**< raw32 data */ |
447 snd_seq_ev_ext_t ext; /**< external data */ | 447 snd_seq_ev_ext_t ext; /**< external data */ |
448 snd_seq_ev_queue_control_t queue; /**< queue control */ | 448 snd_seq_ev_queue_control_t queue; /**< queue control */ |
449 snd_seq_timestamp_t time; /**< timestamp */ | 449 snd_seq_timestamp_t time; /**< timestamp */ |
450 snd_seq_addr_t addr; /**< address */ | 450 snd_seq_addr_t addr; /**< address */ |
451 snd_seq_connect_t connect; /**< connect information */ | 451 snd_seq_connect_t connect; /**< connect information */ |
452 snd_seq_result_t result; /**< operation result code */ | 452 snd_seq_result_t result; /**< operation result code */ |
453 snd_seq_ev_instr_begin_t instr_begin; /**< instrument */ | 453 snd_seq_ev_instr_begin_t instr_begin; /**< instrument */ |
454 snd_seq_ev_sample_control_t sample; /**< sample control */ | 454 snd_seq_ev_sample_control_t sample; /**< sample control */ |
455 } data; /**< event data... */ | 455 } data; /**< event data... */ |
456 } snd_seq_event_t; | 456 } snd_seq_event_t; |
457 | 457 |
458 | 458 |
459 /** \} */ | 459 /** \} */ |
460 | 460 |