ALSA project - the C library reference: Sequencer Event Type Checks

ALSA project - the C library reference

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Variables
Sequencer Event Type Checks
MIDI Sequencer

## Macros
#define | _SND_SEQ_TYPE(x) (1<<(x))
#define | _SND_SEQ_TYPE_OPT(x) ((x)<<24)
#define | snd_seq_type_check(ev, x) (snd_seq_event_types[(ev)->type] & _SND_SEQ_TYPE(x))
#define | snd_seq_ev_is_result_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_RESULT)
#define | snd_seq_ev_is_note_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_NOTE)
#define | snd_seq_ev_is_control_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_CONTROL)
#define | snd_seq_ev_is_channel_type(ev) (snd_seq_event_types[(ev)->type] & (_SND_SEQ_TYPE(SND_SEQ_EVFLG_NOTE) | _SND_SEQ_TYPE(SND_SEQ_EVFLG_CONTROL)))
#define | snd_seq_ev_is_queue_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_QUEUE)
#define | snd_seq_ev_is_message_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_MESSAGE)
#define | snd_seq_ev_is_subscribe_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_CONNECTION)
#define | snd_seq_ev_is_sample_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_SAMPLE)
#define | snd_seq_ev_is_user_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_USERS)
#define | snd_seq_ev_is_instr_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_INSTR)
#define | snd_seq_ev_is_fixed_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_FIXED)
#define | snd_seq_ev_is_variable_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_VARIABLE)
#define | snd_seq_ev_is_varusr_type(ev) snd_seq_type_check(ev, SND_SEQ_EVFLG_VARUSR)
#define | snd_seq_ev_is_reserved(ev) (! snd_seq_event_types[(ev)->type])
#define | snd_seq_ev_is_prior(ev) (((ev)->flags & SND_SEQ_PRIORITY_MASK) == SND_SEQ_PRIORITY_HIGH)
#define | snd_seq_ev_length_type(ev) ((ev)->flags & SND_SEQ_EVENT_LENGTH_MASK)
#define | snd_seq_ev_is_fixed(ev) (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_FIXED)
#define | snd_seq_ev_is_variable(ev) (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARIABLE)
#define | snd_seq_ev_is_varusr(ev) (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARUSR)
#define | snd_seq_ev_timestamp_type(ev) ((ev)->flags & SND_SEQ_TIME_STAMP_MASK)
#define | snd_seq_ev_is_tick(ev) (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_TICK)
#define | snd_seq_ev_is_real(ev) (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_REAL)
#define | snd_seq_ev_timemode_type(ev) ((ev)->flags & SND_SEQ_TIME_MODE_MASK)
#define | snd_seq_ev_is_abstime(ev) (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_ABS)
#define | snd_seq_ev_is_reltime(ev) (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_REL)
#define | snd_seq_ev_is_direct(ev) ((ev)->queue == SND_SEQ_QUEUE_DIRECT)

## Enumerations
enum | { SND_SEQ_EVFLG_RESULT, SND_SEQ_EVFLG_NOTE, SND_SEQ_EVFLG_CONTROL, SND_SEQ_EVFLG_QUEUE, SND_SEQ_EVFLG_SYSTEM, SND_SEQ_EVFLG_MESSAGE, SND_SEQ_EVFLG_CONNECTION, SND_SEQ_EVFLG_SAMPLE, SND_SEQ_EVFLG_USERS, SND_SEQ_EVFLG_INSTR, SND_SEQ_EVFLG_QUOTE, SND_SEQ_EVFLG_NONE, SND_SEQ_EVFLG_RAW, SND_SEQ_EVFLG_FIXED, SND_SEQ_EVFLG_VARIABLE, SND_SEQ_EVFLG_VARUSR }
enum | { SND_SEQ_EVFLG_NOTE_ONEARG, SND_SEQ_EVFLG_NOTE_TWOARG }
enum | { SND_SEQ_EVFLG_QUEUE_NOARG, SND_SEQ_EVFLG_QUEUE_TICK, SND_SEQ_EVFLG_QUEUE_TIME, SND_SEQ_EVFLG_QUEUE_VALUE }

## Variables
const unsigned int | snd_seq_event_types []

## Detailed Description

Sequencer Event Type Checks

## Macro Definition Documentation

#define _SND_SEQ_TYPE | ( |  | x | ) | (1<<(x))

master type - 24bit

#define _SND_SEQ_TYPE_OPT | ( |  | x | ) | ((x)<<24)

optional type - 8bit

#define snd_seq_ev_is_abstime | ( |  | ev | ) | (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_ABS)

scheduled in absolute time

#define snd_seq_ev_is_channel_type | ( |  | ev | ) | (snd_seq_event_types[(ev)->type] & (_SND_SEQ_TYPE(SND_SEQ_EVFLG_NOTE) | _SND_SEQ_TYPE(SND_SEQ_EVFLG_CONTROL)))

event type check: channel specific events

#define snd_seq_ev_is_control_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_CONTROL)

event type check: control events

#define snd_seq_ev_is_direct | ( |  | ev | ) | ((ev)->queue == SND_SEQ_QUEUE_DIRECT)

direct dispatched events

#define snd_seq_ev_is_fixed | ( |  | ev | ) | (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_FIXED)

fixed length events

#define snd_seq_ev_is_fixed_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_FIXED)

event type check: fixed length events

#define snd_seq_ev_is_instr_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_INSTR)

event type check: instrument layer events

#define snd_seq_ev_is_message_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_MESSAGE)

event type check: system status messages

#define snd_seq_ev_is_note_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_NOTE)

event type check: note events

#define snd_seq_ev_is_prior | ( |  | ev | ) | (((ev)->flags & SND_SEQ_PRIORITY_MASK) == SND_SEQ_PRIORITY_HIGH)

macros to check event flagsprior events

#define snd_seq_ev_is_queue_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_QUEUE)

event type check: queue control events

#define snd_seq_ev_is_real | ( |  | ev | ) | (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_REAL)

event is in real-time

#define snd_seq_ev_is_reltime | ( |  | ev | ) | (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_REL)

scheduled in relative time

#define snd_seq_ev_is_reserved | ( |  | ev | ) | (! snd_seq_event_types[(ev)->type])

event type check: reserved for kernel

#define snd_seq_ev_is_result_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_RESULT)

event type check: result events

#define snd_seq_ev_is_sample_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_SAMPLE)

event type check: sample messages

#define snd_seq_ev_is_subscribe_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_CONNECTION)

event type check: system status messages

#define snd_seq_ev_is_tick | ( |  | ev | ) | (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_TICK)

event is in tick time

#define snd_seq_ev_is_user_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_USERS)

event type check: user-defined messages

#define snd_seq_ev_is_variable | ( |  | ev | ) | (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARIABLE)

variable length events

#define snd_seq_ev_is_variable_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_VARIABLE)

event type check: variable length events

#define snd_seq_ev_is_varusr | ( |  | ev | ) | (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARUSR)

variable length on user-space

#define snd_seq_ev_is_varusr_type | ( |  | ev | ) | snd_seq_type_check(ev, SND_SEQ_EVFLG_VARUSR)

event type check: user pointer events

#define snd_seq_ev_length_type | ( |  | ev | ) | ((ev)->flags & SND_SEQ_EVENT_LENGTH_MASK)

get the data length type

#define snd_seq_ev_timemode_type | ( |  | ev | ) | ((ev)->flags & SND_SEQ_TIME_MODE_MASK)

time-mode type

#define snd_seq_ev_timestamp_type | ( |  | ev | ) | ((ev)->flags & SND_SEQ_TIME_STAMP_MASK)

time-stamp type

#define snd_seq_type_check | ( |  | ev,
|  |  | x
| ) |  | (snd_seq_event_types[(ev)->type] & _SND_SEQ_TYPE(x))

check the event type

## Variable Documentation

const unsigned int snd_seq_event_types[]

Exported event type table

This table is referred by snd_seq_ev_is_xxx.

Event types conversion array