|
libfluidsynth
1.1.11
|
MIDI event sequencer. More...
Typedefs | |
| typedef void(* | fluid_event_callback_t) (unsigned int time, fluid_event_t *event, fluid_sequencer_t *seq, void *data) |
| Event callback prototype for destination clients. More... | |
Functions | |
| FLUIDSYNTH_API fluid_sequencer_t * | new_fluid_sequencer (void) |
| Create a new sequencer object which uses the system timer. More... | |
| FLUIDSYNTH_API fluid_sequencer_t * | new_fluid_sequencer2 (int use_system_timer) |
| Create a new sequencer object. More... | |
| FLUIDSYNTH_API void | delete_fluid_sequencer (fluid_sequencer_t *seq) |
| Free a sequencer object. More... | |
| FLUIDSYNTH_API int | fluid_sequencer_get_use_system_timer (fluid_sequencer_t *seq) |
| Check if a sequencer is using the system timer or not. More... | |
| FLUIDSYNTH_API fluid_seq_id_t | fluid_sequencer_register_client (fluid_sequencer_t *seq, const char *name, fluid_event_callback_t callback, void *data) |
| Register a sequencer client. More... | |
| FLUIDSYNTH_API void | fluid_sequencer_unregister_client (fluid_sequencer_t *seq, fluid_seq_id_t id) |
| Unregister a previously registered client. More... | |
| FLUIDSYNTH_API int | fluid_sequencer_count_clients (fluid_sequencer_t *seq) |
| Count a sequencers registered clients. More... | |
| FLUIDSYNTH_API fluid_seq_id_t | fluid_sequencer_get_client_id (fluid_sequencer_t *seq, int index) |
| Get a client ID from its index (order in which it was registered). More... | |
| FLUIDSYNTH_API char * | fluid_sequencer_get_client_name (fluid_sequencer_t *seq, int id) |
| Get the name of a registered client. More... | |
| FLUIDSYNTH_API int | fluid_sequencer_client_is_dest (fluid_sequencer_t *seq, int id) |
| Check if a client is a destination client. More... | |
| FLUIDSYNTH_API void | fluid_sequencer_process (fluid_sequencer_t *seq, unsigned int msec) |
| Advance a sequencer that isn't using the system timer. More... | |
| FLUIDSYNTH_API void | fluid_sequencer_send_now (fluid_sequencer_t *seq, fluid_event_t *evt) |
| Send an event immediately. More... | |
| FLUIDSYNTH_API int | fluid_sequencer_send_at (fluid_sequencer_t *seq, fluid_event_t *evt, unsigned int time, int absolute) |
| Schedule an event for sending at a later time. More... | |
| FLUIDSYNTH_API void | fluid_sequencer_remove_events (fluid_sequencer_t *seq, fluid_seq_id_t source, fluid_seq_id_t dest, int type) |
| Remove events from the event queue. More... | |
| FLUIDSYNTH_API unsigned int | fluid_sequencer_get_tick (fluid_sequencer_t *seq) |
| Get the current tick of a sequencer. More... | |
| FLUIDSYNTH_API void | fluid_sequencer_set_time_scale (fluid_sequencer_t *seq, double scale) |
| Set the time scale of a sequencer. More... | |
| FLUIDSYNTH_API double | fluid_sequencer_get_time_scale (fluid_sequencer_t *seq) |
| Get a sequencer's time scale. More... | |
MIDI event sequencer.
| typedef void(* fluid_event_callback_t) (unsigned int time, fluid_event_t *event, fluid_sequencer_t *seq, void *data) |
Event callback prototype for destination clients.
| time | Current sequencer tick value (see fluid_sequencer_get_tick()). |
| event | The event being received |
| seq | The sequencer instance |
| data | User defined data registered with the client |
| FLUIDSYNTH_API fluid_sequencer_t* new_fluid_sequencer | ( | void | ) |
Create a new sequencer object which uses the system timer.
Use new_fluid_sequencer2() to specify whether the system timer or fluid_sequencer_process() is used to advance the sequencer.
References new_fluid_sequencer2().
| FLUIDSYNTH_API fluid_sequencer_t* new_fluid_sequencer2 | ( | int | use_system_timer | ) |
Create a new sequencer object.
| use_system_timer | If TRUE, sequencer will advance at the rate of the system clock. If FALSE, call fluid_sequencer_process() to advance the sequencer. |
References fluid_log(), and FLUID_PANIC.
Referenced by new_fluid_sequencer().
| FLUIDSYNTH_API void delete_fluid_sequencer | ( | fluid_sequencer_t * | seq | ) |
Free a sequencer object.
| seq | Sequencer to delete |
References fluid_sequencer_unregister_client().
| FLUIDSYNTH_API int fluid_sequencer_get_use_system_timer | ( | fluid_sequencer_t * | seq | ) |
Check if a sequencer is using the system timer or not.
| seq | Sequencer object |
Referenced by fluid_sequencer_register_fluidsynth().
| FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_register_client | ( | fluid_sequencer_t * | seq, |
| const char * | name, | ||
| fluid_event_callback_t | callback, | ||
| void * | data | ||
| ) |
Register a sequencer client.
| seq | Sequencer object |
| name | Name of sequencer client |
| callback | Sequencer client callback or NULL for a source client. |
| data | User data to pass to the callback |
Clients can be sources or destinations of events. Sources don't need to register a callback.
References FLUID_FAILED, fluid_log(), and FLUID_PANIC.
Referenced by fluid_sequencer_register_fluidsynth().
| FLUIDSYNTH_API void fluid_sequencer_unregister_client | ( | fluid_sequencer_t * | seq, |
| fluid_seq_id_t | id | ||
| ) |
Unregister a previously registered client.
| seq | Sequencer object |
| id | Client ID as returned by fluid_sequencer_register_client(). |
References delete_fluid_event(), fluid_event_set_dest(), fluid_event_unregistering(), fluid_sequencer_get_tick(), and new_fluid_event().
Referenced by delete_fluid_sequencer().
| FLUIDSYNTH_API int fluid_sequencer_count_clients | ( | fluid_sequencer_t * | seq | ) |
Count a sequencers registered clients.
| seq | Sequencer object |
Referenced by fluid_sequencer_register_fluidsynth().
| FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_get_client_id | ( | fluid_sequencer_t * | seq, |
| int | index | ||
| ) |
Get a client ID from its index (order in which it was registered).
| seq | Sequencer object |
| index | Index of register client |
References FLUID_FAILED.
Referenced by fluid_sequencer_register_fluidsynth().
| FLUIDSYNTH_API char* fluid_sequencer_get_client_name | ( | fluid_sequencer_t * | seq, |
| int | id | ||
| ) |
Get the name of a registered client.
| seq | Sequencer object |
| id | Client ID |
Referenced by fluid_sequencer_register_fluidsynth().
| FLUIDSYNTH_API int fluid_sequencer_client_is_dest | ( | fluid_sequencer_t * | seq, |
| int | id | ||
| ) |
Check if a client is a destination client.
| seq | Sequencer object |
| id | Client ID |
| FLUIDSYNTH_API void fluid_sequencer_process | ( | fluid_sequencer_t * | seq, |
| unsigned int | msec | ||
| ) |
Advance a sequencer that isn't using the system timer.
| seq | Sequencer object |
| msec | Time to advance sequencer to (absolute time since sequencer start). |
References fluid_event_get_dest(), fluid_event_get_source(), fluid_event_get_type(), FLUID_SEQ_ANYCONTROLCHANGE, FLUID_SEQ_CHORUSSEND, FLUID_SEQ_CONTROLCHANGE, FLUID_SEQ_MODULATION, FLUID_SEQ_PAN, FLUID_SEQ_PITCHBEND, FLUID_SEQ_REVERBSEND, FLUID_SEQ_SUSTAIN, FLUID_SEQ_VOLUME, fluid_sequencer_get_tick(), and fluid_sequencer_send_now().
Referenced by fluid_sequencer_get_time_scale(), and fluid_sequencer_register_fluidsynth().
| FLUIDSYNTH_API void fluid_sequencer_send_now | ( | fluid_sequencer_t * | seq, |
| fluid_event_t * | evt | ||
| ) |
Send an event immediately.
| seq | Sequencer object |
| evt | Event to send (copied) |
References fluid_event_get_dest(), and fluid_sequencer_get_tick().
Referenced by fluid_sequencer_process().
| FLUIDSYNTH_API int fluid_sequencer_send_at | ( | fluid_sequencer_t * | seq, |
| fluid_event_t * | evt, | ||
| unsigned int | time, | ||
| int | absolute | ||
| ) |
Schedule an event for sending at a later time.
| seq | Sequencer object |
| evt | Event to send |
| time | Time value in ticks (in milliseconds with the default time scale of 1000). |
| absolute | TRUE if time is absolute sequencer time (time since sequencer creation), FALSE if relative to current time. |
References fluid_sequencer_get_tick().
Referenced by fluid_sequencer_add_midi_event_to_buffer(), and fluid_sequencer_register_fluidsynth().
| FLUIDSYNTH_API void fluid_sequencer_remove_events | ( | fluid_sequencer_t * | seq, |
| fluid_seq_id_t | source, | ||
| fluid_seq_id_t | dest, | ||
| int | type | ||
| ) |
Remove events from the event queue.
| seq | Sequencer object |
| source | Source client ID to match or -1 for wildcard |
| dest | Destination client ID to match or -1 for wildcard |
| type | Event type to match or -1 for wildcard (fluid_seq_event_type) |
| FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick | ( | fluid_sequencer_t * | seq | ) |
Get the current tick of a sequencer.
| seq | Sequencer object |
Referenced by fluid_sequencer_add_midi_event_to_buffer(), fluid_sequencer_get_time_scale(), fluid_sequencer_process(), fluid_sequencer_send_at(), fluid_sequencer_send_now(), and fluid_sequencer_unregister_client().
| FLUIDSYNTH_API void fluid_sequencer_set_time_scale | ( | fluid_sequencer_t * | seq, |
| double | scale | ||
| ) |
Set the time scale of a sequencer.
| seq | Sequencer object |
| scale | Sequencer scale value in ticks per second (default is 1000 for 1 tick per millisecond, max is 1000.0) |
If there are already scheduled events in the sequencer and the scale is changed the events are adjusted accordingly.
References fluid_log(), and FLUID_WARN.
| FLUIDSYNTH_API double fluid_sequencer_get_time_scale | ( | fluid_sequencer_t * | seq | ) |
Get a sequencer's time scale.
| seq | Sequencer object. |
References fluid_event_set_dest(), fluid_event_set_source(), fluid_log(), FLUID_PANIC, fluid_sequencer_get_tick(), and fluid_sequencer_process().
1.8.13