libfluidsynth
1.1.11
|
Sequencer event functions and defines. More...
Macros | |
#define | FLUID_SEQ_PITCHWHHELSENS FLUID_SEQ_PITCHWHEELSENS |
Old deprecated misspelling of FLUID_SEQ_PITCHWHEELSENS. | |
Functions | |
FLUIDSYNTH_API fluid_event_t * | new_fluid_event (void) |
Create a new sequencer event structure. More... | |
FLUIDSYNTH_API void | delete_fluid_event (fluid_event_t *evt) |
Delete a sequencer event structure. More... | |
FLUIDSYNTH_API void | fluid_event_set_source (fluid_event_t *evt, fluid_seq_id_t src) |
Set source of a sequencer event. More... | |
FLUIDSYNTH_API void | fluid_event_set_dest (fluid_event_t *evt, fluid_seq_id_t dest) |
Set destination of this sequencer event, i.e. More... | |
FLUIDSYNTH_API void | fluid_event_timer (fluid_event_t *evt, void *data) |
Set a sequencer event to be a timer event. More... | |
FLUIDSYNTH_API void | fluid_event_note (fluid_event_t *evt, int channel, short key, short vel, unsigned int duration) |
Set a sequencer event to be a note duration event. More... | |
FLUIDSYNTH_API void | fluid_event_noteon (fluid_event_t *evt, int channel, short key, short vel) |
Set a sequencer event to be a note on event. More... | |
FLUIDSYNTH_API void | fluid_event_noteoff (fluid_event_t *evt, int channel, short key) |
Set a sequencer event to be a note off event. More... | |
FLUIDSYNTH_API void | fluid_event_all_sounds_off (fluid_event_t *evt, int channel) |
Set a sequencer event to be an all sounds off event. More... | |
FLUIDSYNTH_API void | fluid_event_all_notes_off (fluid_event_t *evt, int channel) |
Set a sequencer event to be a all notes off event. More... | |
FLUIDSYNTH_API void | fluid_event_bank_select (fluid_event_t *evt, int channel, short bank_num) |
Set a sequencer event to be a bank select event. More... | |
FLUIDSYNTH_API void | fluid_event_program_change (fluid_event_t *evt, int channel, short preset_num) |
Set a sequencer event to be a program change event. More... | |
FLUIDSYNTH_API void | fluid_event_program_select (fluid_event_t *evt, int channel, unsigned int sfont_id, short bank_num, short preset_num) |
Set a sequencer event to be a program select event. More... | |
FLUIDSYNTH_API void | fluid_event_control_change (fluid_event_t *evt, int channel, short control, short val) |
Set a sequencer event to be a MIDI control change event. More... | |
FLUIDSYNTH_API void | fluid_event_pitch_bend (fluid_event_t *evt, int channel, int val) |
Set a sequencer event to be a pitch bend event. More... | |
FLUIDSYNTH_API void | fluid_event_pitch_wheelsens (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a pitch wheel sensitivity event. More... | |
FLUIDSYNTH_API void | fluid_event_modulation (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a modulation event. More... | |
FLUIDSYNTH_API void | fluid_event_sustain (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a MIDI sustain event. More... | |
FLUIDSYNTH_API void | fluid_event_pan (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a stereo pan event. More... | |
FLUIDSYNTH_API void | fluid_event_volume (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a volume event. More... | |
FLUIDSYNTH_API void | fluid_event_reverb_send (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a reverb send event. More... | |
FLUIDSYNTH_API void | fluid_event_chorus_send (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a chorus send event. More... | |
FLUIDSYNTH_API void | fluid_event_channel_pressure (fluid_event_t *evt, int channel, short val) |
Set a sequencer event to be a channel-wide aftertouch event. More... | |
FLUIDSYNTH_API void | fluid_event_system_reset (fluid_event_t *evt) |
Set a sequencer event to be a midi system reset event. More... | |
FLUIDSYNTH_API void | fluid_event_any_control_change (fluid_event_t *evt, int channel) |
Set a sequencer event to be an any control change event (for internal use). More... | |
FLUIDSYNTH_API void | fluid_event_unregistering (fluid_event_t *evt) |
Set a sequencer event to be an unregistering event. More... | |
FLUIDSYNTH_API int | fluid_event_get_type (fluid_event_t *evt) |
Get the event type (fluid_seq_event_type) field from a sequencer event structure. More... | |
FLUIDSYNTH_API fluid_seq_id_t | fluid_event_get_source (fluid_event_t *evt) |
Get the source sequencer client from a sequencer event structure. More... | |
FLUIDSYNTH_API fluid_seq_id_t | fluid_event_get_dest (fluid_event_t *evt) |
Get the dest sequencer client from a sequencer event structure. More... | |
FLUIDSYNTH_API int | fluid_event_get_channel (fluid_event_t *evt) |
Get the MIDI channel field from a sequencer event structure. More... | |
FLUIDSYNTH_API short | fluid_event_get_key (fluid_event_t *evt) |
Get the MIDI note field from a sequencer event structure. More... | |
FLUIDSYNTH_API short | fluid_event_get_velocity (fluid_event_t *evt) |
Get the MIDI velocity field from a sequencer event structure. More... | |
FLUIDSYNTH_API short | fluid_event_get_control (fluid_event_t *evt) |
Get the MIDI control number field from a sequencer event structure. More... | |
FLUIDSYNTH_API short | fluid_event_get_value (fluid_event_t *evt) |
Get the value field from a sequencer event structure. More... | |
FLUIDSYNTH_API short | fluid_event_get_program (fluid_event_t *evt) |
Get the MIDI program field from a sequencer event structure. More... | |
FLUIDSYNTH_API void * | fluid_event_get_data (fluid_event_t *evt) |
Get the data field from a sequencer event structure. More... | |
FLUIDSYNTH_API unsigned int | fluid_event_get_duration (fluid_event_t *evt) |
Get the duration field from a sequencer event structure. More... | |
FLUIDSYNTH_API short | fluid_event_get_bank (fluid_event_t *evt) |
Get the MIDI bank field from a sequencer event structure. More... | |
FLUIDSYNTH_API int | fluid_event_get_pitch (fluid_event_t *evt) |
Get the pitch field from a sequencer event structure. More... | |
FLUIDSYNTH_API unsigned int | fluid_event_get_sfont_id (fluid_event_t *evt) |
Get the SoundFont ID field from a sequencer event structure. More... | |
Sequencer event functions and defines.
Functions and constants for creating/processing sequencer events.
enum fluid_seq_event_type |
Sequencer event type enumeration.
Enumerator | |
---|---|
FLUID_SEQ_NOTE | Note event with duration. |
FLUID_SEQ_NOTEON | Note on event. |
FLUID_SEQ_NOTEOFF | Note off event. |
FLUID_SEQ_ALLSOUNDSOFF | All sounds off event. |
FLUID_SEQ_ALLNOTESOFF | All notes off event. |
FLUID_SEQ_BANKSELECT | Bank select message. |
FLUID_SEQ_PROGRAMCHANGE | Program change message. |
FLUID_SEQ_PROGRAMSELECT | Program select message (DOCME) |
FLUID_SEQ_PITCHBEND | Pitch bend message. |
FLUID_SEQ_PITCHWHEELSENS | Pitch wheel sensitivity set message.
|
FLUID_SEQ_MODULATION | Modulation controller event. |
FLUID_SEQ_SUSTAIN | Sustain controller event. |
FLUID_SEQ_CONTROLCHANGE | MIDI control change event. |
FLUID_SEQ_PAN | Stereo pan set event. |
FLUID_SEQ_VOLUME | Volume set event. |
FLUID_SEQ_REVERBSEND | Reverb send set event. |
FLUID_SEQ_CHORUSSEND | Chorus send set event. |
FLUID_SEQ_TIMER | Timer event (useful for giving a callback at a certain time) |
FLUID_SEQ_ANYCONTROLCHANGE | Any control change message (only internally used for remove_events) |
FLUID_SEQ_CHANNELPRESSURE | Channel aftertouch event.
|
FLUID_SEQ_SYSTEMRESET | System reset event.
|
FLUID_SEQ_UNREGISTERING | Called when a sequencer client is being unregistered.
|
FLUID_SEQ_LASTEVENT | Defines the count of event enums.
|
FLUIDSYNTH_API fluid_event_t* new_fluid_event | ( | void | ) |
Create a new sequencer event structure.
References fluid_log(), and FLUID_PANIC.
Referenced by fluid_sequencer_unregister_client().
FLUIDSYNTH_API void delete_fluid_event | ( | fluid_event_t * | evt | ) |
Delete a sequencer event structure.
evt | Sequencer event structure created by new_fluid_event(). |
Referenced by fluid_sequencer_unregister_client().
FLUIDSYNTH_API void fluid_event_set_source | ( | fluid_event_t * | evt, |
fluid_seq_id_t | src | ||
) |
Set source of a sequencer event.
src
must be a unique sequencer ID or -1 if not set.
evt | Sequencer event structure |
src | Unique sequencer ID |
Referenced by fluid_sequencer_get_time_scale().
FLUIDSYNTH_API void fluid_event_set_dest | ( | fluid_event_t * | evt, |
fluid_seq_id_t | dest | ||
) |
Set destination of this sequencer event, i.e.
the sequencer client this event will be sent to. dest
must be a unique sequencer ID.
evt | Sequencer event structure |
dest | The destination unique sequencer ID |
Referenced by fluid_sequencer_add_midi_event_to_buffer(), fluid_sequencer_get_time_scale(), and fluid_sequencer_unregister_client().
FLUIDSYNTH_API void fluid_event_timer | ( | fluid_event_t * | evt, |
void * | data | ||
) |
Set a sequencer event to be a timer event.
evt | Sequencer event structure |
data | User supplied data pointer |
References FLUID_SEQ_TIMER.
FLUIDSYNTH_API void fluid_event_note | ( | fluid_event_t * | evt, |
int | channel, | ||
short | key, | ||
short | vel, | ||
unsigned int | duration | ||
) |
Set a sequencer event to be a note duration event.
evt | Sequencer event structure |
channel | MIDI channel number |
key | MIDI note number (0-127) |
vel | MIDI velocity value (0-127) |
duration | Duration of note in the time scale used by the sequencer (by default milliseconds) |
References FLUID_SEQ_NOTE.
FLUIDSYNTH_API void fluid_event_noteon | ( | fluid_event_t * | evt, |
int | channel, | ||
short | key, | ||
short | vel | ||
) |
Set a sequencer event to be a note on event.
evt | Sequencer event structure |
channel | MIDI channel number |
key | MIDI note number (0-127) |
vel | MIDI velocity value (0-127) |
References FLUID_SEQ_NOTEON.
Referenced by fluid_sequencer_add_midi_event_to_buffer().
FLUIDSYNTH_API void fluid_event_noteoff | ( | fluid_event_t * | evt, |
int | channel, | ||
short | key | ||
) |
Set a sequencer event to be a note off event.
evt | Sequencer event structure |
channel | MIDI channel number |
key | MIDI note number (0-127) |
References FLUID_SEQ_NOTEOFF.
Referenced by fluid_sequencer_add_midi_event_to_buffer(), and fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API void fluid_event_all_sounds_off | ( | fluid_event_t * | evt, |
int | channel | ||
) |
Set a sequencer event to be an all sounds off event.
evt | Sequencer event structure |
channel | MIDI channel number |
References FLUID_SEQ_ALLSOUNDSOFF.
FLUIDSYNTH_API void fluid_event_all_notes_off | ( | fluid_event_t * | evt, |
int | channel | ||
) |
Set a sequencer event to be a all notes off event.
evt | Sequencer event structure |
channel | MIDI channel number |
References FLUID_SEQ_ALLNOTESOFF.
FLUIDSYNTH_API void fluid_event_bank_select | ( | fluid_event_t * | evt, |
int | channel, | ||
short | bank_num | ||
) |
Set a sequencer event to be a bank select event.
evt | Sequencer event structure |
channel | MIDI channel number |
bank_num | MIDI bank number (0-16383) |
References FLUID_SEQ_BANKSELECT.
FLUIDSYNTH_API void fluid_event_program_change | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a program change event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | MIDI program number (0-127) |
References FLUID_SEQ_PROGRAMCHANGE.
Referenced by fluid_sequencer_add_midi_event_to_buffer().
FLUIDSYNTH_API void fluid_event_program_select | ( | fluid_event_t * | evt, |
int | channel, | ||
unsigned int | sfont_id, | ||
short | bank_num, | ||
short | preset_num | ||
) |
Set a sequencer event to be a program select event.
evt | Sequencer event structure |
channel | MIDI channel number |
sfont_id | SoundFont ID number |
bank_num | MIDI bank number (0-16383) |
preset_num | MIDI preset number (0-127) |
References FLUID_SEQ_PROGRAMSELECT.
FLUIDSYNTH_API void fluid_event_control_change | ( | fluid_event_t * | evt, |
int | channel, | ||
short | control, | ||
short | val | ||
) |
Set a sequencer event to be a MIDI control change event.
evt | Sequencer event structure |
channel | MIDI channel number |
control | MIDI control number (0-127) |
val | MIDI control value (0-127) |
References FLUID_SEQ_CONTROLCHANGE.
Referenced by fluid_sequencer_add_midi_event_to_buffer().
FLUIDSYNTH_API void fluid_event_pitch_bend | ( | fluid_event_t * | evt, |
int | channel, | ||
int | pitch | ||
) |
Set a sequencer event to be a pitch bend event.
evt | Sequencer event structure |
channel | MIDI channel number |
pitch | MIDI pitch bend value (0-16383, 8192 = no bend) |
References FLUID_SEQ_PITCHBEND.
Referenced by fluid_sequencer_add_midi_event_to_buffer().
FLUIDSYNTH_API void fluid_event_pitch_wheelsens | ( | fluid_event_t * | evt, |
int | channel, | ||
short | value | ||
) |
Set a sequencer event to be a pitch wheel sensitivity event.
evt | Sequencer event structure |
channel | MIDI channel number |
value | MIDI pitch wheel sensitivity value in semitones |
References FLUID_SEQ_PITCHWHHELSENS.
FLUIDSYNTH_API void fluid_event_modulation | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a modulation event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | MIDI modulation value (0-127) |
References FLUID_SEQ_MODULATION.
FLUIDSYNTH_API void fluid_event_sustain | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a MIDI sustain event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | MIDI sustain value (0-127) |
References FLUID_SEQ_SUSTAIN.
FLUIDSYNTH_API void fluid_event_pan | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a stereo pan event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | MIDI panning value (0-127, 0=left, 64 = middle, 127 = right) |
References FLUID_SEQ_PAN.
FLUIDSYNTH_API void fluid_event_volume | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a volume event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | Volume value (0-127) |
References FLUID_SEQ_VOLUME.
FLUIDSYNTH_API void fluid_event_reverb_send | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a reverb send event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | Reverb amount (0-127) |
References FLUID_SEQ_REVERBSEND.
FLUIDSYNTH_API void fluid_event_chorus_send | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a chorus send event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | Chorus amount (0-127) |
References FLUID_SEQ_CHORUSSEND.
FLUIDSYNTH_API void fluid_event_channel_pressure | ( | fluid_event_t * | evt, |
int | channel, | ||
short | val | ||
) |
Set a sequencer event to be a channel-wide aftertouch event.
evt | Sequencer event structure |
channel | MIDI channel number |
val | Aftertouch amount (0-127) |
References FLUID_SEQ_CHANNELPRESSURE.
Referenced by fluid_sequencer_add_midi_event_to_buffer().
FLUIDSYNTH_API void fluid_event_system_reset | ( | fluid_event_t * | evt | ) |
Set a sequencer event to be a midi system reset event.
evt | Sequencer event structure |
References FLUID_SEQ_SYSTEMRESET.
Referenced by fluid_sequencer_add_midi_event_to_buffer().
FLUIDSYNTH_API void fluid_event_any_control_change | ( | fluid_event_t * | evt, |
int | channel | ||
) |
Set a sequencer event to be an any control change event (for internal use).
evt | Sequencer event structure |
channel | MIDI channel number |
References FLUID_SEQ_ANYCONTROLCHANGE.
FLUIDSYNTH_API void fluid_event_unregistering | ( | fluid_event_t * | evt | ) |
Set a sequencer event to be an unregistering event.
evt | Sequencer event structure |
References FLUID_SEQ_UNREGISTERING.
Referenced by fluid_sequencer_unregister_client().
FLUIDSYNTH_API int fluid_event_get_type | ( | fluid_event_t * | evt | ) |
Get the event type (fluid_seq_event_type) field from a sequencer event structure.
evt | Sequencer event structure |
Referenced by fluid_sequencer_process(), and fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_source | ( | fluid_event_t * | evt | ) |
Get the source sequencer client from a sequencer event structure.
evt | Sequencer event structure |
Referenced by fluid_sequencer_process().
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_dest | ( | fluid_event_t * | evt | ) |
Get the dest sequencer client from a sequencer event structure.
evt | Sequencer event structure |
Referenced by fluid_sequencer_process(), and fluid_sequencer_send_now().
FLUIDSYNTH_API int fluid_event_get_channel | ( | fluid_event_t * | evt | ) |
Get the MIDI channel field from a sequencer event structure.
evt | Sequencer event structure |
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API short fluid_event_get_key | ( | fluid_event_t * | evt | ) |
Get the MIDI note field from a sequencer event structure.
evt | Sequencer event structure |
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API short fluid_event_get_velocity | ( | fluid_event_t * | evt | ) |
Get the MIDI velocity field from a sequencer event structure.
evt | Sequencer event structure |
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API short fluid_event_get_control | ( | fluid_event_t * | evt | ) |
Get the MIDI control number field from a sequencer event structure.
evt | Sequencer event structure |
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API short fluid_event_get_value | ( | fluid_event_t * | evt | ) |
Get the value field from a sequencer event structure.
evt | Sequencer event structure |
The Value field is used by the following event types: FLUID_SEQ_PROGRAMCHANGE, FLUID_SEQ_PROGRAMSELECT (preset_num), FLUID_SEQ_PITCHWHHELSENS, FLUID_SEQ_MODULATION, FLUID_SEQ_SUSTAIN, FLUID_SEQ_CONTROLCHANGE, FLUID_SEQ_PAN, FLUID_SEQ_VOLUME, FLUID_SEQ_REVERBSEND, FLUID_SEQ_CHORUSSEND.
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API short fluid_event_get_program | ( | fluid_event_t * | evt | ) |
Get the MIDI program field from a sequencer event structure.
evt | Sequencer event structure |
Used by the FLUID_SEQ_PROGRAMCHANGE and FLUID_SEQ_PROGRAMSELECT event types.
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API void* fluid_event_get_data | ( | fluid_event_t * | evt | ) |
Get the data field from a sequencer event structure.
evt | Sequencer event structure |
Used by the FLUID_SEQ_TIMER event type.
FLUIDSYNTH_API unsigned int fluid_event_get_duration | ( | fluid_event_t * | evt | ) |
Get the duration field from a sequencer event structure.
evt | Sequencer event structure |
Used by the FLUID_SEQ_NOTE event type.
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API short fluid_event_get_bank | ( | fluid_event_t * | evt | ) |
Get the MIDI bank field from a sequencer event structure.
evt | Sequencer event structure |
Used by the FLUID_SEQ_BANKSELECT and FLUID_SEQ_PROGRAMSELECT event types.
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API int fluid_event_get_pitch | ( | fluid_event_t * | evt | ) |
Get the pitch field from a sequencer event structure.
evt | Sequencer event structure |
Used by the FLUID_SEQ_PITCHBEND event type.
Referenced by fluid_sequencer_register_fluidsynth().
FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id | ( | fluid_event_t * | evt | ) |
Get the SoundFont ID field from a sequencer event structure.
evt | Sequencer event structure |
Used by the FLUID_SEQ_PROGRAMSELECT event type.
References fluid_log(), and FLUID_PANIC.
Referenced by fluid_sequencer_register_fluidsynth().