_fluid_preset_t Struct Reference
Virtual SoundFont preset.
More...
Detailed Description
Virtual SoundFont preset.
Field Documentation
Method to free a virtual SoundFont preset.
- Parameters:
-
| preset | Virtual SoundFont preset |
- Returns:
- Should return 0
Method to get a virtual SoundFont preset name.
- Parameters:
-
| preset | Virtual SoundFont preset |
- Returns:
- Should return the name of the preset. The returned string must be valid for the duration of the virtual preset (or the duration of the SoundFont, in the case of preset iteration).
Method to get a virtual SoundFont preset MIDI bank number.
- Parameters:
-
| preset | Virtual SoundFont preset |
| return | The bank number of the preset |
Method to get a virtual SoundFont preset MIDI program number.
- Parameters:
-
| preset | Virtual SoundFont preset |
| return | The program number of the preset |
Method to handle a noteon event (synthesize the instrument).
- Parameters:
-
| preset | Virtual SoundFont preset |
| synth | Synthesizer instance |
| chan | MIDI channel number of the note on event |
| key | MIDI note number (0-127) |
| vel | MIDI velocity (0-127) |
- Returns:
- FLUID_OK on success (0) or FLUID_FAILED (-1) otherwise
This method may be called from within synthesis context and therefore should be as efficient as possible and not perform any operations considered bad for realtime audio output (memory allocations and other OS calls).
Call fluid_synth_alloc_voice() for every sample that has to be played. fluid_synth_alloc_voice() expects a pointer to a fluid_sample_t structure and returns a pointer to the opaque fluid_voice_t structure. To set or increment the values of a generator, use fluid_voice_gen_set() or fluid_voice_gen_incr(). When you are finished initializing the voice call fluid_voice_start() to start playing the synthesis voice. Starting with FluidSynth 1.1.0 all voices created will be started at the same time.
Virtual SoundFont preset notify method.
- Parameters:
-
- Returns:
- Should return FLUID_OK
Implement this optional method if the preset needs to be notified about preset select and unselect events.
This method may be called from within synthesis context and therefore should be as efficient as possible and not perform any operations considered bad for realtime audio output (memory allocations and other OS calls).
The documentation for this struct was generated from the following file: