libfluidsynth  2.3.5
File Renderer

Functions for managing file renderers and triggering the rendering. More...

Lifecycle Functions for File Renderer_linebr@{

fluid_file_renderer_tnew_fluid_file_renderer (fluid_synth_t *synth)
 Create a new file renderer and open the file. More...
 
void delete_fluid_file_renderer (fluid_file_renderer_t *dev)
 Close file and destroy a file renderer object. More...
 

Functions

int fluid_file_renderer_process_block (fluid_file_renderer_t *dev)
 Write period_size samples to file. More...
 
int fluid_file_set_encoding_quality (fluid_file_renderer_t *dev, double q)
 Set vbr encoding quality (only available with libsndfile support) More...
 

Detailed Description

Functions for managing file renderers and triggering the rendering.

The file renderer is only used to render a MIDI file to audio as fast as possible. Please see Fast file renderer for non-realtime MIDI file rendering for a full example.

If you are looking for a way to write audio generated from real-time events (for example from an external sequencer or a MIDI controller) to a file, please have a look at the file Audio Driver instead.

Function Documentation

◆ delete_fluid_file_renderer()

void delete_fluid_file_renderer ( fluid_file_renderer_t dev)

Close file and destroy a file renderer object.

Parameters
devFile renderer object.
Since
1.1.0

◆ fluid_file_renderer_process_block()

int fluid_file_renderer_process_block ( fluid_file_renderer_t dev)

Write period_size samples to file.

Parameters
devFile renderer instance
Returns
FLUID_OK or FLUID_FAILED if an error occurred
Since
1.1.0

◆ fluid_file_set_encoding_quality()

int fluid_file_set_encoding_quality ( fluid_file_renderer_t dev,
double  q 
)

Set vbr encoding quality (only available with libsndfile support)

Parameters
devFile renderer object.
qThe encoding quality, see libsndfile documentation of SFC_SET_VBR_ENCODING_QUALITY
Returns
FLUID_OK if the quality has been successfully set, FLUID_FAILED otherwise
Since
1.1.7

◆ new_fluid_file_renderer()

fluid_file_renderer_t* new_fluid_file_renderer ( fluid_synth_t synth)

Create a new file renderer and open the file.

Parameters
synthThe synth that creates audio data.
Returns
the new object, or NULL on failure
Note
Available file types and formats depends on if libfluidsynth was built with libsndfile support or not. If not then only RAW 16 bit output is supported.

Uses the following settings from the synth object:

Since
1.1.0