Enumerations | |
| enum | fluid_voice_add_mod { FLUID_VOICE_OVERWRITE, FLUID_VOICE_ADD, FLUID_VOICE_DEFAULT } |
| Enum used with fluid_voice_add_mod() to specify how to handle duplicate modulators. More... | |
Functions | |
| FLUIDSYNTH_API void | fluid_voice_update_param (fluid_voice_t *voice, int gen) |
| Update all the synthesis parameters, which depend on generator gen. | |
| FLUIDSYNTH_API void | fluid_voice_add_mod (fluid_voice_t *voice, fluid_mod_t *mod, int mode) |
| Adds a modulator to the voice. | |
| FLUIDSYNTH_API void | fluid_voice_gen_set (fluid_voice_t *voice, int gen, float val) |
| Set the value of a generator. | |
| FLUIDSYNTH_API float | fluid_voice_gen_get (fluid_voice_t *voice, int gen) |
| Get the value of a generator. | |
| FLUIDSYNTH_API void | fluid_voice_gen_incr (fluid_voice_t *voice, int gen, float val) |
| Offset the value of a generator. | |
| FLUIDSYNTH_API unsigned int | fluid_voice_get_id (fluid_voice_t *voice) |
| Get the unique ID of the noteon-event. | |
| FLUIDSYNTH_API int | fluid_voice_is_playing (fluid_voice_t *voice) |
| Check if a voice is still playing. | |
| FLUIDSYNTH_API int | fluid_voice_optimize_sample (fluid_sample_t *s) |
| Calculate the peak volume of a sample for voice off optimization. | |
The interface to the synthesizer's voices. Examples on using them can be found in fluid_defsfont.c. Most of these functions should only be called from within synthesis context, such as the SoundFont loader's noteon method.
| enum fluid_voice_add_mod |
Enum used with fluid_voice_add_mod() to specify how to handle duplicate modulators.
| FLUIDSYNTH_API void fluid_voice_update_param | ( | fluid_voice_t * | voice, | |
| int | gen | |||
| ) |
Update all the synthesis parameters, which depend on generator gen.
| voice | Voice instance | |
| gen | Generator id (fluid_gen_type) |
| FLUIDSYNTH_API void fluid_voice_add_mod | ( | fluid_voice_t * | voice, | |
| fluid_mod_t * | mod, | |||
| int | mode | |||
| ) |
Adds a modulator to the voice.
| voice | Voice instance | |
| mod | Modulator info (copied) | |
| mode | Determines how to handle an existing identical modulator FLUID_VOICE_ADD to add (offset) the modulator amounts, FLUID_VOICE_OVERWRITE to replace the modulator, FLUID_VOICE_DEFAULT when adding a default modulator - no duplicate should exist so don't check. |
| FLUIDSYNTH_API void fluid_voice_gen_set | ( | fluid_voice_t * | voice, | |
| int | i, | |||
| float | val | |||
| ) |
Set the value of a generator.
| voice | Voice instance | |
| i | Generator ID (fluid_gen_type) | |
| val | Generator value |
| FLUIDSYNTH_API float fluid_voice_gen_get | ( | fluid_voice_t * | voice, | |
| int | gen | |||
| ) |
Get the value of a generator.
| voice | Voice instance | |
| gen | Generator ID (fluid_gen_type) |
| FLUIDSYNTH_API void fluid_voice_gen_incr | ( | fluid_voice_t * | voice, | |
| int | i, | |||
| float | val | |||
| ) |
Offset the value of a generator.
| voice | Voice instance | |
| i | Generator ID (fluid_gen_type) | |
| val | Value to add to the existing value |
| FLUIDSYNTH_API unsigned int fluid_voice_get_id | ( | fluid_voice_t * | voice | ) |
Get the unique ID of the noteon-event.
| voice | Voice instance |
Before modifying an existing voice, check
Otherwise the voice has finished playing.
| FLUIDSYNTH_API int fluid_voice_is_playing | ( | fluid_voice_t * | voice | ) |
Check if a voice is still playing.
| voice | Voice instance |
| FLUIDSYNTH_API int fluid_voice_optimize_sample | ( | fluid_sample_t * | s | ) |
Calculate the peak volume of a sample for voice off optimization.
| s | Sample to optimize |
1.5.6