Functions for MIDI events, drivers and MIDI file playback. More...
Typedefs | |
typedef int(* | handle_midi_event_func_t )(void *data, fluid_midi_event_t *event) |
Generic callback function for MIDI events. | |
Enumerations | |
enum | fluid_midi_router_rule_type { FLUID_MIDI_ROUTER_RULE_NOTE, FLUID_MIDI_ROUTER_RULE_CC, FLUID_MIDI_ROUTER_RULE_PROG_CHANGE, FLUID_MIDI_ROUTER_RULE_PITCH_BEND, FLUID_MIDI_ROUTER_RULE_CHANNEL_PRESSURE, FLUID_MIDI_ROUTER_RULE_KEY_PRESSURE, FLUID_MIDI_ROUTER_RULE_COUNT } |
MIDI router rule type. More... | |
enum | fluid_player_status { FLUID_PLAYER_READY, FLUID_PLAYER_PLAYING, FLUID_PLAYER_DONE } |
MIDI player status enum. More... | |
Functions | |
FLUIDSYNTH_API fluid_midi_event_t * | new_fluid_midi_event (void) |
Create a MIDI event structure. | |
FLUIDSYNTH_API int | delete_fluid_midi_event (fluid_midi_event_t *event) |
Delete MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_type (fluid_midi_event_t *evt, int type) |
Set the event type field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_type (fluid_midi_event_t *evt) |
Get the event type field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_channel (fluid_midi_event_t *evt, int chan) |
Set the channel field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_channel (fluid_midi_event_t *evt) |
Get the channel field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_key (fluid_midi_event_t *evt) |
Get the key field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_key (fluid_midi_event_t *evt, int key) |
Set the key field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_velocity (fluid_midi_event_t *evt) |
Get the velocity field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_velocity (fluid_midi_event_t *evt, int vel) |
Set the velocity field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_control (fluid_midi_event_t *evt) |
Get the control number of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_control (fluid_midi_event_t *evt, int ctrl) |
Set the control field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_value (fluid_midi_event_t *evt) |
Get the value field from a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_value (fluid_midi_event_t *evt, int val) |
Set the value field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_program (fluid_midi_event_t *evt) |
Get the program field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_program (fluid_midi_event_t *evt, int val) |
Set the program field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_get_pitch (fluid_midi_event_t *evt) |
Get the pitch field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_pitch (fluid_midi_event_t *evt, int val) |
Set the pitch field of a MIDI event structure. | |
FLUIDSYNTH_API int | fluid_midi_event_set_sysex (fluid_midi_event_t *evt, void *data, int size, int dynamic) |
Assign sysex data to a MIDI event structure. | |
FLUIDSYNTH_API fluid_midi_router_t * | new_fluid_midi_router (fluid_settings_t *settings, handle_midi_event_func_t handler, void *event_handler_data) |
Create a new midi router. | |
FLUIDSYNTH_API int | delete_fluid_midi_router (fluid_midi_router_t *handler) |
Delete a MIDI router instance. | |
FLUIDSYNTH_API int | fluid_midi_router_set_default_rules (fluid_midi_router_t *router) |
Set a MIDI router to use default "unity" rules. | |
FLUIDSYNTH_API int | fluid_midi_router_clear_rules (fluid_midi_router_t *router) |
Clear all rules in a MIDI router. | |
FLUIDSYNTH_API int | fluid_midi_router_add_rule (fluid_midi_router_t *router, fluid_midi_router_rule_t *rule, int type) |
Add a rule to a MIDI router. | |
FLUIDSYNTH_API fluid_midi_router_rule_t * | new_fluid_midi_router_rule (void) |
Create a new MIDI router rule. | |
FLUIDSYNTH_API void | delete_fluid_midi_router_rule (fluid_midi_router_rule_t *rule) |
Free a MIDI router rule. | |
FLUIDSYNTH_API void | fluid_midi_router_rule_set_chan (fluid_midi_router_rule_t *rule, int min, int max, float mul, int add) |
Set the channel portion of a rule. | |
FLUIDSYNTH_API void | fluid_midi_router_rule_set_param1 (fluid_midi_router_rule_t *rule, int min, int max, float mul, int add) |
Set the first parameter portion of a rule. | |
FLUIDSYNTH_API void | fluid_midi_router_rule_set_param2 (fluid_midi_router_rule_t *rule, int min, int max, float mul, int add) |
Set the second parameter portion of a rule. | |
FLUIDSYNTH_API int | fluid_midi_router_handle_midi_event (void *data, fluid_midi_event_t *event) |
Handle a MIDI event through a MIDI router instance. | |
FLUIDSYNTH_API int | fluid_midi_dump_prerouter (void *data, fluid_midi_event_t *event) |
MIDI event callback function to display event information to stdout. | |
FLUIDSYNTH_API int | fluid_midi_dump_postrouter (void *data, fluid_midi_event_t *event) |
MIDI event callback function to display event information to stdout. | |
FLUIDSYNTH_API fluid_midi_driver_t * | new_fluid_midi_driver (fluid_settings_t *settings, handle_midi_event_func_t handler, void *event_handler_data) |
Create a new MIDI driver instance. | |
FLUIDSYNTH_API void | delete_fluid_midi_driver (fluid_midi_driver_t *driver) |
Delete a MIDI driver instance. | |
FLUIDSYNTH_API fluid_player_t * | new_fluid_player (fluid_synth_t *synth) |
Create a new MIDI player. | |
FLUIDSYNTH_API int | delete_fluid_player (fluid_player_t *player) |
Delete a MIDI player instance. | |
FLUIDSYNTH_API int | fluid_player_add (fluid_player_t *player, const char *midifile) |
Add a MIDI file to a player queue. | |
FLUIDSYNTH_API int | fluid_player_play (fluid_player_t *player) |
Activates play mode for a MIDI player if not already playing. | |
FLUIDSYNTH_API int | fluid_player_stop (fluid_player_t *player) |
Stops a MIDI player. | |
FLUIDSYNTH_API int | fluid_player_join (fluid_player_t *player) |
Wait for a MIDI player to terminate (when done playing). | |
FLUIDSYNTH_API int | fluid_player_set_loop (fluid_player_t *player, int loop) |
Enable looping of a MIDI player. | |
FLUIDSYNTH_API int | fluid_player_set_midi_tempo (fluid_player_t *player, int tempo) |
Set the tempo of a MIDI player. | |
FLUIDSYNTH_API int | fluid_player_set_bpm (fluid_player_t *player, int bpm) |
Set the tempo of a MIDI player in beats per minute. | |
FLUIDSYNTH_API int | fluid_player_get_status (fluid_player_t *player) |
Get MIDI player status. |
Functions for MIDI events, drivers and MIDI file playback.
typedef int(* handle_midi_event_func_t)(void *data, fluid_midi_event_t *event) |
Generic callback function for MIDI events.
data | User defined data pointer
|
MIDI router rule type.
enum fluid_player_status |
FLUIDSYNTH_API fluid_midi_event_t* new_fluid_midi_event | ( | void | ) |
Create a MIDI event structure.
FLUIDSYNTH_API int delete_fluid_midi_event | ( | fluid_midi_event_t * | evt | ) |
Delete MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_type | ( | fluid_midi_event_t * | evt, | |
int | type | |||
) |
Set the event type field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_type | ( | fluid_midi_event_t * | evt | ) |
Get the event type field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_channel | ( | fluid_midi_event_t * | evt, | |
int | chan | |||
) |
Set the channel field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_channel | ( | fluid_midi_event_t * | evt | ) |
Get the channel field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_key | ( | fluid_midi_event_t * | evt | ) |
Get the key field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_key | ( | fluid_midi_event_t * | evt, | |
int | v | |||
) |
Set the key field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_velocity | ( | fluid_midi_event_t * | evt | ) |
Get the velocity field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_velocity | ( | fluid_midi_event_t * | evt, | |
int | v | |||
) |
Set the velocity field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_control | ( | fluid_midi_event_t * | evt | ) |
Get the control number of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_control | ( | fluid_midi_event_t * | evt, | |
int | v | |||
) |
Set the control field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_value | ( | fluid_midi_event_t * | evt | ) |
Get the value field from a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_value | ( | fluid_midi_event_t * | evt, | |
int | v | |||
) |
Set the value field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_program | ( | fluid_midi_event_t * | evt | ) |
Get the program field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_program | ( | fluid_midi_event_t * | evt, | |
int | val | |||
) |
Set the program field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_get_pitch | ( | fluid_midi_event_t * | evt | ) |
Get the pitch field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_pitch | ( | fluid_midi_event_t * | evt, | |
int | val | |||
) |
Set the pitch field of a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API int fluid_midi_event_set_sysex | ( | fluid_midi_event_t * | evt, | |
void * | data, | |||
int | size, | |||
int | dynamic | |||
) |
Assign sysex data to a MIDI event structure.
evt | MIDI event structure
|
FLUIDSYNTH_API fluid_midi_router_t* new_fluid_midi_router | ( | fluid_settings_t * | settings, | |
handle_midi_event_func_t | handler, | |||
void * | event_handler_data | |||
) |
Create a new midi router.
The default rules will pass all events unmodified.
settings | Settings used to configure MIDI router
|
FLUIDSYNTH_API int delete_fluid_midi_router | ( | fluid_midi_router_t * | router | ) |
Delete a MIDI router instance.
router | MIDI router to delete
|
FLUIDSYNTH_API int fluid_midi_router_set_default_rules | ( | fluid_midi_router_t * | router | ) |
Set a MIDI router to use default "unity" rules.
Such a router will pass all events unmodified.
router | Router to set to default rules.
|
FLUIDSYNTH_API int fluid_midi_router_clear_rules | ( | fluid_midi_router_t * | router | ) |
Clear all rules in a MIDI router.
Such a router will drop all events until rules are added.
router | Router to clear all rules from
|
FLUIDSYNTH_API int fluid_midi_router_add_rule | ( | fluid_midi_router_t * | router, | |
fluid_midi_router_rule_t * | rule, | |||
int | type | |||
) |
Add a rule to a MIDI router.
router | MIDI router
|
FLUIDSYNTH_API fluid_midi_router_rule_t* new_fluid_midi_router_rule | ( | void | ) |
Create a new MIDI router rule.
FLUIDSYNTH_API void delete_fluid_midi_router_rule | ( | fluid_midi_router_rule_t * | rule | ) |
Free a MIDI router rule.
rule | Router rule to free
|
FLUIDSYNTH_API void fluid_midi_router_rule_set_chan | ( | fluid_midi_router_rule_t * | rule, | |
int | min, | |||
int | max, | |||
float | mul, | |||
int | add | |||
) |
Set the channel portion of a rule.
rule | MIDI router rule
|
FLUIDSYNTH_API void fluid_midi_router_rule_set_param1 | ( | fluid_midi_router_rule_t * | rule, | |
int | min, | |||
int | max, | |||
float | mul, | |||
int | add | |||
) |
Set the first parameter portion of a rule.
rule | MIDI router rule
|
FLUIDSYNTH_API void fluid_midi_router_rule_set_param2 | ( | fluid_midi_router_rule_t * | rule, | |
int | min, | |||
int | max, | |||
float | mul, | |||
int | add | |||
) |
Set the second parameter portion of a rule.
rule | MIDI router rule
|
FLUIDSYNTH_API int fluid_midi_router_handle_midi_event | ( | void * | data, | |
fluid_midi_event_t * | event | |||
) |
Handle a MIDI event through a MIDI router instance.
data | MIDI router instance fluid_midi_router_t, its a void * so that this function can be used as a callback for other subsystems (new_fluid_midi_driver() for example).
|
FLUIDSYNTH_API int fluid_midi_dump_prerouter | ( | void * | data, | |
fluid_midi_event_t * | event | |||
) |
MIDI event callback function to display event information to stdout.
data | MIDI router instance
|
FLUIDSYNTH_API int fluid_midi_dump_postrouter | ( | void * | data, | |
fluid_midi_event_t * | event | |||
) |
MIDI event callback function to display event information to stdout.
data | MIDI router instance
|
FLUIDSYNTH_API fluid_midi_driver_t* new_fluid_midi_driver | ( | fluid_settings_t * | settings, | |
handle_midi_event_func_t | handler, | |||
void * | event_handler_data | |||
) |
Create a new MIDI driver instance.
settings | Settings used to configure new MIDI driver.
|
FLUIDSYNTH_API void delete_fluid_midi_driver | ( | fluid_midi_driver_t * | driver | ) |
Delete a MIDI driver instance.
driver | MIDI driver to delete |
FLUIDSYNTH_API fluid_player_t* new_fluid_player | ( | fluid_synth_t * | synth | ) |
Create a new MIDI player.
synth | Fluid synthesizer instance to create player for
|
FLUIDSYNTH_API int delete_fluid_player | ( | fluid_player_t * | player | ) |
Delete a MIDI player instance.
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_add | ( | fluid_player_t * | player, | |
const char * | midifile | |||
) |
Add a MIDI file to a player queue.
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_play | ( | fluid_player_t * | player | ) |
Activates play mode for a MIDI player if not already playing.
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_stop | ( | fluid_player_t * | player | ) |
Stops a MIDI player.
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_join | ( | fluid_player_t * | player | ) |
Wait for a MIDI player to terminate (when done playing).
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_set_loop | ( | fluid_player_t * | player, | |
int | loop | |||
) |
Enable looping of a MIDI player.
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_set_midi_tempo | ( | fluid_player_t * | player, | |
int | tempo | |||
) |
Set the tempo of a MIDI player.
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_set_bpm | ( | fluid_player_t * | player, | |
int | bpm | |||
) |
Set the tempo of a MIDI player in beats per minute.
player | MIDI player instance
|
FLUIDSYNTH_API int fluid_player_get_status | ( | fluid_player_t * | player | ) |
Get MIDI player status.
player | MIDI player instance
|