libfluidsynth
2.4.5
|
Functions to control and query synthesis parameters like gain and polyphony count. More...
Enumerations | |
enum | fluid_interp { FLUID_INTERP_NONE = 0 , FLUID_INTERP_LINEAR = 1 , FLUID_INTERP_4THORDER = 4 , FLUID_INTERP_7THORDER = 7 , FLUID_INTERP_DEFAULT = FLUID_INTERP_4THORDER , FLUID_INTERP_HIGHEST = FLUID_INTERP_7THORDER } |
Synthesis interpolation method. More... | |
enum | fluid_synth_add_mod { FLUID_SYNTH_OVERWRITE , FLUID_SYNTH_ADD } |
Enum used with fluid_synth_add_default_mod() to specify how to handle duplicate modulators. More... | |
Functions | |
int | fluid_synth_add_default_mod (fluid_synth_t *synth, const fluid_mod_t *mod, int mode) |
Adds the specified modulator mod as default modulator to the synth. More... | |
int | fluid_synth_count_audio_channels (fluid_synth_t *synth) |
Get the total count of audio channels. More... | |
int | fluid_synth_count_audio_groups (fluid_synth_t *synth) |
Get the total number of allocated audio channels. More... | |
int | fluid_synth_count_effects_channels (fluid_synth_t *synth) |
Get the total number of allocated effects channels. More... | |
int | fluid_synth_count_effects_groups (fluid_synth_t *synth) |
Get the total number of allocated effects units. More... | |
int | fluid_synth_count_midi_channels (fluid_synth_t *synth) |
Get the total count of MIDI channels. More... | |
int | fluid_synth_get_active_voice_count (fluid_synth_t *synth) |
Get current number of active voices. More... | |
float | fluid_synth_get_gain (fluid_synth_t *synth) |
Get synth output gain value. More... | |
int | fluid_synth_get_internal_bufsize (fluid_synth_t *synth) |
Get the internal synthesis buffer size value. More... | |
int | fluid_synth_get_polyphony (fluid_synth_t *synth) |
Get current synthesizer polyphony (max number of voices). More... | |
int | fluid_synth_remove_default_mod (fluid_synth_t *synth, const fluid_mod_t *mod) |
Removes the specified modulator mod from the synth's default modulator list. More... | |
void | fluid_synth_set_gain (fluid_synth_t *synth, float gain) |
Set synth output gain value. More... | |
int | fluid_synth_set_interp_method (fluid_synth_t *synth, int chan, int interp_method) |
Set synthesis interpolation method on one or all MIDI channels. More... | |
int | fluid_synth_set_polyphony (fluid_synth_t *synth, int polyphony) |
Set synthesizer polyphony (max number of voices). More... | |
void | fluid_synth_set_sample_rate (fluid_synth_t *synth, float sample_rate) |
Set up an event to change the sample-rate of the synth during the next rendering call. More... | |
Functions to control and query synthesis parameters like gain and polyphony count.
enum fluid_interp |
Synthesis interpolation method.
enum fluid_synth_add_mod |
Enum used with fluid_synth_add_default_mod() to specify how to handle duplicate modulators.
Enumerator | |
---|---|
FLUID_SYNTH_OVERWRITE | Overwrite any existing matching modulator. |
FLUID_SYNTH_ADD | Sum up modulator amounts. |
int fluid_synth_add_default_mod | ( | fluid_synth_t * | synth, |
const fluid_mod_t * | mod, | ||
int | mode | ||
) |
Adds the specified modulator mod
as default modulator to the synth.
mod
will take effect for any subsequently created voice.
synth | FluidSynth instance |
mod | Modulator info (values copied, passed in object can be freed immediately afterwards) |
mode | Determines how to handle an existing identical modulator (fluid_synth_add_mod) |
int fluid_synth_count_audio_channels | ( | fluid_synth_t * | synth | ) |
Get the total count of audio channels.
synth | FluidSynth instance |
int fluid_synth_count_audio_groups | ( | fluid_synth_t * | synth | ) |
Get the total number of allocated audio channels.
Usually identical to the number of audio channels. Can be employed by LADSPA effects subsystem.
synth | FluidSynth instance |
int fluid_synth_count_effects_channels | ( | fluid_synth_t * | synth | ) |
Get the total number of allocated effects channels.
synth | FluidSynth instance |
int fluid_synth_count_effects_groups | ( | fluid_synth_t * | synth | ) |
Get the total number of allocated effects units.
This is the same number as initially provided by the setting synth.effects-groups.
synth | FluidSynth instance |
int fluid_synth_count_midi_channels | ( | fluid_synth_t * | synth | ) |
Get the total count of MIDI channels.
synth | FluidSynth instance |
int fluid_synth_get_active_voice_count | ( | fluid_synth_t * | synth | ) |
Get current number of active voices.
I.e. the no. of voices that have been started and have not yet finished. Unless called from synthesis context, this number does not necessarily have to be equal to the number of voices currently processed by the DSP loop, see below.
synth | FluidSynth instance |
float fluid_synth_get_gain | ( | fluid_synth_t * | synth | ) |
Get synth output gain value.
synth | FluidSynth instance |
int fluid_synth_get_internal_bufsize | ( | fluid_synth_t * | synth | ) |
Get the internal synthesis buffer size value.
synth | FluidSynth instance |
Audio is synthesized at this number of frames at a time. Defaults to 64 frames. I.e. the synth can only react to notes, control changes, and other audio affecting events after having processed 64 audio frames.
int fluid_synth_get_polyphony | ( | fluid_synth_t * | synth | ) |
Get current synthesizer polyphony (max number of voices).
synth | FluidSynth instance |
int fluid_synth_remove_default_mod | ( | fluid_synth_t * | synth, |
const fluid_mod_t * | mod | ||
) |
Removes the specified modulator mod
from the synth's default modulator list.
fluid_mod_test_identity() will be used to test modulator matching.
synth | synth instance |
mod | The modulator to remove |
void fluid_synth_set_gain | ( | fluid_synth_t * | synth, |
float | gain | ||
) |
Set synth output gain value.
synth | FluidSynth instance |
gain | Gain value (function clamps value to the range 0.0 to 10.0) |
int fluid_synth_set_interp_method | ( | fluid_synth_t * | synth, |
int | chan, | ||
int | interp_method | ||
) |
Set synthesis interpolation method on one or all MIDI channels.
synth | FluidSynth instance |
chan | MIDI channel to set interpolation method on or -1 for all channels |
interp_method | Interpolation method (fluid_interp) |
int fluid_synth_set_polyphony | ( | fluid_synth_t * | synth, |
int | polyphony | ||
) |
Set synthesizer polyphony (max number of voices).
synth | FluidSynth instance |
polyphony | Polyphony to assign |
void fluid_synth_set_sample_rate | ( | fluid_synth_t * | synth, |
float | sample_rate | ||
) |
Set up an event to change the sample-rate of the synth during the next rendering call.
synth
instance is used by an audio driver, because the audio driver cannot be notified by this sample-rate change. Long story short: don't use it. synth | FluidSynth instance |
sample_rate | New sample-rate (Hz) |