seq_event.h
Go to the documentation of this file.
/*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#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
/* redefine typedef for stupid doxygen */
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 /* __ALSA_SEQ_EVENT_H */
SND_SEQ_EVENT_USR7
@ SND_SEQ_EVENT_USR7
Definition: seq_event.h:151
SND_SEQ_EVENT_TIMESIGN
@ SND_SEQ_EVENT_TIMESIGN
Definition: seq_event.h:81
snd_seq_event_t::addr
snd_seq_addr_t addr
Definition: seq_event.h:315
snd_seq_event_t::note
snd_seq_ev_note_t note
Definition: seq_event.h:308
SND_SEQ_EVENT_REGPARAM
@ SND_SEQ_EVENT_REGPARAM
Definition: seq_event.h:72
snd_seq_ev_ext::ptr
void * ptr
Definition: seq_event.h:259
SND_SEQ_EVENT_SONGPOS
@ SND_SEQ_EVENT_SONGPOS
Definition: seq_event.h:75
snd_seq_queue_skew_t::value
unsigned int value
Definition: seq_event.h:276
SND_SEQ_EVENT_NOTEOFF
@ SND_SEQ_EVENT_NOTEOFF
Definition: seq_event.h:55
snd_seq_ev_ctrl_t::param
unsigned int param
Definition: seq_event.h:242
SND_SEQ_EVENT_PORT_EXIT
@ SND_SEQ_EVENT_PORT_EXIT
Definition: seq_event.h:127
SND_SEQ_EVENT_TEMPO
@ SND_SEQ_EVENT_TEMPO
Definition: seq_event.h:96
SND_SEQ_EVENT_USR_VAR3
@ SND_SEQ_EVENT_USR_VAR3
Definition: seq_event.h:168
SND_SEQ_EVENT_BOUNCE
@ SND_SEQ_EVENT_BOUNCE
Definition: seq_event.h:160
snd_seq_ev_queue_control_t::queue
unsigned char queue
Definition: seq_event.h:282
SND_SEQ_EVENT_USR_VAR4
@ SND_SEQ_EVENT_USR_VAR4
Definition: seq_event.h:170
SND_SEQ_EVENT_SONGSEL
@ SND_SEQ_EVENT_SONGSEL
Definition: seq_event.h:77
snd_seq_real_time_t
Definition: seq_event.h:191
SND_SEQ_EVENT_KEYPRESS
@ SND_SEQ_EVENT_KEYPRESS
Definition: seq_event.h:57
snd_seq_event_t::raw32
snd_seq_ev_raw32_t raw32
Definition: seq_event.h:311
snd_seq_ev_ext::len
unsigned int len
Definition: seq_event.h:258
SND_SEQ_EVENT_CHANPRESS
@ SND_SEQ_EVENT_CHANPRESS
Definition: seq_event.h:64
snd_seq_tick_time_t
unsigned int snd_seq_tick_time_t
Definition: seq_event.h:197
SND_SEQ_EVENT_PITCHBEND
@ SND_SEQ_EVENT_PITCHBEND
Definition: seq_event.h:66
snd_seq_ev_queue_control_t::position
unsigned int position
Definition: seq_event.h:287
snd_seq_connect_t::dest
snd_seq_addr_t dest
Definition: seq_event.h:186
SND_SEQ_EVENT_USR8
@ SND_SEQ_EVENT_USR8
Definition: seq_event.h:153
SND_SEQ_EVENT_USR6
@ SND_SEQ_EVENT_USR6
Definition: seq_event.h:149
snd_seq_event_t::source
snd_seq_addr_t source
Definition: seq_event.h:304
snd_seq_event_t
Definition: seq_event.h:296
SND_SEQ_EVENT_STOP
@ SND_SEQ_EVENT_STOP
Definition: seq_event.h:90
SND_SEQ_EVENT_QUEUE_SKEW
@ SND_SEQ_EVENT_QUEUE_SKEW
Definition: seq_event.h:102
snd_seq_ev_ctrl_t
Definition: seq_event.h:239
SND_SEQ_EVENT_PORT_UNSUBSCRIBED
@ SND_SEQ_EVENT_PORT_UNSUBSCRIBED
Definition: seq_event.h:134
SND_SEQ_EVENT_CLIENT_CHANGE
@ SND_SEQ_EVENT_CLIENT_CHANGE
Definition: seq_event.h:123
snd_seq_result_t::event
int event
Definition: seq_event.h:270
SND_SEQ_EVENT_SENSING
@ SND_SEQ_EVENT_SENSING
Definition: seq_event.h:111
snd_seq_event_t::tag
unsigned char tag
Definition: seq_event.h:299
snd_seq_addr_t
Definition: seq_event.h:178
snd_seq_ev_raw32_t
Definition: seq_event.h:252
SND_SEQ_EVENT_NONREGPARAM
@ SND_SEQ_EVENT_NONREGPARAM
Definition: seq_event.h:70
SND_SEQ_EVENT_USR3
@ SND_SEQ_EVENT_USR3
Definition: seq_event.h:143
snd_seq_event_t::raw8
snd_seq_ev_raw8_t raw8
Definition: seq_event.h:310
snd_seq_ev_queue_control_t::skew
snd_seq_queue_skew_t skew
Definition: seq_event.h:288
snd_seq_real_time_t::tv_sec
unsigned int tv_sec
Definition: seq_event.h:192
snd_seq_event_t::queue
snd_seq_ev_queue_control_t queue
Definition: seq_event.h:313
SND_SEQ_EVENT_QFRAME
@ SND_SEQ_EVENT_QFRAME
Definition: seq_event.h:79
snd_seq_event_t::control
snd_seq_ev_ctrl_t control
Definition: seq_event.h:309
snd_seq_real_time_t::tv_nsec
unsigned int tv_nsec
Definition: seq_event.h:193
SND_SEQ_EVENT_CONTROLLER
@ SND_SEQ_EVENT_CONTROLLER
Definition: seq_event.h:60
snd_seq_connect_t
Definition: seq_event.h:184
SND_SEQ_EVENT_CLOCK
@ SND_SEQ_EVENT_CLOCK
Definition: seq_event.h:98
snd_seq_ev_raw8_t
Definition: seq_event.h:247
SND_SEQ_EVENT_ECHO
@ SND_SEQ_EVENT_ECHO
Definition: seq_event.h:114
SND_SEQ_EVENT_NONE
@ SND_SEQ_EVENT_NONE
Definition: seq_event.h:173
SND_SEQ_EVENT_PORT_SUBSCRIBED
@ SND_SEQ_EVENT_PORT_SUBSCRIBED
Definition: seq_event.h:132
SND_SEQ_EVENT_USR4
@ SND_SEQ_EVENT_USR4
Definition: seq_event.h:145
snd_seq_timestamp_t
Definition: seq_event.h:200
snd_seq_connect_t::sender
snd_seq_addr_t sender
Definition: seq_event.h:185
snd_seq_ev_note_t::velocity
unsigned char velocity
Definition: seq_event.h:233
snd_seq_ev_ctrl_t::value
signed int value
Definition: seq_event.h:243
SND_SEQ_EVENT_PGMCHANGE
@ SND_SEQ_EVENT_PGMCHANGE
Definition: seq_event.h:62
SND_SEQ_EVENT_TUNE_REQUEST
@ SND_SEQ_EVENT_TUNE_REQUEST
Definition: seq_event.h:107
SND_SEQ_EVENT_SYSEX
@ SND_SEQ_EVENT_SYSEX
Definition: seq_event.h:158
snd_seq_addr_t::port
unsigned char port
Definition: seq_event.h:180
SND_SEQ_EVENT_SETPOS_TICK
@ SND_SEQ_EVENT_SETPOS_TICK
Definition: seq_event.h:92
SND_SEQ_EVENT_USR_VAR1
@ SND_SEQ_EVENT_USR_VAR1
Definition: seq_event.h:164
snd_seq_ev_note_t::channel
unsigned char channel
Definition: seq_event.h:231
snd_seq_result_t
Definition: seq_event.h:269
SND_SEQ_EVENT_PORT_START
@ SND_SEQ_EVENT_PORT_START
Definition: seq_event.h:125
snd_seq_ev_queue_control_t
Definition: seq_event.h:281
snd_seq_queue_skew_t::base
unsigned int base
Definition: seq_event.h:277
SND_SEQ_EVENT_USR1
@ SND_SEQ_EVENT_USR1
Definition: seq_event.h:139
SND_SEQ_EVENT_SYNC_POS
@ SND_SEQ_EVENT_SYNC_POS
Definition: seq_event.h:104
SND_SEQ_EVENT_CONTINUE
@ SND_SEQ_EVENT_CONTINUE
Definition: seq_event.h:88
snd_seq_ev_queue_control_t::value
signed int value
Definition: seq_event.h:285
snd_seq_event_t::result
snd_seq_result_t result
Definition: seq_event.h:317
SND_SEQ_EVENT_SYSTEM
@ SND_SEQ_EVENT_SYSTEM
Definition: seq_event.h:46
snd_seq_event_t::connect
snd_seq_connect_t connect
Definition: seq_event.h:316
snd_seq_event_t::type
snd_seq_event_type_t type
Definition: seq_event.h:297
snd_seq_event_t::time
snd_seq_timestamp_t time
Definition: seq_event.h:302
SND_SEQ_EVENT_USR9
@ SND_SEQ_EVENT_USR9
Definition: seq_event.h:155
snd_seq_event_t::queue
unsigned char queue
Definition: seq_event.h:301
SND_SEQ_EVENT_TICK
@ SND_SEQ_EVENT_TICK
Definition: seq_event.h:100
snd_seq_event_t::ext
snd_seq_ev_ext_t ext
Definition: seq_event.h:312
SND_SEQ_EVENT_USR5
@ SND_SEQ_EVENT_USR5
Definition: seq_event.h:147
snd_seq_ev_ext_t
snd_seq_ev_ext snd_seq_ev_ext_t
Definition: seq_event.h:265
SND_SEQ_EVENT_OSS
@ SND_SEQ_EVENT_OSS
Definition: seq_event.h:116
SND_SEQ_EVENT_PORT_CHANGE
@ SND_SEQ_EVENT_PORT_CHANGE
Definition: seq_event.h:129
snd_seq_ev_note_t::duration
unsigned int duration
Definition: seq_event.h:235
snd_seq_ev_note_t::off_velocity
unsigned char off_velocity
Definition: seq_event.h:234
SND_SEQ_EVENT_NOTE
@ SND_SEQ_EVENT_NOTE
Definition: seq_event.h:51
SND_SEQ_EVENT_CLIENT_START
@ SND_SEQ_EVENT_CLIENT_START
Definition: seq_event.h:119
snd_seq_event_type
snd_seq_event_type
Definition: seq_event.h:44
snd_seq_ev_queue_control_t::time
snd_seq_timestamp_t time
Definition: seq_event.h:286
SND_SEQ_EVENT_USR_VAR2
@ SND_SEQ_EVENT_USR_VAR2
Definition: seq_event.h:166
SND_SEQ_EVENT_KEYSIGN
@ SND_SEQ_EVENT_KEYSIGN
Definition: seq_event.h:83
SND_SEQ_EVENT_RESET
@ SND_SEQ_EVENT_RESET
Definition: seq_event.h:109
SND_SEQ_EVENT_USR_VAR0
@ SND_SEQ_EVENT_USR_VAR0
Definition: seq_event.h:162
SND_SEQ_EVENT_CONTROL14
@ SND_SEQ_EVENT_CONTROL14
Definition: seq_event.h:68
SND_SEQ_EVENT_CLIENT_EXIT
@ SND_SEQ_EVENT_CLIENT_EXIT
Definition: seq_event.h:121
snd_seq_ev_ext
Definition: seq_event.h:257
snd_seq_event_type_t
unsigned char snd_seq_event_type_t
Definition: seq_event.h:41
snd_seq_addr_t::client
unsigned char client
Definition: seq_event.h:179
SND_SEQ_EVENT_USR2
@ SND_SEQ_EVENT_USR2
Definition: seq_event.h:141
snd_seq_ev_note_t::note
unsigned char note
Definition: seq_event.h:232
snd_seq_event_t::flags
unsigned char flags
Definition: seq_event.h:298
SND_SEQ_EVENT_NOTEON
@ SND_SEQ_EVENT_NOTEON
Definition: seq_event.h:53
SND_SEQ_EVENT_SETPOS_TIME
@ SND_SEQ_EVENT_SETPOS_TIME
Definition: seq_event.h:94
snd_seq_ev_note_t
Definition: seq_event.h:230
SND_SEQ_EVENT_RESULT
@ SND_SEQ_EVENT_RESULT
Definition: seq_event.h:48
snd_seq_ev_ctrl_t::channel
unsigned char channel
Definition: seq_event.h:240
snd_seq_event_t::dest
snd_seq_addr_t dest
Definition: seq_event.h:305
snd_seq_result_t::result
int result
Definition: seq_event.h:271
snd_seq_queue_skew_t
Definition: seq_event.h:275
SND_SEQ_EVENT_START
@ SND_SEQ_EVENT_START
Definition: seq_event.h:86
SND_SEQ_EVENT_USR0
@ SND_SEQ_EVENT_USR0
Definition: seq_event.h:137