libfluidsynth  2.1.1
Functions
seqbind.h File Reference

Functions for binding sequencer objects to other subsystems. More...

Functions

FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_register_fluidsynth (fluid_sequencer_t *seq, fluid_synth_t *synth)
 Registers a synthesizer as a destination client of the given sequencer. More...
 
FLUIDSYNTH_API int fluid_sequencer_add_midi_event_to_buffer (void *data, fluid_midi_event_t *event)
 Transforms an incoming midi event (from a midi driver or midi router) to a sequencer event and adds it to the sequencer queue for sending as soon as possible. More...
 

Detailed Description

Functions for binding sequencer objects to other subsystems.

Function Documentation

◆ fluid_sequencer_register_fluidsynth()

FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_register_fluidsynth ( fluid_sequencer_t seq,
fluid_synth_t synth 
)

Registers a synthesizer as a destination client of the given sequencer.

The synth is registered with the name "fluidsynth".

Note
Implementations are encouraged to explicitly unregister this client either by calling fluid_sequencer_unregister_client() or by sending an unregistering event to the sequencer. Before fluidsynth 2.1.1 this was mandatory to avoid memory leaks.
// ... do work
// unregister the "fluidsynth" client immediately
Parameters
seqSequencer instance
synthSynthesizer instance
Returns
Sequencer client ID, or FLUID_FAILED on error.
Examples
fluidsynth_arpeggio.c, and fluidsynth_metronome.c.

References FLUID_FAILED, FLUID_PANIC, fluid_sequencer_get_use_system_timer(), and fluid_sequencer_register_client().

◆ fluid_sequencer_add_midi_event_to_buffer()

FLUIDSYNTH_API int fluid_sequencer_add_midi_event_to_buffer ( void *  data,
fluid_midi_event_t event 
)
delete_fluid_synth
FLUIDSYNTH_API void delete_fluid_synth(fluid_synth_t *synth)
Delete a FluidSynth instance.
Definition: fluid_synth.c:984
new_fluid_event
FLUIDSYNTH_API fluid_event_t * new_fluid_event(void)
Create a new sequencer event structure.
Definition: fluid_event.c:57
delete_fluid_sequencer
FLUIDSYNTH_API void delete_fluid_sequencer(fluid_sequencer_t *seq)
Free a sequencer object.
Definition: fluid_seq.c:150
fluid_event_set_source
FLUIDSYNTH_API void fluid_event_set_source(fluid_event_t *evt, fluid_seq_id_t src)
Set source of a sequencer event.
Definition: fluid_event.c:104
fluid_event_t
struct _fluid_event_t fluid_event_t
Sequencer event.
Definition: types.h:54
fluid_seq_id_t
short fluid_seq_id_t
Unique client IDs used by the sequencer and fluid_event_t, obtained by fluid_sequencer_register_clien...
Definition: types.h:65
delete_fluid_event
FLUIDSYNTH_API void delete_fluid_event(fluid_event_t *evt)
Delete a sequencer event structure.
Definition: fluid_event.c:79
fluid_sequencer_send_now
FLUIDSYNTH_API void fluid_sequencer_send_now(fluid_sequencer_t *seq, fluid_event_t *evt)
Send an event immediately.
Definition: fluid_seq.c:397
fluid_event_unregistering
FLUIDSYNTH_API void fluid_event_unregistering(fluid_event_t *evt)
Set a sequencer event to be an unregistering event.
Definition: fluid_event.c:475
fluid_event_set_dest
FLUIDSYNTH_API void fluid_event_set_dest(fluid_event_t *evt, fluid_seq_id_t dest)
Set destination of this sequencer event, i.e.
Definition: fluid_event.c:115
fluid_sequencer_register_fluidsynth
FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_register_fluidsynth(fluid_sequencer_t *seq, fluid_synth_t *synth)
Registers a synthesizer as a destination client of the given sequencer.
Definition: fluid_seqbind.c:103

Generated for libfluidsynth by doxygen 1.8.18