Functions for audio driver output.
More...
Functions for audio driver output.
◆ fluid_audio_func_t
typedef int(* fluid_audio_func_t) (void *data, int len, int nin, float **in, int nout, float **out) |
Callback function type used with new_fluid_audio_driver2() to allow for custom user audio processing before the audio is sent to the driver.
This function is responsible for rendering the audio to the buffers.
- Parameters
-
data | The user data parameter as passed to new_fluid_audio_driver2(). |
len | Length of the audio in frames. |
nin | Count of buffers in 'in' |
in | Not used currently |
nout | Count of arrays in 'out' (i.e., channel count) |
out | Output buffers, one for each channel |
- Returns
- Should return 0 on success, non-zero if an error occured.
◆ new_fluid_audio_driver()
◆ new_fluid_audio_driver2()
Create a new audio driver.
- Parameters
-
settings | Configuration settings used to select and create the audio driver. |
func | Function called to fill audio buffers for audio playback |
data | User defined data pointer to pass to 'func' |
- Returns
- The new audio driver instance.
Like new_fluid_audio_driver() but allows for custom audio processing before audio is sent to audio driver. It is the responsibility of the callback 'func' to render the audio into the buffers.
NOTE: Not as efficient as new_fluid_audio_driver().
- Examples
- fluidsynth_fx.c.
References FLUID_DBG.
◆ delete_fluid_audio_driver()
◆ new_fluid_file_renderer()
Create a new file renderer and open the file.
- Parameters
-
synth | The synth that creates audio data. |
- Returns
- the new object, or NULL on failure
- Since
- 1.1.0
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:
- audio.file.name: Output filename
- audio.file.type: File type, "auto" tries to determine type from filename extension with fallback to "wav".
- audio.file.format: Audio format
- audio.file.endian: Endian byte order, "auto" for file type's default byte order
- audio.period-size: Size of audio blocks to process
- synth.sample-rate: Sample rate to use
References delete_fluid_file_renderer(), FLUID_ERR, fluid_settings_dupstr(), fluid_settings_getint(), and fluid_settings_getnum().
◆ fluid_file_renderer_process_block()
◆ delete_fluid_file_renderer()
◆ fluid_file_set_encoding_quality()
Set vbr encoding quality (only available with libsndfile support)
- Parameters
-
- Returns
- FLUID_OK if the quality has been successfully set, FLUID_FAILED otherwise
- Since
- 1.1.7
References FLUID_FAILED, and FLUID_OK.
◆ fluid_audio_driver_register()
FLUIDSYNTH_API int fluid_audio_driver_register |
( |
const char ** |
adrivers | ) |
|
Registers audio drivers to use.
When creating a settings instance with new_fluid_settings(), all audio drivers are initialized once. In the past this has caused segfaults and application crashes due to buggy soundcard drivers.
This function enables the user to only initialize specific audio drivers when settings instances are created. Therefore pass a NULL-terminated array of C-strings containing the names
of audio drivers to register for the usage with fluidsynth. The names
are the same as being used for the audio.driver
setting.
By default all audio drivers fluidsynth has been compiled with are registered, so calling this function is optional.
- Warning
- This function may only be called if no thread is residing in fluidsynth's API and no instances of any kind are alive (e.g. as it would be the case right after fluidsynth's inital creation). Else the behaviour is undefined. Furtermore any attempt of using audio drivers that have not been registered is undefined behaviour!
- Parameters
-
adrivers | NULL-terminated array of audio drivers to register. Pass NULL to register all available drivers. |
- Returns
- FLUID_OK if all the audio drivers requested by the user are supported by fluidsynth and have been successfully registered. Otherwise FLUID_FAILED is returned and this function has no effect.
- Note
- This function is not thread safe and will never be!
- Since
- 1.1.9
- Examples
- fluidsynth_register_adriver.c.
References FLUID_FAILED, and FLUID_OK.
FLUIDSYNTH_API int fluid_synth_get_program(fluid_synth_t *synth, int chan, unsigned int *sfont_id, unsigned int *bank_num, unsigned int *preset_num)
Get current SoundFont ID, bank number and program number for a MIDI channel.
Definition: fluid_synth.c:2088
FLUIDSYNTH_API int fluid_synth_activate_key_tuning(fluid_synth_t *synth, int bank, int prog, const char *name, const double *pitch, int apply)
Set the tuning of the entire MIDI note scale.
Definition: fluid_synth.c:4360
FLUIDSYNTH_API void delete_fluid_cmd_handler(fluid_cmd_handler_t *handler)
Delete a command handler.
Definition: fluid_cmd.c:1765
double amount
Multiplier amount.
Definition: mod.h:47
FLUIDSYNTH_API int fluid_synth_get_active_voice_count(fluid_synth_t *synth)
Get current number of active voices.
Definition: fluid_synth.c:2403
FLUIDSYNTH_API int fluid_log(int level, const char *fmt,...)
Print a message to the log.
Definition: fluid_sys.c:217
FLUIDSYNTH_API fluid_sequencer_t * new_fluid_sequencer2(int use_system_timer)
Create a new sequencer object.
Definition: fluid_seq.c:111
FLUIDSYNTH_API void fluid_midi_router_rule_set_chan(fluid_midi_router_rule_t *rule, int min, int max, float mul, int add)
Set the channel portion of a rule.
Definition: fluid_midi_router.c:416
FLUIDSYNTH_API int fluid_synth_all_notes_off(fluid_synth_t *synth, int chan)
Turn off all notes on a MIDI channel (put them into release phase).
Definition: fluid_synth.c:1517
FLUIDSYNTH_API fluid_midi_event_t * new_fluid_midi_event(void)
Create a MIDI event structure.
Definition: fluid_midi.c:781
@ GEN_STARTLOOPADDROFS
Sample loop start address offset (-32767-32767)
Definition: gen.h:39
void(* fluid_settings_foreach_t)(void *data, char *name, int type)
Callback function type used with fluid_settings_foreach()
Definition: settings.h:210
SoundFont loader structure.
Definition: sfont.h:77
FLUIDSYNTH_API void delete_fluid_midi_router_rule(fluid_midi_router_rule_t *rule)
Free a MIDI router rule.
Definition: fluid_midi_router.c:391
@ GEN_MODENVSUSTAIN
Modulation envelope sustain.
Definition: gen.h:66
unsigned int start
Start index.
Definition: sfont.h:238
FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t *seq, double scale)
Set the time scale of a sequencer.
Definition: fluid_seq.c:521
FLUIDSYNTH_API void fluid_midi_router_rule_set_param2(fluid_midi_router_rule_t *rule, int min, int max, float mul, int add)
Set the second parameter portion of a rule.
Definition: fluid_midi_router.c:489
@ GEN_VIBLFOFREQ
Vibrato LFO frequency.
Definition: gen.h:61
FLUIDSYNTH_API int fluid_player_add_mem(fluid_player_t *player, const void *buffer, size_t len)
Add a MIDI file to a player queue, from a buffer in memory.
Definition: fluid_midi.c:1455
FLUIDSYNTH_API double fluid_synth_get_reverb_roomsize(fluid_synth_t *synth)
Get reverb room size.
Definition: fluid_synth.c:3857
int bank
MIDI bank number (0-16383)
Definition: synth.h:59
FLUIDSYNTH_API void delete_fluid_server(fluid_server_t *server)
Delete a TCP/IP shell server.
Definition: fluid_cmd.c:1875
@ GEN_LAST
Value defines the count of generators (fluid_gen_type)
Definition: gen.h:102
FLUIDSYNTH_API void delete_fluid_midi_driver(fluid_midi_driver_t *driver)
Delete a MIDI driver instance.
Definition: fluid_mdriver.c:245
#define FLUID_SEQ_PITCHWHHELSENS
Old deprecated misspelling of FLUID_SEQ_PITCHWHEELSENS.
Definition: event.h:64
void(* iteration_start)(fluid_sfont_t *sfont)
Start virtual SoundFont preset iteration method.
Definition: sfont.h:137
@ FLUID_SEQ_CONTROLCHANGE
MIDI control change event.
Definition: event.h:51
FLUIDSYNTH_API int fluid_sample_set_name(fluid_sample_t *sample, const char *name)
Set the name of a RAM SoundFont sample.
Definition: fluid_ramsfont.c:1119
FLUIDSYNTH_API int fluid_voice_is_sostenuto(const fluid_voice_t *voice)
Check if a voice keeps playing after it has received a noteoff due to being held by sostenuto.
Definition: fluid_voice.c:1464
FLUIDSYNTH_API fluid_ostream_t fluid_get_stdout(void)
Get standard output stream handle.
Definition: fluid_sys.c:830
FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id(fluid_event_t *evt)
Get the SoundFont ID field from a sequencer event structure.
Definition: fluid_event.c:620
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_synth_set_gen2(fluid_synth_t *synth, int chan, int param, float value, int absolute, int normalized)
Set a SoundFont generator (effect) value on a MIDI channel in real-time.
Definition: fluid_synth.c:4923
FLUIDSYNTH_API int fluid_synth_noteon(fluid_synth_t *synth, int chan, int key, int vel)
Send a note-on event to a FluidSynth object.
Definition: fluid_synth.c:921
FLUIDSYNTH_API int fluid_midi_event_set_pitch(fluid_midi_event_t *evt, int val)
Set the pitch field of a MIDI event structure.
Definition: fluid_midi.c:1008
@ GEN_SCALETUNE
Scale tuning.
Definition: gen.h:93
@ GEN_KEYTOVOLENVDECAY
Key to volume envelope decay.
Definition: gen.h:77
#define FLUID_SAMPLETYPE_MONO
Flag for fluid_sample_t sampletype field for mono samples.
Definition: sfont.h:269
unsigned char src2
Source controller 2.
Definition: mod.h:45
FLUIDSYNTH_API int fluid_synth_get_bank_offset(fluid_synth_t *synth, int sfont_id)
Get bank offset of a loaded SoundFont.
Definition: fluid_synth.c:5124
FLUIDSYNTH_API int fluid_synth_count_audio_groups(fluid_synth_t *synth)
Get the total number of allocated audio channels.
Definition: fluid_synth.c:4180
FLUIDSYNTH_API fluid_sequencer_t * new_fluid_sequencer(void)
Create a new sequencer object which uses the system timer.
Definition: fluid_seq.c:97
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_dest(fluid_event_t *evt)
Get the dest sequencer client from a sequencer event structure.
Definition: fluid_event.c:487
FLUIDSYNTH_API void fluid_event_system_reset(fluid_event_t *evt)
Set a sequencer event to be a midi system reset event.
Definition: fluid_event.c:440
struct _fluid_ramsfont_t fluid_ramsfont_t
RAM SoundFont.
Definition: types.h:57
FLUIDSYNTH_API int fluid_midi_event_set_value(fluid_midi_event_t *evt, int val)
Set the value field of a MIDI event structure.
Definition: fluid_midi.c:960
FLUIDSYNTH_API fluid_shell_t * new_fluid_shell(fluid_settings_t *settings, fluid_cmd_handler_t *handler, fluid_istream_t in, fluid_ostream_t out, int thread)
Create a new FluidSynth command shell.
Definition: fluid_cmd.c:223
FLUIDSYNTH_API void fluid_voice_gen_set(fluid_voice_t *voice, int gen, float val)
Set the value of a generator.
Definition: fluid_voice.c:342
FLUIDSYNTH_API void fluid_settings_foreach_option(fluid_settings_t *settings, const char *name, void *data, fluid_settings_foreach_option_t func)
Iterate the available options for a named string setting, calling the provided callback function for ...
Definition: fluid_settings.c:1373
FLUIDSYNTH_API int fluid_is_midifile(const char *filename)
Check if a file is a MIDI file.
Definition: fluid_sys.c:323
FLUIDSYNTH_API void fluid_event_pan(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a stereo pan event.
Definition: fluid_event.c:348
FLUIDSYNTH_API int fluid_synth_bank_select(fluid_synth_t *synth, int chan, unsigned int bank)
Set instrument bank number on a MIDI channel.
Definition: fluid_synth.c:2027
FLUIDSYNTH_API int fluid_voice_optimize_sample(fluid_sample_t *s)
Calculate the peak volume of a sample for voice off optimization.
Definition: fluid_voice.c:1657
FLUIDSYNTH_API fluid_midi_router_t * new_fluid_midi_router(fluid_settings_t *settings, handle_midi_event_func_t handler, void *event_handler_data)
Create a new midi router.
Definition: fluid_midi_router.c:87
FLUIDSYNTH_API int fluid_player_set_bpm(fluid_player_t *player, int bpm)
Set the tempo of a MIDI player in beats per minute.
Definition: fluid_midi.c:1760
@ FLUID_PLAYER_DONE
Player is finished playing.
Definition: midi.h:121
FLUIDSYNTH_API float fluid_voice_gen_get(fluid_voice_t *voice, int gen)
Get the value of a generator.
Definition: fluid_voice.c:370
FLUIDSYNTH_API int fluid_command(fluid_cmd_handler_t *handler, const char *cmd, fluid_ostream_t out)
Process a string command.
Definition: fluid_cmd.c:192
@ GEN_SAMPLEID
Sample ID (shouldn't be set by user)
Definition: gen.h:90
@ FLUID_MOD_SWITCH
Switch (on/off) mapping function.
Definition: mod.h:72
struct _fluid_hashtable_t fluid_cmd_handler_t
Command handler.
Definition: types.h:52
@ FLUID_SEQ_TIMER
Timer event (useful for giving a callback at a certain time)
Definition: event.h:56
FLUIDSYNTH_API int fluid_midi_event_get_control(fluid_midi_event_t *evt)
Get the control number of a MIDI event structure.
Definition: fluid_midi.c:924
@ FLUID_PLAYER_READY
Player is ready.
Definition: midi.h:119
FLUIDSYNTH_API double fluid_synth_get_chorus_level(fluid_synth_t *synth)
Get chorus level.
Definition: fluid_synth.c:4019
int pitchadj
Fine pitch adjustment (+/- 99 cents)
Definition: sfont.h:244
FLUIDSYNTH_API int delete_fluid_midi_event(fluid_midi_event_t *event)
Delete MIDI event structure.
Definition: fluid_midi.c:805
unsigned int refcount
Count of voices using this sample (use fluid_sample_refcount to access this field)
Definition: sfont.h:252
@ FLUID_INT_TYPE
Integer.
Definition: settings.h:123
FLUIDSYNTH_API void fluid_event_pitch_bend(fluid_event_t *evt, int channel, int val)
Set a sequencer event to be a pitch bend event.
Definition: fluid_event.c:270
FLUIDSYNTH_API void fluid_event_program_change(fluid_event_t *evt, int channel, short preset_num)
Set a sequencer event to be a program change event.
Definition: fluid_event.c:225
@ FLUID_MOD_CHANNELPRESSURE
MIDI channel pressure.
Definition: mod.h:87
FLUIDSYNTH_API void fluid_synth_set_reverb(fluid_synth_t *synth, double roomsize, double damping, double width, double level)
Set reverb parameters.
Definition: fluid_synth.c:3798
FLUIDSYNTH_API int fluid_settings_copystr(fluid_settings_t *settings, const char *name, char *str, int len)
Copy the value of a string setting.
Definition: fluid_settings.c:751
@ FLUID_MOD_NONE
No source controller.
Definition: mod.h:83
FLUIDSYNTH_API int fluid_voice_get_velocity(const fluid_voice_t *voice)
If the voice is playing, gets the midi velocity from the noteon event, by which the voice was initial...
Definition: fluid_voice.c:1541
FLUIDSYNTH_API short fluid_event_get_key(fluid_event_t *evt)
Get the MIDI note field from a sequencer event structure.
Definition: fluid_event.c:507
@ GEN_FILTERQ
Filter Q.
Definition: gen.h:46
FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t *synth, int chan, int param)
Get generator value assigned to a MIDI channel.
Definition: fluid_synth.c:4945
FLUIDSYNTH_API unsigned int fluid_voice_get_id(const fluid_voice_t *voice)
Get the unique ID of the noteon-event.
Definition: fluid_voice.c:1418
FLUIDSYNTH_API int delete_fluid_player(fluid_player_t *player)
Delete a MIDI player instance.
Definition: fluid_midi.c:1296
fluid_cmd_func_t handler
Pointer to the handler for this command.
Definition: shell.h:61
#define FLUID_INTERP_HIGHEST
Highest interpolation method from fluid_interp.
Definition: synth.h:217
@ FLUID_INTERP_7THORDER
Seventh-order interpolation.
Definition: synth.h:213
FLUIDSYNTH_API int fluid_midi_router_set_default_rules(fluid_midi_router_t *router)
Set a MIDI router to use default "unity" rules.
Definition: fluid_midi_router.c:164
FLUIDSYNTH_API int fluid_settings_option_count(fluid_settings_t *settings, const char *name)
Count option string values for a string setting.
Definition: fluid_settings.c:1419
void * userdata
User defined data.
Definition: sfont.h:262
FLUIDSYNTH_API void fluid_mod_set_dest(fluid_mod_t *mod, int dst)
Set the destination effect of a modulator.
Definition: fluid_mod.c:75
FLUIDSYNTH_API void fluid_mod_delete(fluid_mod_t *mod)
Free a modulator structure.
Definition: fluid_mod.c:398
FLUIDSYNTH_API int fluid_synth_write_float(fluid_synth_t *synth, int len, void *lout, int loff, int lincr, void *rout, int roff, int rincr)
Synthesize a block of floating point audio samples to audio buffers.
Definition: fluid_synth.c:2692
FLUIDSYNTH_API short fluid_event_get_velocity(fluid_event_t *evt)
Get the MIDI velocity field from a sequencer event structure.
Definition: fluid_event.c:517
FLUIDSYNTH_API void fluid_event_all_sounds_off(fluid_event_t *evt, int channel)
Set a sequencer event to be an all sounds off event.
Definition: fluid_event.c:186
FLUIDSYNTH_API int fluid_midi_router_clear_rules(fluid_midi_router_t *router)
Clear all rules in a MIDI router.
Definition: fluid_midi_router.c:247
FLUIDSYNTH_API fluid_log_function_t fluid_set_log_function(int level, fluid_log_function_t fun, void *data)
Installs a new log function for a specified log level.
Definition: fluid_sys.c:119
@ FLUID_DBG
Debugging messages.
Definition: log.h:60
FLUIDSYNTH_API fluid_preset_t * fluid_synth_get_channel_preset(fluid_synth_t *synth, int chan)
Get active preset on a MIDI channel.
Definition: fluid_synth.c:3645
#define FLUID_INTERP_DEFAULT
Default interpolation method from fluid_interp.
Definition: synth.h:216
FLUIDSYNTH_API void fluid_usershell(fluid_settings_t *settings, fluid_cmd_handler_t *handler)
A convenience function to create a shell interfacing to standard input/output console streams.
Definition: fluid_cmd.c:335
FLUIDSYNTH_API int fluid_settings_setnum(fluid_settings_t *settings, const char *name, double val)
Set a numeric value for a named setting.
Definition: fluid_settings.c:1084
FLUIDSYNTH_API void fluid_sequencer_remove_events(fluid_sequencer_t *seq, fluid_seq_id_t source, fluid_seq_id_t dest, int type)
Remove events from the event queue.
Definition: fluid_seq.c:484
FLUIDSYNTH_API int fluid_settings_setint(fluid_settings_t *settings, const char *name, int val)
Set an integer value for a setting.
Definition: fluid_settings.c:1227
FLUIDSYNTH_API int fluid_synth_count_audio_channels(fluid_synth_t *synth)
Get the total count of audio channels.
Definition: fluid_synth.c:4162
FLUIDSYNTH_API int fluid_midi_event_get_key(fluid_midi_event_t *evt)
Get the key field of a MIDI event structure.
Definition: fluid_midi.c:876
FLUIDSYNTH_API int fluid_event_get_type(fluid_event_t *evt)
Get the event type (fluid_seq_event_type) field from a sequencer event structure.
Definition: fluid_event.c:456
double nrpn
Change by NRPN messages.
Definition: gen.h:114
@ GEN_VIBLFOTOPITCH
Vibrato LFO to pitch.
Definition: gen.h:43
FLUIDSYNTH_API int fluid_player_join(fluid_player_t *player)
Wait for a MIDI player to terminate (when done playing).
Definition: fluid_midi.c:1771
FLUIDSYNTH_API void fluid_settings_getint_range(fluid_settings_t *settings, const char *name, int *min, int *max)
Get the range of values of an integer setting.
Definition: fluid_settings.c:1307
FLUIDSYNTH_API int fluid_ramsfont_izone_set_loop(fluid_ramsfont_t *sfont, unsigned int bank, unsigned int num, fluid_sample_t *sample, int on, float loopstart, float loopend)
Sets loop start/end values of the instrument zone identified by bank, num and sample.
Definition: fluid_ramsfont.c:459
FLUIDSYNTH_API int fluid_midi_event_set_type(fluid_midi_event_t *evt, int type)
Set the event type field of a MIDI event structure.
Definition: fluid_midi.c:840
FLUIDSYNTH_API char * fluid_settings_getstr_default(fluid_settings_t *settings, const char *name)
Get the default value of a string setting.
Definition: fluid_settings.c:964
void(* fluid_log_function_t)(int level, char *message, void *data)
Log function handler callback type used by fluid_set_log_function().
Definition: log.h:70
#define FLUID_HINT_BOUNDED_BELOW
Hint FLUID_HINT_BOUNDED_BELOW indicates that the LowerBound field of the FLUID_PortRangeHint should b...
Definition: settings.h:62
FLUIDSYNTH_API void delete_fluid_audio_driver(fluid_audio_driver_t *driver)
Deletes an audio driver instance.
Definition: fluid_adriver.c:403
double amplitude_that_reaches_noise_floor
The amplitude at which the sample's loop will be below the noise floor.
Definition: sfont.h:250
struct _fluid_audio_driver_t fluid_audio_driver_t
Audio driver instance.
Definition: types.h:45
@ FLUID_INFO
Verbose informational messages.
Definition: log.h:59
FLUIDSYNTH_API int fluid_ramsfont_add_izone(fluid_ramsfont_t *sfont, unsigned int bank, unsigned int num, fluid_sample_t *sample, int lokey, int hikey)
Creates one instrument zone for the sample inside the preset defined by bank and num.
Definition: fluid_ramsfont.c:349
FLUIDSYNTH_API int fluid_voice_get_key(const fluid_voice_t *voice)
If the voice is playing, gets the midi key from the noteon event, by which the voice was initially tu...
Definition: fluid_voice.c:1508
FLUIDSYNTH_API fluid_sfont_t * fluid_synth_get_sfont_by_id(fluid_synth_t *synth, unsigned int id)
Get SoundFont by ID.
Definition: fluid_synth.c:3589
fluid_voice_add_mod
Enum used with fluid_voice_add_mod() to specify how to handle duplicate modulators.
Definition: voice.h:44
FLUIDSYNTH_API void fluid_synth_set_reverb_on(fluid_synth_t *synth, int on)
Enable or disable reverb effect.
Definition: fluid_synth.c:3753
FLUIDSYNTH_API void fluid_midi_router_rule_set_param1(fluid_midi_router_rule_t *rule, int min, int max, float mul, int add)
Set the first parameter portion of a rule.
Definition: fluid_midi_router.c:454
@ FLUID_VOICE_ADD
Add (sum) modulator amounts.
Definition: voice.h:46
@ GEN_MODENVTOPITCH
Modulation envelope to pitch.
Definition: gen.h:44
FLUIDSYNTH_API char * fluid_synth_error(fluid_synth_t *synth)
Get a textual representation of the last error.
Definition: fluid_synth.c:907
short * data
Pointer to the sample's data.
Definition: sfont.h:247
FLUIDSYNTH_API char * fluid_settings_option_concat(fluid_settings_t *settings, const char *name, const char *separator)
Concatenate options for a string setting together with a separator between.
Definition: fluid_settings.c:1446
@ GEN_SET
Generator value is set.
Definition: gen.h:123
@ GEN_RESERVED2
Reserved.
Definition: gen.h:86
@ FLUID_NO_TYPE
Undefined type.
Definition: settings.h:121
@ GEN_KEYTOVOLENVHOLD
Key to volume envelope hold.
Definition: gen.h:76
FLUIDSYNTH_API int fluid_midi_event_set_program(fluid_midi_event_t *evt, int val)
Set the program field of a MIDI event structure.
Definition: fluid_midi.c:984
@ FLUID_MIDI_ROUTER_RULE_CC
MIDI controller rule.
Definition: midi.h:62
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_gen_set_default_values(fluid_gen_t *gen)
Set an array of generators to their default values.
Definition: fluid_gen.c:99
@ GEN_MODENVHOLD
Modulation envelope hold.
Definition: gen.h:64
FLUIDSYNTH_API int fluid_synth_pitch_wheel_sens(fluid_synth_t *synth, int chan, int val)
Set MIDI pitch wheel sensitivity on a MIDI channel.
Definition: fluid_synth.c:1783
FLUIDSYNTH_API int fluid_synth_program_select_by_sfont_name(fluid_synth_t *synth, int chan, const char *sfont_name, unsigned int bank_num, unsigned int preset_num)
Select an instrument on a MIDI channel by SoundFont name, bank and program numbers.
Definition: fluid_synth.c:2156
FLUIDSYNTH_API int fluid_synth_noteoff(fluid_synth_t *synth, int chan, int key)
Send a note-off event to a FluidSynth object.
Definition: fluid_synth.c:972
FLUIDSYNTH_API void fluid_voice_gen_incr(fluid_voice_t *voice, int gen, float val)
Offset the value of a generator.
Definition: fluid_voice.c:357
@ FLUID_MIDI_ROUTER_RULE_PROG_CHANGE
MIDI program change rule.
Definition: midi.h:63
@ GEN_EXCLUSIVECLASS
Exclusive class number.
Definition: gen.h:94
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_synth_create_octave_tuning(fluid_synth_t *synth, int bank, int prog, const char *name, const double *pitch)
Apply an octave tuning to every octave in the MIDI note scale.
Definition: fluid_synth.c:4403
@ GEN_ENDADDRCOARSEOFS
Sample end address coarse offset (X 32768)
Definition: gen.h:49
FLUIDSYNTH_API int fluid_synth_all_sounds_off(fluid_synth_t *synth, int chan)
Immediately stop all notes on a MIDI channel (skips release phase).
Definition: fluid_synth.c:1555
FLUIDSYNTH_API int fluid_settings_str_equal(fluid_settings_t *settings, const char *name, const char *value)
Test a string setting for some value.
Definition: fluid_settings.c:922
int sfont_id
ID of parent SoundFont.
Definition: synth.h:58
int(* handle_midi_event_func_t)(void *data, fluid_midi_event_t *event)
Generic callback function for MIDI events.
Definition: midi.h:82
FLUIDSYNTH_API int fluid_synth_count_effects_channels(fluid_synth_t *synth)
Get the total number of allocated effects channels.
Definition: fluid_synth.c:4196
@ FLUID_CHORUS_MOD_SINE
Sine wave chorus modulation.
Definition: synth.h:165
@ GEN_MODLFODELAY
Modulation LFO delay.
Definition: gen.h:58
@ LAST_LOG_LEVEL
Definition: log.h:61
@ FLUID_WARN
Warning.
Definition: log.h:58
@ FLUID_PLAYER_PLAYING
Player is currently playing.
Definition: midi.h:120
@ GEN_VOLENVDECAY
Volume envelope decay.
Definition: gen.h:73
FLUIDSYNTH_API int fluid_midi_dump_postrouter(void *data, fluid_midi_event_t *event)
MIDI event callback function to display event information to stdout.
Definition: fluid_midi_router.c:987
FLUIDSYNTH_API 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.
Definition: fluid_synth.c:4118
FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t *shell)
Delete a FluidSynth command shell.
Definition: fluid_cmd.c:266
@ FLUID_SEQ_SYSTEMRESET
System reset event.
Definition: event.h:59
FLUIDSYNTH_API int fluid_player_set_midi_tempo(fluid_player_t *player, int tempo)
Set the tempo of a MIDI player.
Definition: fluid_midi.c:1740
FLUIDSYNTH_API int fluid_ramsfont_izone_set_gen(fluid_ramsfont_t *sfont, unsigned int bank, unsigned int num, fluid_sample_t *sample, int gen_type, float value)
Sets a generator on an instrument zone identified by bank, num and sample.
Definition: fluid_ramsfont.c:433
@ FLUID_MOD_LINEAR
Linear mapping function.
Definition: mod.h:69
struct _fluid_sequencer_t fluid_sequencer_t
Sequencer instance.
Definition: types.h:56
@ FLUID_MOD_POSITIVE
Mapping function is positive.
Definition: mod.h:65
FLUIDSYNTH_API int fluid_server_join(fluid_server_t *server)
Join a shell server thread (wait until it quits).
Definition: fluid_cmd.c:1956
fluid_sfont_t *(* load)(fluid_sfloader_t *loader, const char *filename)
Method to load an instrument file (does not actually need to be a real file name, could be another ty...
Definition: sfont.h:95
FLUIDSYNTH_API int fluid_synth_get_chorus_nr(fluid_synth_t *synth)
Get chorus voice number (delay line count) value.
Definition: fluid_synth.c:4003
@ FLUID_SEQ_SUSTAIN
Sustain controller event.
Definition: event.h:50
struct _fluid_player_t fluid_player_t
MIDI player instance.
Definition: types.h:47
FLUIDSYNTH_API fluid_sfont_t * fluid_ramsfont_create_sfont(void)
Create a fluid_sfont_t wrapping a fluid_ramsfont_t.
Definition: fluid_ramsfont.c:88
@ GEN_ENDLOOPADDRCOARSEOFS
Sample end loop address coarse offset (X 32768)
Definition: gen.h:87
FLUIDSYNTH_API int fluid_synth_get_internal_bufsize(fluid_synth_t *synth)
Get the internal synthesis buffer size value.
Definition: fluid_synth.c:2421
FLUIDSYNTH_API int fluid_synth_stop(fluid_synth_t *synth, unsigned int id)
Stop notes for a given note event voice ID.
Definition: fluid_synth.c:5056
FLUIDSYNTH_API void fluid_event_reverb_send(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a reverb send event.
Definition: fluid_event.c:380
@ GEN_OVERRIDEROOTKEY
Sample root note override.
Definition: gen.h:95
@ FLUID_SEQ_MODULATION
Modulation controller event.
Definition: event.h:49
char name[21]
Sample name.
Definition: sfont.h:237
FLUIDSYNTH_API fluid_event_t * new_fluid_event(void)
Create a new sequencer event structure.
Definition: fluid_event.c:57
FLUIDSYNTH_API int fluid_midi_event_set_velocity(fluid_midi_event_t *evt, int vel)
Set the velocity field of a MIDI event structure.
Definition: fluid_midi.c:912
int(* get_banknum)(fluid_preset_t *preset)
Method to get a virtual SoundFont preset MIDI bank number.
Definition: sfont.h:182
FLUIDSYNTH_API int fluid_voice_is_sustained(const fluid_voice_t *voice)
Check if a voice keeps playing after it has received a noteoff due to being held by sustain.
Definition: fluid_voice.c:1453
int(* iteration_next)(fluid_sfont_t *sfont, fluid_preset_t *preset)
Virtual SoundFont preset iteration function.
Definition: sfont.h:149
@ FLUID_MOD_PITCHWHEELSENS
Pitch wheel sensitivity.
Definition: mod.h:89
char * topic
The help topic group of this command.
Definition: shell.h:60
FLUIDSYNTH_API int fluid_midi_router_handle_midi_event(void *data, fluid_midi_event_t *event)
Handle a MIDI event through a MIDI router instance.
Definition: fluid_midi_router.c:525
#define FLUID_REVERB_DEFAULT_DAMP
Default reverb damping.
Definition: synth.h:154
FLUIDSYNTH_API void fluid_sequencer_unregister_client(fluid_sequencer_t *seq, fluid_seq_id_t id)
Unregister a previously registered client.
Definition: fluid_seq.c:306
FLUIDSYNTH_API int fluid_settings_getnum(fluid_settings_t *settings, const char *name, double *val)
Get the numeric value of a named setting.
Definition: fluid_settings.c:1132
FLUIDSYNTH_API void fluid_event_noteoff(fluid_event_t *evt, int channel, short key)
Set a sequencer event to be a note off event.
Definition: fluid_event.c:155
FLUIDSYNTH_API void fluid_synth_remove_sfont(fluid_synth_t *synth, fluid_sfont_t *sfont)
Remove a SoundFont from the SoundFont stack without deleting it.
Definition: fluid_synth.c:3513
fluid_seq_event_type
Sequencer event type enumeration.
Definition: event.h:38
FLUIDSYNTH_API int fluid_cmd_handler_unregister(fluid_cmd_handler_t *handler, const char *cmd)
Unregister a command from a command handler.
Definition: fluid_cmd.c:1791
@ GEN_MODENVRELEASE
Modulation envelope release.
Definition: gen.h:67
FLUIDSYNTH_API char * fluid_sequencer_get_client_name(fluid_sequencer_t *seq, int id)
Get the name of a registered client.
Definition: fluid_seq.c:380
#define FLUID_SAMPLETYPE_OGG_VORBIS
Flag for fluid_sample_t sampletype field for Ogg Vorbis compressed samples.
Definition: sfont.h:273
fluid_midi_channel_type
The midi channel type used by fluid_synth_set_channel_type()
Definition: synth.h:109
FLUIDSYNTH_API int fluid_synth_sfunload(fluid_synth_t *synth, unsigned int id, int reset_presets)
Unload a SoundFont.
Definition: fluid_synth.c:3323
@ FLUID_MIDI_ROUTER_RULE_COUNT
Total count of rule types.
Definition: midi.h:67
@ GEN_KEYTOMODENVHOLD
Key to modulation envelope hold.
Definition: gen.h:68
@ FLUID_SEQ_PITCHBEND
Pitch bend message.
Definition: event.h:47
@ FLUID_MOD_NEGATIVE
Mapping function is negative.
Definition: mod.h:66
@ GEN_UNUSED4
Unused.
Definition: gen.h:57
FLUIDSYNTH_API short fluid_event_get_control(fluid_event_t *evt)
Get the MIDI control number field from a sequencer event structure.
Definition: fluid_event.c:528
Virtual SoundFont preset.
Definition: sfont.h:157
FLUIDSYNTH_API int fluid_settings_dupstr(fluid_settings_t *settings, const char *name, char **str)
Duplicate the value of a string setting.
Definition: fluid_settings.c:812
FLUIDSYNTH_API int fluid_midi_router_add_rule(fluid_midi_router_t *router, fluid_midi_router_rule_t *rule, int type)
Add a rule to a MIDI router.
Definition: fluid_midi_router.c:311
FLUIDSYNTH_API void fluid_mod_set_amount(fluid_mod_t *mod, double amount)
Set the scale amount of a modulator.
Definition: fluid_mod.c:86
int(* notify)(fluid_preset_t *preset, int reason, int chan)
Virtual SoundFont preset notify method.
Definition: sfont.h:229
FLUIDSYNTH_API int fluid_synth_handle_midi_event(void *data, fluid_midi_event_t *event)
Handle MIDI event from MIDI router, used as a callback function.
Definition: fluid_synth.c:4980
FLUIDSYNTH_API void fluid_mod_set_source2(fluid_mod_t *mod, int src, int flags)
Set a modulator's secondary source controller and flags.
Definition: fluid_mod.c:63
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_synth_get_channel_info(fluid_synth_t *synth, int chan, fluid_synth_channel_info_t *info)
Get information on the currently selected preset on a MIDI channel.
Definition: fluid_synth.c:3668
FLUIDSYNTH_API int fluid_midi_event_get_type(fluid_midi_event_t *evt)
Get the event type field of a MIDI event structure.
Definition: fluid_midi.c:828
int sampletype
Values: FLUID_SAMPLETYPE_MONO, FLUID_SAMPLETYPE_RIGHT, FLUID_SAMPLETYPE_LEFT, FLUID_SAMPLETYPE_ROM.
Definition: sfont.h:245
FLUIDSYNTH_API int fluid_synth_program_reset(fluid_synth_t *synth)
Resend a bank select and a program change for every channel and assign corresponding instruments.
Definition: fluid_synth.c:2435
FLUIDSYNTH_API fluid_sample_t * new_fluid_ramsample(void)
Create new RAM SoundFont sample.
Definition: fluid_ramsfont.c:1199
@ GEN_VELRANGE
MIDI velocity range.
Definition: gen.h:81
@ GEN_STARTADDRCOARSEOFS
Sample start address coarse offset (X 32768)
Definition: gen.h:41
#define FLUID_CHORUS_DEFAULT_N
Default chorus voice count.
Definition: synth.h:178
FLUIDSYNTH_API void delete_fluid_sequencer(fluid_sequencer_t *seq)
Free a sequencer object.
Definition: fluid_seq.c:155
@ GEN_KEYRANGE
MIDI note range.
Definition: gen.h:80
#define fluid_sample_refcount(_sample)
Get the reference count of a sample.
Definition: sfont.h:266
@ FLUID_MOD_KEY
MIDI note-on note number.
Definition: mod.h:85
FLUIDSYNTH_API int fluid_voice_get_channel(const fluid_voice_t *voice)
If the voice is playing, gets the midi channel the voice is playing on.
Definition: fluid_voice.c:1475
@ GEN_KEYNUM
Fixed MIDI note number.
Definition: gen.h:83
FLUIDSYNTH_API void fluid_synth_get_voicelist(fluid_synth_t *synth, fluid_voice_t *buf[], int bufsize, int ID)
Get list of currently playing voices.
Definition: fluid_synth.c:3726
@ FLUID_INTERP_LINEAR
Straight-line interpolation: A bit slower, reasonable audio quality.
Definition: synth.h:211
FLUIDSYNTH_API int fluid_synth_unset_program(fluid_synth_t *synth, int chan)
Set the preset of a MIDI channel to an unassigned state.
Definition: fluid_synth.c:2069
@ GEN_ENDLOOPADDROFS
Sample loop end address offset (-32767-32767)
Definition: gen.h:40
@ FLUID_MOD_KEYPRESSURE
MIDI key pressure.
Definition: mod.h:86
FLUIDSYNTH_API void fluid_event_bank_select(fluid_event_t *evt, int channel, short bank_num)
Set a sequencer event to be a bank select event.
Definition: fluid_event.c:211
FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_register_client(fluid_sequencer_t *seq, const char *name, fluid_event_callback_t callback, void *data)
Register a sequencer client.
Definition: fluid_seq.c:269
FLUIDSYNTH_API fluid_settings_t * new_fluid_settings(void)
Create a new settings object.
Definition: fluid_settings.c:235
FLUIDSYNTH_API int fluid_synth_get_cc(fluid_synth_t *synth, int chan, int ctrl, int *pval)
Get current MIDI controller value on a MIDI channel.
Definition: fluid_synth.c:1211
FLUIDSYNTH_API double fluid_synth_get_chorus_depth_ms(fluid_synth_t *synth)
Get chorus depth.
Definition: fluid_synth.c:4051
FLUIDSYNTH_API int fluid_player_get_current_tick(fluid_player_t *player)
Get the number of tempo ticks passed.
Definition: fluid_midi.c:1794
FLUIDSYNTH_API fluid_mod_t * fluid_mod_new(void)
Create a new uninitialized modulator structure.
Definition: fluid_mod.c:383
void(* fluid_settings_foreach_option_t)(void *data, char *name, char *option)
Callback function type used with fluid_settings_foreach_option()
Definition: settings.h:192
FLUIDSYNTH_API int fluid_sequencer_client_is_dest(fluid_sequencer_t *seq, int id)
Check if a client is a destination client.
Definition: fluid_seq.c:406
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_synth_select_tuning(fluid_synth_t *synth, int chan, int bank, int prog)
Select a tuning scale on a MIDI channel.
Definition: fluid_synth.c:4522
@ FLUID_MIDI_ROUTER_RULE_KEY_PRESSURE
MIDI key pressure rule.
Definition: midi.h:66
FLUIDSYNTH_API char * fluid_get_userconf(char *buf, int len)
Get the user specific FluidSynth command file name.
Definition: fluid_cmd.c:382
@ FLUID_NUM_TYPE
Numeric (double)
Definition: settings.h:122
FLUIDSYNTH_API int fluid_mod_get_source1(fluid_mod_t *mod)
Get the primary source value from a modulator.
Definition: fluid_mod.c:97
FLUIDSYNTH_API int fluid_cmd_handler_register(fluid_cmd_handler_t *handler, fluid_cmd_t *cmd)
Register a new command to the handler.
Definition: fluid_cmd.c:1777
@ GEN_ABS_NRPN
Generator is an absolute value.
Definition: gen.h:124
FLUIDSYNTH_API void fluid_event_channel_pressure(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a channel-wide aftertouch event.
Definition: fluid_event.c:425
@ GEN_SAMPLEMODE
Sample mode flags.
Definition: gen.h:91
FLUIDSYNTH_API int fluid_synth_activate_tuning(fluid_synth_t *synth, int chan, int bank, int prog, int apply)
Activate a tuning scale on a MIDI channel.
Definition: fluid_synth.c:4541
FLUIDSYNTH_API void fluid_synth_set_gain(fluid_synth_t *synth, float gain)
Set synth output gain value.
Definition: fluid_synth.c:2256
struct _fluid_synth_t fluid_synth_t
Synthesizer instance.
Definition: types.h:37
FLUIDSYNTH_API int fluid_synth_tune_notes(fluid_synth_t *synth, int bank, int prog, int len, const int *keys, const double *pitch, int apply)
Set tuning values for one or more MIDI notes for an existing tuning.
Definition: fluid_synth.c:4468
@ GEN_VOLENVSUSTAIN
Volume envelope sustain.
Definition: gen.h:74
FLUIDSYNTH_API void fluid_mod_set_source1(fluid_mod_t *mod, int src, int flags)
Set a modulator's primary source controller and flags.
Definition: fluid_mod.c:48
@ GEN_UNUSED2
Unused.
Definition: gen.h:55
#define FLUID_HINT_BOUNDED_ABOVE
Hint FLUID_HINT_BOUNDED_ABOVE indicates that the UpperBound field of the FLUID_PortRangeHint should b...
Definition: settings.h:70
FLUIDSYNTH_API int fluid_mod_get_flags1(fluid_mod_t *mod)
Get primary source flags from a modulator.
Definition: fluid_mod.c:108
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_synth_reset_tuning(fluid_synth_t *synth, int chan)
Clear tuning scale on a MIDI channel (set it to the default equal tempered scale).
Definition: fluid_synth.c:4615
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
unsigned char src1
Source controller 1.
Definition: mod.h:43
FLUIDSYNTH_API int fluid_synth_pitch_bend(fluid_synth_t *synth, int chan, int val)
Set the MIDI pitch bend controller value on a MIDI channel.
Definition: fluid_synth.c:1735
#define FLUID_REVERB_DEFAULT_LEVEL
Default reverb level.
Definition: synth.h:156
FLUIDSYNTH_API int fluid_synth_get_pitch_wheel_sens(fluid_synth_t *synth, int chan, int *pval)
Get MIDI pitch wheel sensitivity on a MIDI channel.
Definition: fluid_synth.c:1814
@ FLUID_SEQ_BANKSELECT
Bank select message.
Definition: event.h:44
FLUIDSYNTH_API int fluid_ramsfont_remove_izone(fluid_ramsfont_t *sfont, unsigned int bank, unsigned int num, fluid_sample_t *sample)
Removes the instrument zone corresponding to bank, num and sample.
Definition: fluid_ramsfont.c:401
@ FLUID_INTERP_4THORDER
Fourth-order interpolation, good quality, the default.
Definition: synth.h:212
void * data
User defined data.
Definition: sfont.h:102
struct _fluid_file_renderer_t fluid_file_renderer_t
Audio file renderer instance.
Definition: types.h:46
@ FLUID_SEQ_UNREGISTERING
Called when a sequencer client is being unregistered.
Definition: event.h:60
struct _fluid_event_t fluid_event_t
Sequencer event.
Definition: types.h:55
FLUIDSYNTH_API int fluid_sequencer_get_use_system_timer(fluid_sequencer_t *seq)
Check if a sequencer is using the system timer or not.
Definition: fluid_seq.c:197
@ GEN_PITCH
Pitch (NOTE: Not a real SoundFont generator)
Definition: gen.h:101
FLUIDSYNTH_API int fluid_midi_dump_prerouter(void *data, fluid_midi_event_t *event)
MIDI event callback function to display event information to stdout.
Definition: fluid_midi_router.c:943
FLUIDSYNTH_API int fluid_synth_sysex(fluid_synth_t *synth, const char *data, int len, char *response, int *response_len, int *handled, int dryrun)
Process a MIDI SYSEX (system exclusive) message.
Definition: fluid_synth.c:1256
fluid_cmd_handler_t *(* fluid_server_newclient_func_t)(void *data, char *addr)
Callback function which is executed for new server connections.
Definition: shell.h:115
FLUIDSYNTH_API int fluid_synth_deactivate_tuning(fluid_synth_t *synth, int chan, int apply)
Clear tuning scale on a MIDI channel (use default equal tempered scale).
Definition: fluid_synth.c:4629
@ FLUID_VOICE_DEFAULT
For default modulators only, no need to check for duplicates.
Definition: voice.h:47
int fluid_istream_t
Input stream descriptor.
Definition: types.h:60
FLUIDSYNTH_API void fluid_synth_start_voice(fluid_synth_t *synth, fluid_voice_t *voice)
Activate a voice previously allocated with fluid_synth_alloc_voice().
Definition: fluid_synth.c:3191
FLUIDSYNTH_API int fluid_mod_get_dest(fluid_mod_t *mod)
Get destination effect from a modulator.
Definition: fluid_mod.c:141
@ GEN_VOLENVHOLD
Volume envelope hold.
Definition: gen.h:72
@ FLUID_SEQ_NOTEOFF
Note off event.
Definition: event.h:41
@ FLUID_SEQ_PROGRAMCHANGE
Program change message.
Definition: event.h:45
FLUIDSYNTH_API void fluid_synth_tuning_iteration_start(fluid_synth_t *synth)
Start tuning iteration.
Definition: fluid_synth.c:4645
@ FLUID_PRESET_SELECTED
Preset selected notify.
Definition: sfont.h:68
FLUIDSYNTH_API int fluid_synth_get_chorus_type(fluid_synth_t *synth)
Get chorus waveform type.
Definition: fluid_synth.c:4067
@ CHANNEL_TYPE_MELODIC
Melodic midi channel.
Definition: synth.h:111
FLUIDSYNTH_API int fluid_sample_set_sound_data(fluid_sample_t *sample, short *data, unsigned int nbframes, short copy_data, int rootkey)
Assign sample data to a RAM SoundFont sample.
Definition: fluid_ramsfont.c:1138
FLUIDSYNTH_API int fluid_synth_program_change(fluid_synth_t *synth, int chan, int program)
Send a program change event on a MIDI channel.
Definition: fluid_synth.c:1945
@ FLUID_SEQ_LASTEVENT
Defines the count of event enums.
Definition: event.h:61
FLUIDSYNTH_API int fluid_sequencer_send_at(fluid_sequencer_t *seq, fluid_event_t *evt, unsigned int time, int absolute)
Schedule an event for sending at a later time.
Definition: fluid_seq.c:460
fluid_log_level
FluidSynth log levels.
Definition: log.h:55
FLUIDSYNTH_API int fluid_synth_sfload(fluid_synth_t *synth, const char *filename, int reset_presets)
Load a SoundFont file (filename is interpreted by SoundFont loaders).
Definition: fluid_synth.c:3250
FLUIDSYNTH_API fluid_audio_driver_t * new_fluid_audio_driver(fluid_settings_t *settings, fluid_synth_t *synth)
Create a new audio driver.
Definition: fluid_adriver.c:344
@ GEN_MODENVDECAY
Modulation envelope decay.
Definition: gen.h:65
#define FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE
Length of channel info name field (including zero terminator)
Definition: synth.h:48
FLUIDSYNTH_API void fluid_event_sustain(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a MIDI sustain event.
Definition: fluid_event.c:316
FLUIDSYNTH_API int fluid_player_get_status(fluid_player_t *player)
Get MIDI player status.
Definition: fluid_midi.c:1713
@ GEN_VOLENVRELEASE
Volume envelope release.
Definition: gen.h:75
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:63
FLUIDSYNTH_API void fluid_event_control_change(fluid_event_t *evt, int channel, short control, short val)
Set a sequencer event to be a MIDI control change event.
Definition: fluid_event.c:333
FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t *player)
Get the tempo of a MIDI player in beats per minute.
Definition: fluid_midi.c:1825
FLUIDSYNTH_API int fluid_file_set_encoding_quality(fluid_file_renderer_t *dev, double q)
Set vbr encoding quality (only available with libsndfile support)
Definition: fluid_filerenderer.c:317
FLUIDSYNTH_API void delete_fluid_event(fluid_event_t *evt)
Delete a sequencer event structure.
Definition: fluid_event.c:76
@ GEN_UNUSED1
Unused.
Definition: gen.h:51
fluid_mod_flags
Flags defining the polarity, mapping function and type of a modulator source.
Definition: mod.h:63
@ FLUID_CHORUS_MOD_TRIANGLE
Triangle wave chorus modulation.
Definition: synth.h:166
@ GEN_INSTRUMENT
Instrument ID (shouldn't be set by user)
Definition: gen.h:78
@ GEN_VELOCITY
Fixed MIDI velocity value.
Definition: gen.h:84
FLUIDSYNTH_API int fluid_midi_event_get_velocity(fluid_midi_event_t *evt)
Get the velocity field of a MIDI event structure.
Definition: fluid_midi.c:900
char * name
The name of the command, as typed in the shell.
Definition: shell.h:59
FLUIDSYNTH_API float fluid_synth_get_gain(fluid_synth_t *synth)
Get synth output gain value.
Definition: fluid_synth.c:2291
FLUIDSYNTH_API int fluid_is_soundfont(const char *filename)
Check if a file is a SoundFont file.
Definition: fluid_sys.c:350
int assigned
TRUE if a preset is assigned, FALSE otherwise.
Definition: synth.h:56
@ FLUID_MOD_CONCAVE
Concave mapping function.
Definition: mod.h:70
int(* free)(fluid_sfloader_t *loader)
The free method should free the memory allocated for the loader in addition to any private data.
Definition: sfont.h:86
@ FLUID_MOD_VELOCITY
MIDI note-on velocity.
Definition: mod.h:84
FLUIDSYNTH_API double fluid_synth_get_reverb_damp(fluid_synth_t *synth)
Get reverb damping.
Definition: fluid_synth.c:3872
@ FLUID_SEQ_PAN
Stereo pan set event.
Definition: event.h:52
FLUIDSYNTH_API int fluid_midi_event_get_channel(fluid_midi_event_t *evt)
Get the channel field of a MIDI event structure.
Definition: fluid_midi.c:852
FLUIDSYNTH_API int fluid_midi_event_get_pitch(fluid_midi_event_t *evt)
Get the pitch field of a MIDI event structure.
Definition: fluid_midi.c:996
@ FLUID_STR_TYPE
String.
Definition: settings.h:124
char *(* get_name)(fluid_preset_t *preset)
Method to get a virtual SoundFont preset name.
Definition: sfont.h:175
FLUIDSYNTH_API fluid_sfont_t * fluid_synth_get_sfont_by_name(fluid_synth_t *synth, const char *name)
Get SoundFont by name.
Definition: fluid_synth.c:3617
FLUIDSYNTH_API int fluid_settings_get_hints(fluid_settings_t *settings, const char *name)
Get the hints for the named setting as an integer bitmap.
Definition: fluid_settings.c:609
FLUIDSYNTH_API unsigned int fluid_event_get_duration(fluid_event_t *evt)
Get the duration field from a sequencer event structure.
Definition: fluid_event.c:568
@ FLUID_SEQ_ALLSOUNDSOFF
All sounds off event.
Definition: event.h:42
FLUIDSYNTH_API int fluid_source(fluid_cmd_handler_t *handler, const char *filename)
Execute shell commands in a file.
Definition: fluid_cmd.c:349
FLUIDSYNTH_API fluid_audio_driver_t * new_fluid_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t func, void *data)
Create a new audio driver.
Definition: fluid_adriver.c:375
FLUIDSYNTH_API int fluid_settings_get_type(fluid_settings_t *settings, const char *name)
Get the type of the setting with the given name.
Definition: fluid_settings.c:585
FLUIDSYNTH_API void fluid_synth_add_sfloader(fluid_synth_t *synth, fluid_sfloader_t *loader)
Add a SoundFont loader to the synth.
Definition: fluid_synth.c:3225
@ GEN_VOLENVATTACK
Volume envelope attack.
Definition: gen.h:71
FLUIDSYNTH_API int fluid_player_play(fluid_player_t *player)
Activates play mode for a MIDI player if not already playing.
Definition: fluid_midi.c:1657
struct _fluid_server_t fluid_server_t
TCP/IP shell server instance.
Definition: types.h:54
void * data
User defined data pointer used by _fluid_sfloader_t::load()
Definition: sfont.h:78
@ GEN_STARTADDROFS
Sample start address offset (0-32767)
Definition: gen.h:37
struct _fluid_midi_driver_t fluid_midi_driver_t
MIDI driver instance.
Definition: types.h:49
FLUIDSYNTH_API fluid_voice_t * fluid_synth_alloc_voice(fluid_synth_t *synth, fluid_sample_t *sample, int channum, int key, int vel)
Allocate a synthesis voice.
Definition: fluid_synth.c:3079
FLUIDSYNTH_API fluid_server_t * new_fluid_server(fluid_settings_t *settings, fluid_server_newclient_func_t func, void *data)
Create a new TCP/IP command shell server.
Definition: fluid_cmd.c:1837
FLUIDSYNTH_API fluid_file_renderer_t * new_fluid_file_renderer(fluid_synth_t *synth)
Create a new file renderer and open the file.
Definition: fluid_filerenderer.c:206
struct _fluid_midi_event_t fluid_midi_event_t
MIDI event.
Definition: types.h:48
FLUIDSYNTH_API int fluid_midi_event_get_program(fluid_midi_event_t *evt)
Get the program field of a MIDI event structure.
Definition: fluid_midi.c:972
FLUIDSYNTH_API int fluid_midi_event_set_key(fluid_midi_event_t *evt, int key)
Set the key field of a MIDI event structure.
Definition: fluid_midi.c:888
#define FLUID_HINT_TOGGLED
Hint FLUID_HINT_TOGGLED indicates that the data item should be considered a Boolean toggle.
Definition: settings.h:79
@ GEN_VOLENVDELAY
Volume envelope delay.
Definition: gen.h:70
unsigned char flags2
Source controller 2 flags.
Definition: mod.h:46
fluid_interp
Synthesis interpolation method.
Definition: synth.h:209
@ FLUID_MOD_BIPOLAR
Mapping function is bipolar.
Definition: mod.h:68
FLUIDSYNTH_API short fluid_event_get_value(fluid_event_t *evt)
Get the value field from a sequencer event structure.
Definition: fluid_event.c:544
FLUIDSYNTH_API int fluid_synth_sfcount(fluid_synth_t *synth)
Count number of loaded SoundFont files.
Definition: fluid_synth.c:3547
FLUIDSYNTH_API int delete_fluid_ramsample(fluid_sample_t *sample)
Delete a RAM SoundFont sample.
Definition: fluid_ramsfont.c:1221
@ FLUID_SEQ_REVERBSEND
Reverb send set event.
Definition: event.h:54
#define FLUID_REVERB_DEFAULT_WIDTH
Default reverb width.
Definition: synth.h:155
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_source(fluid_event_t *evt)
Get the source sequencer client from a sequencer event structure.
Definition: fluid_event.c:477
int(* fluid_cmd_func_t)(void *data, int ac, char **av, fluid_ostream_t out)
Command handler function prototype.
Definition: shell.h:53
struct _fluid_hashtable_t fluid_settings_t
Configuration settings instance.
Definition: types.h:36
FLUIDSYNTH_API int fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog)
Advance to next tuning.
Definition: fluid_synth.c:4661
FLUIDSYNTH_API short fluid_event_get_bank(fluid_event_t *evt)
Get the MIDI bank field from a sequencer event structure.
Definition: fluid_event.c:581
@ GEN_MODENVDELAY
Modulation envelope delay.
Definition: gen.h:62
FLUIDSYNTH_API int delete_fluid_midi_router(fluid_midi_router_t *handler)
Delete a MIDI router instance.
Definition: fluid_midi_router.c:133
FLUIDSYNTH_API int fluid_synth_activate_octave_tuning(fluid_synth_t *synth, int bank, int prog, const char *name, const double *pitch, int apply)
Activate an octave tuning on every octave in the MIDI note scale.
Definition: fluid_synth.c:4424
FLUIDSYNTH_API void fluid_synth_set_chorus(fluid_synth_t *synth, int nr, double level, double speed, double depth_ms, int type)
Set chorus parameters.
Definition: fluid_synth.c:3943
FLUIDSYNTH_API int fluid_synth_add_sfont(fluid_synth_t *synth, fluid_sfont_t *sfont)
Add a SoundFont.
Definition: fluid_synth.c:3478
FLUIDSYNTH_API int fluid_sequencer_count_clients(fluid_sequencer_t *seq)
Count a sequencers registered clients.
Definition: fluid_seq.c:348
FLUIDSYNTH_API void fluid_sequencer_send_now(fluid_sequencer_t *seq, fluid_event_t *evt)
Send an event immediately.
Definition: fluid_seq.c:431
FLUIDSYNTH_API void fluid_event_unregistering(fluid_event_t *evt)
Set a sequencer event to be an unregistering event.
Definition: fluid_event.c:412
FLUIDSYNTH_API double fluid_synth_get_chorus_speed_Hz(fluid_synth_t *synth)
Get chorus speed in Hz.
Definition: fluid_synth.c:4035
@ GEN_MODLFOTOVOL
Modulation LFO to volume.
Definition: gen.h:50
FLUIDSYNTH_API fluid_midi_driver_t * new_fluid_midi_driver(fluid_settings_t *settings, handle_midi_event_func_t handler, void *event_handler_data)
Create a new MIDI driver instance.
Definition: fluid_mdriver.c:215
@ GEN_MODLFOTOFILTERFC
Modulation LFO to filter cutoff.
Definition: gen.h:47
FLUIDSYNTH_API fluid_cmd_handler_t * new_fluid_cmd_handler(fluid_synth_t *synth)
Create a new command handler.
Definition: fluid_cmd.c:1730
@ GEN_FINETUNE
Fine tuning.
Definition: gen.h:89
double val
The nominal value.
Definition: gen.h:112
FLUIDSYNTH_API void fluid_settings_foreach(fluid_settings_t *settings, void *data, fluid_settings_foreach_t func)
Iterate the existing settings defined in a settings object, calling the provided callback function fo...
Definition: fluid_settings.c:1567
FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t *seq)
Get a sequencer's time scale.
Definition: fluid_seq.c:571
@ FLUID_MIDI_ROUTER_RULE_CHANNEL_PRESSURE
MIDI channel pressure rule.
Definition: midi.h:65
FLUIDSYNTH_API int fluid_audio_driver_register(const char **adrivers)
Registers audio drivers to use.
Definition: fluid_adriver.c:441
FLUIDSYNTH_API void fluid_event_modulation(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a modulation event.
Definition: fluid_event.c:300
FLUIDSYNTH_API fluid_istream_t fluid_get_stdin(void)
Get standard in stream handle.
Definition: fluid_sys.c:820
Shell command information structure.
Definition: shell.h:58
unsigned char flags1
Source controller 1 flags.
Definition: mod.h:44
@ GEN_RESERVED1
Reserved.
Definition: gen.h:79
@ FLUID_PRESET_UNSELECTED
Preset unselected notify.
Definition: sfont.h:69
FLUIDSYNTH_API char * fluid_get_sysconf(char *buf, int len)
Get the system FluidSynth command file name.
Definition: fluid_cmd.c:404
FLUIDSYNTH_API int fluid_ramsfont_set_name(fluid_ramsfont_t *sfont, const char *name)
Set a RAM SoundFont name.
Definition: fluid_ramsfont.c:297
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
unsigned int id
SoundFont ID.
Definition: sfont.h:103
@ FLUID_SEQ_VOLUME
Volume set event.
Definition: event.h:53
@ FLUID_MOD_CC
MIDI CC controller (source will be a MIDI CC number)
Definition: mod.h:74
int(* free)(fluid_preset_t *preset)
Method to free a virtual SoundFont preset.
Definition: sfont.h:166
@ FLUID_SAMPLE_DONE
Sample no longer needed notify.
Definition: sfont.h:70
@ FLUID_SEQ_PROGRAMSELECT
Program select message (DOCME)
Definition: event.h:46
@ GEN_FILTERFC
Filter cutoff.
Definition: gen.h:45
@ FLUID_MOD_CONVEX
Convex mapping function.
Definition: mod.h:71
FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t *seq)
Get the current tick of a sequencer.
Definition: fluid_seq.c:501
struct _fluid_shell_t fluid_shell_t
Command shell.
Definition: types.h:53
#define FLUID_HINT_FILENAME
String setting is a file name.
Definition: settings.h:109
int(* fluid_audio_callback_t)(fluid_synth_t *synth, int len, void *out1, int loff, int lincr, void *out2, int roff, int rincr)
Type definition of the synthesizer's audio callback function.
Definition: synth.h:306
struct _fluid_rampreset_t fluid_rampreset_t
RAM SoundFont preset.
Definition: types.h:58
FLUIDSYNTH_API int fluid_voice_is_playing(const fluid_voice_t *voice)
Check if a voice is producing sound.
Definition: fluid_voice.c:1428
unsigned int loopstart
Loop start index.
Definition: sfont.h:240
@ FLUID_ERR
Serious error occurred.
Definition: log.h:57
FLUIDSYNTH_API int fluid_file_renderer_process_block(fluid_file_renderer_t *dev)
Write period_size samples to file.
Definition: fluid_filerenderer.c:365
FLUIDSYNTH_API void fluid_event_all_notes_off(fluid_event_t *evt, int channel)
Set a sequencer event to be a all notes off event.
Definition: fluid_event.c:198
FLUIDSYNTH_API double fluid_settings_getnum_default(fluid_settings_t *settings, const char *name)
Get the default value of a named numeric (double) setting.
Definition: fluid_settings.c:1196
#define FLUID_REVERB_DEFAULT_ROOMSIZE
Default reverb room size.
Definition: synth.h:153
FLUIDSYNTH_API void fluid_event_volume(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a volume event.
Definition: fluid_event.c:364
@ GEN_ENDADDROFS
Sample end address offset (-32767-0)
Definition: gen.h:38
FLUIDSYNTH_API int fluid_synth_write_s16(fluid_synth_t *synth, int len, void *lout, int loff, int lincr, void *rout, int roff, int rincr)
Synthesize a block of 16 bit audio samples to audio buffers.
Definition: fluid_synth.c:2793
char name[FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE]
Channel preset name.
Definition: synth.h:61
FLUIDSYNTH_API int fluid_synth_set_channel_type(fluid_synth_t *synth, int chan, int type)
Set midi channel type.
Definition: fluid_synth.c:5186
#define FLUID_CHORUS_DEFAULT_DEPTH
Default chorus depth.
Definition: synth.h:181
FLUIDSYNTH_API void fluid_settings_getnum_range(fluid_settings_t *settings, const char *name, double *min, double *max)
Get the range of values of a numeric setting.
Definition: fluid_settings.c:1165
Virtual SoundFont instance structure.
Definition: sfont.h:101
#define FLUID_OK
Value that indicates success, used by most libfluidsynth functions.
Definition: misc.h:52
FLUIDSYNTH_API int fluid_synth_count_midi_channels(fluid_synth_t *synth)
Get the total count of MIDI channels.
Definition: fluid_synth.c:4146
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:81
FLUIDSYNTH_API void fluid_event_noteon(fluid_event_t *evt, int channel, short key, short vel)
Set a sequencer event to be a note on event.
Definition: fluid_event.c:140
@ GEN_UNUSED3
Unused.
Definition: gen.h:56
FLUIDSYNTH_API int fluid_midi_event_set_sysex(fluid_midi_event_t *evt, void *data, int size, int dynamic)
Assign sysex data to a MIDI event structure.
Definition: fluid_midi.c:1027
@ FLUID_SET_TYPE
Set of values.
Definition: settings.h:125
SoundFont generator structure.
Definition: gen.h:109
@ FLUID_SEQ_NOTEON
Note on event.
Definition: event.h:40
#define FLUID_FAILED
Value that indicates failure, used by most libfluidsynth functions.
Definition: misc.h:60
int program
MIDI program number (0-127)
Definition: synth.h:60
int fluid_ostream_t
Output stream descriptor.
Definition: types.h:61
#define FLUID_NUM_MOD
Maximum number of modulators in a voice.
Definition: mod.h:33
FLUIDSYNTH_API int fluid_synth_sfreload(fluid_synth_t *synth, unsigned int id)
Reload a SoundFont.
Definition: fluid_synth.c:3411
FLUIDSYNTH_API double fluid_mod_get_amount(fluid_mod_t *mod)
Get the scale amount from a modulator.
Definition: fluid_mod.c:152
unsigned int samplerate
Sample rate.
Definition: sfont.h:242
FLUIDSYNTH_API int fluid_settings_getint_default(fluid_settings_t *settings, const char *name)
Get the default value of an integer setting.
Definition: fluid_settings.c:1338
#define FLUID_HINT_OPTIONLIST
Setting is a list of string options.
Definition: settings.h:110
int(* noteon)(fluid_preset_t *preset, fluid_synth_t *synth, int chan, int key, int vel)
Method to handle a noteon event (synthesize the instrument).
Definition: sfont.h:213
FLUIDSYNTH_API int fluid_synth_set_gen(fluid_synth_t *synth, int chan, int param, float value)
Set a SoundFont generator (effect) value on a MIDI channel in real-time.
Definition: fluid_synth.c:4872
int(* fluid_audio_func_t)(void *data, int len, int nin, float **in, int nout, float **out)
Callback function type used with new_fluid_audio_driver2() to allow for custom user audio processing ...
Definition: audio.h:54
FLUIDSYNTH_API void fluid_event_chorus_send(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a chorus send event.
Definition: fluid_event.c:396
FLUIDSYNTH_API int fluid_settings_getint(fluid_settings_t *settings, const char *name, int *val)
Get an integer value setting.
Definition: fluid_settings.c:1275
char * help
A help string.
Definition: shell.h:63
FLUIDSYNTH_API int fluid_midi_event_get_value(fluid_midi_event_t *evt)
Get the value field from a MIDI event structure.
Definition: fluid_midi.c:948
struct _fluid_midi_router_rule_t fluid_midi_router_rule_t
MIDI router rule.
Definition: types.h:51
void * data
User supplied data.
Definition: sfont.h:158
void(* fluid_event_callback_t)(unsigned int time, fluid_event_t *event, fluid_sequencer_t *seq, void *data)
Event callback prototype for destination clients.
Definition: seq.h:40
@ GEN_UNUSED
Generator value is not set.
Definition: gen.h:122
FLUIDSYNTH_API int fluid_synth_channel_pressure(fluid_synth_t *synth, int chan, int val)
Set the MIDI channel pressure controller value.
Definition: fluid_synth.c:1704
fluid_gen_flags
Enum value for 'flags' field of fluid_gen_t (not really flags).
Definition: gen.h:120
Modulator structure.
Definition: mod.h:40
Channel information structure for fluid_synth_get_channel_info().
Definition: synth.h:54
FLUIDSYNTH_API double fluid_synth_get_cpu_load(fluid_synth_t *synth)
Get the synth CPU load value.
Definition: fluid_synth.c:4212
@ FLUID_SEQ_ALLNOTESOFF
All notes off event.
Definition: event.h:43
double mod
Change by modulators.
Definition: gen.h:113
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 i...
Definition: fluid_seqbind.c:287
FLUIDSYNTH_API int fluid_midi_event_set_control(fluid_midi_event_t *evt, int ctrl)
Set the control field of a MIDI event structure.
Definition: fluid_midi.c:936
FLUIDSYNTH_API void fluid_voice_update_param(fluid_voice_t *voice, int gen)
Update all the synthesis parameters, which depend on generator gen.
Definition: fluid_voice.c:699
@ GEN_MODENVTOFILTERFC
Modulation envelope to filter cutoff.
Definition: gen.h:48
@ GEN_PAN
Stereo panning.
Definition: gen.h:54
int(* free)(fluid_sfont_t *sfont)
Method to free a virtual SoundFont bank.
Definition: sfont.h:112
unsigned char flags
Is the generator set or not (fluid_gen_flags)
Definition: gen.h:111
@ FLUID_MIDI_ROUTER_RULE_NOTE
MIDI note rule.
Definition: midi.h:61
@ GEN_MODLFOFREQ
Modulation LFO frequency.
Definition: gen.h:59
int(* notify)(fluid_sample_t *sample, int reason)
Implement this function to receive notification when sample is no longer used.
Definition: sfont.h:260
FLUIDSYNTH_API void fluid_synth_set_chorus_on(fluid_synth_t *synth, int on)
Enable or disable chorus effect.
Definition: fluid_synth.c:3920
FLUIDSYNTH_API double fluid_synth_get_reverb_width(fluid_synth_t *synth)
Get reverb width.
Definition: fluid_synth.c:3904
FLUIDSYNTH_API void fluid_event_program_select(fluid_event_t *evt, int channel, unsigned int sfont_id, short bank_num, short preset_num)
Set a sequencer event to be a program select event.
Definition: fluid_event.c:241
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_synth_create_key_tuning(fluid_synth_t *synth, int bank, int prog, const char *name, const double *pitch)
Set the tuning of the entire MIDI note scale.
Definition: fluid_synth.c:4339
FLUIDSYNTH_API void delete_fluid_settings(fluid_settings_t *settings)
Delete the provided settings object.
Definition: fluid_settings.c:254
FLUIDSYNTH_API fluid_midi_router_rule_t * new_fluid_midi_router_rule(void)
Create a new MIDI router rule.
Definition: fluid_midi_router.c:353
@ GEN_KEYTOMODENVDECAY
Key to modulation envelope decay.
Definition: gen.h:69
int origpitch
Original pitch (MIDI note number, 0-127)
Definition: sfont.h:243
FLUIDSYNTH_API int fluid_player_set_loop(fluid_player_t *player, int loop)
Enable looping of a MIDI player.
Definition: fluid_midi.c:1728
FLUIDSYNTH_API int fluid_synth_get_pitch_bend(fluid_synth_t *synth, int chan, int *ppitch_bend)
Get the MIDI pitch bend controller value on a MIDI channel.
Definition: fluid_synth.c:1766
@ FLUID_VOICE_OVERWRITE
Overwrite any existing matching modulator.
Definition: voice.h:45
FLUIDSYNTH_API int fluid_synth_get_polyphony(fluid_synth_t *synth)
Get current synthesizer polyphony (max number of voices).
Definition: fluid_synth.c:2374
FLUIDSYNTH_API fluid_player_t * new_fluid_player(fluid_synth_t *synth)
Create a new MIDI player.
Definition: fluid_midi.c:1253
FLUIDSYNTH_API int fluid_voice_get_actual_key(const fluid_voice_t *voice)
If the voice is playing, gets the midi key the voice is actually playing at.
Definition: fluid_voice.c:1488
@ FLUID_MIDI_ROUTER_RULE_PITCH_BEND
MIDI pitch bend rule.
Definition: midi.h:64
#define FLUID_CHORUS_DEFAULT_SPEED
Default chorus speed.
Definition: synth.h:180
FLUIDSYNTH_API int fluid_player_add(fluid_player_t *player, const char *midifile)
Add a MIDI file to a player queue.
Definition: fluid_midi.c:1427
FLUIDSYNTH_API int fluid_synth_set_polyphony(fluid_synth_t *synth, int polyphony)
Set synthesizer polyphony (max number of voices).
Definition: fluid_synth.c:2319
fluid_preset_t *(* get_preset)(fluid_sfont_t *sfont, unsigned int bank, unsigned int prenum)
Get a virtual SoundFont preset by bank and program numbers.
Definition: sfont.h:129
FLUIDSYNTH_API int fluid_midi_event_set_channel(fluid_midi_event_t *evt, int chan)
Set the channel field of a MIDI event structure.
Definition: fluid_midi.c:864
unsigned char dest
Destination generator to control.
Definition: mod.h:42
void * data
User data passed to the handler.
Definition: shell.h:62
@ FLUID_SEQ_NOTE
Note event with duration.
Definition: event.h:39
int valid
Should be TRUE if sample data is valid, FALSE otherwise (in which case it will not be synthesized)
Definition: sfont.h:246
FLUIDSYNTH_API int fluid_synth_sfont_select(fluid_synth_t *synth, int chan, unsigned int sfont_id)
Set SoundFont ID on a MIDI channel.
Definition: fluid_synth.c:2048
FLUIDSYNTH_API void fluid_sequencer_process(fluid_sequencer_t *seq, unsigned int msec)
Advance a sequencer that isn't using the system timer.
Definition: fluid_seq.c:819
FLUIDSYNTH_API void fluid_synth_set_sample_rate(fluid_synth_t *synth, float sample_rate)
Set sample rate of the synth.
Definition: fluid_synth.c:2223
char *(* get_name)(fluid_sfont_t *sfont)
Method to return the name of a virtual SoundFont.
Definition: sfont.h:119
@ FLUID_SEQ_CHANNELPRESSURE
Channel aftertouch event.
Definition: event.h:58
FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t *synth, int bank, int prog, char *name, int len, double *pitch)
Get the entire note tuning for a given MIDI bank and program.
Definition: fluid_synth.c:4716
FLUIDSYNTH_API short fluid_event_get_program(fluid_event_t *evt)
Get the MIDI program field from a sequencer event structure.
Definition: fluid_event.c:607
fluid_mod_src
General controller (if FLUID_MOD_GC in flags).
Definition: mod.h:81
@ FLUID_MOD_GC
General controller source type (fluid_mod_src)
Definition: mod.h:73
@ GEN_MODENVATTACK
Modulation envelope attack.
Definition: gen.h:63
@ GEN_VIBLFODELAY
Vibrato LFO delay.
Definition: gen.h:60
@ GEN_RESERVED3
Reserved.
Definition: gen.h:92
@ GEN_REVERBSEND
Reverb send amount.
Definition: gen.h:53
FLUIDSYNTH_API void fluid_event_pitch_wheelsens(fluid_event_t *evt, int channel, short val)
Set a sequencer event to be a pitch wheel sensitivity event.
Definition: fluid_event.c:286
@ GEN_MODLFOTOPITCH
Modulation LFO to pitch.
Definition: gen.h:42
FLUIDSYNTH_API FLUID_DEPRECATED void fluid_synth_set_midi_router(fluid_synth_t *synth, fluid_midi_router_t *router)
Assign a MIDI router to a synth.
Definition: fluid_synth.c:4964
FLUIDSYNTH_API int fluid_mod_test_identity(fluid_mod_t *mod1, fluid_mod_t *mod2)
Checks if two modulators are identical in sources, flags and destination.
Definition: fluid_mod.c:412
fluid_player_status
MIDI player status enum.
Definition: midi.h:117
FLUIDSYNTH_API FLUID_DEPRECATED int fluid_settings_getstr(fluid_settings_t *settings, const char *name, char **str)
Get the value of a string setting.
Definition: fluid_settings.c:875
FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t *player)
Get the tempo of a MIDI player.
Definition: fluid_midi.c:1836
FLUIDSYNTH_API fluid_sfont_t * fluid_synth_get_sfont(fluid_synth_t *synth, unsigned int num)
Get SoundFont by index.
Definition: fluid_synth.c:3567
FLUIDSYNTH_API int fluid_event_get_pitch(fluid_event_t *evt)
Get the pitch field from a sequencer event structure.
Definition: fluid_event.c:593
FLUIDSYNTH_API int fluid_player_get_total_ticks(fluid_player_t *player)
Looks through all available MIDI tracks and gets the absolute tick of the very last event to play.
Definition: fluid_midi.c:1805
FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_get_client_id(fluid_sequencer_t *seq, int index)
Get a client ID from its index (order in which it was registered).
Definition: fluid_seq.c:361
unsigned int end
End index, index of last valid sample point (contrary to SF spec)
Definition: sfont.h:239
struct _fluid_gen_t fluid_gen_t
SoundFont generator structure.
FLUIDSYNTH_API int fluid_synth_program_select(fluid_synth_t *synth, int chan, unsigned int sfont_id, unsigned int bank_num, unsigned int preset_num)
Select an instrument on a MIDI channel by SoundFont ID, bank and program numbers.
Definition: fluid_synth.c:2118
FLUIDSYNTH_API int fluid_settings_setstr(fluid_settings_t *settings, const char *name, const char *str)
Set a string value for a named setting.
Definition: fluid_settings.c:684
FLUIDSYNTH_API void fluid_event_note(fluid_event_t *evt, int channel, short key, short vel, unsigned int duration)
Set a sequencer event to be a note duration event.
Definition: fluid_event.c:171
FLUIDSYNTH_API int fluid_synth_system_reset(fluid_synth_t *synth)
Send MIDI system reset command (big red 'panic' button), turns off notes and resets controllers.
Definition: fluid_synth.c:1621
FLUIDSYNTH_API int fluid_player_stop(fluid_player_t *player)
Stops a MIDI player.
Definition: fluid_midi.c:1692
FLUIDSYNTH_API void fluid_default_log_function(int level, char *message, void *data)
Default log function which prints to the stderr.
Definition: fluid_sys.c:138
int amplitude_that_reaches_noise_floor_is_valid
Indicates if amplitude_that_reaches_noise_floor is valid (TRUE), set to FALSE initially to calculate.
Definition: sfont.h:249
FLUIDSYNTH_API int fluid_synth_set_bank_offset(fluid_synth_t *synth, int sfont_id, int offset)
Offset the bank numbers of a loaded SoundFont, i.e. subtract offset from any bank number when assigni...
Definition: fluid_synth.c:5090
FLUIDSYNTH_API fluid_settings_t * fluid_synth_get_settings(fluid_synth_t *synth)
Get settings assigned to a synth.
Definition: fluid_synth.c:4747
fluid_gen_type
Generator (effect) numbers (Soundfont 2.01 specifications section 8.1.3)
Definition: gen.h:36
FLUIDSYNTH_API fluid_synth_t * new_fluid_synth(fluid_settings_t *settings)
Create new FluidSynth instance.
Definition: fluid_synth.c:550
@ FLUID_INTERP_NONE
No interpolation: Fastest, but questionable audio quality.
Definition: synth.h:210
@ GEN_STARTLOOPADDRCOARSEOFS
Sample start loop address coarse offset (X 32768)
Definition: gen.h:82
@ FLUID_MOD_PITCHWHEEL
Pitch wheel.
Definition: mod.h:88
unsigned int loopend
Loop end index, first point following the loop (superimposed on loopstart)
Definition: sfont.h:241
@ FLUID_SEQ_CHORUSSEND
Chorus send set event.
Definition: event.h:55
FLUIDSYNTH_API int fluid_settings_is_realtime(fluid_settings_t *settings, const char *name)
Ask whether the setting is changeable in real-time.
Definition: fluid_settings.c:646
FLUIDSYNTH_API int fluid_voice_get_actual_velocity(const fluid_voice_t *voice)
If the voice is playing, gets the midi velocity the voice is actually playing at.
Definition: fluid_voice.c:1521
#define FLUID_CHORUS_DEFAULT_LEVEL
Default chorus level.
Definition: synth.h:179
FLUIDSYNTH_API int fluid_voice_is_on(const fluid_voice_t *voice)
Check if a voice is ON.
Definition: fluid_voice.c:1442
FLUIDSYNTH_API int fluid_event_get_channel(fluid_event_t *evt)
Get the MIDI channel field from a sequencer event structure.
Definition: fluid_event.c:497
FLUIDSYNTH_API int fluid_mod_get_source2(fluid_mod_t *mod)
Get the secondary source value from a modulator.
Definition: fluid_mod.c:119
fluid_sfont_t * sfont
Parent virtual SoundFont.
Definition: sfont.h:159
FLUIDSYNTH_API int fluid_player_set_playback_callback(fluid_player_t *player, handle_midi_event_func_t handler, void *handler_data)
Change the MIDI callback function.
Definition: fluid_midi.c:1412
FLUIDSYNTH_API void * fluid_event_get_data(fluid_event_t *evt)
Get the data field from a sequencer event structure.
Definition: fluid_event.c:556
@ FLUID_MOD_UNIPOLAR
Mapping function is unipolar.
Definition: mod.h:67
struct _fluid_voice_t fluid_voice_t
Synthesis voice instance.
Definition: types.h:39
@ FLUID_PANIC
The synth can't function correctly any more.
Definition: log.h:56
FLUIDSYNTH_API void fluid_event_any_control_change(fluid_event_t *evt, int channel)
Set a sequencer event to be an any control change event (for internal use).
Definition: fluid_event.c:257
FLUIDSYNTH_API int delete_fluid_synth(fluid_synth_t *synth)
Delete a FluidSynth instance.
Definition: fluid_synth.c:779
@ GEN_CHORUSSEND
Chorus send amount.
Definition: gen.h:52
@ GEN_ATTENUATION
Initial volume attenuation.
Definition: gen.h:85
FLUIDSYNTH_API int fluid_synth_start(fluid_synth_t *synth, unsigned int id, fluid_preset_t *preset, int audio_chan, int midi_chan, int key, int vel)
Create and start voices using a preset and a MIDI note on event.
Definition: fluid_synth.c:5032
@ CHANNEL_TYPE_DRUM
Drum midi channel.
Definition: synth.h:112
fluid_midi_router_rule_type
MIDI router rule type.
Definition: midi.h:59
FLUIDSYNTH_API int fluid_synth_nwrite_float(fluid_synth_t *synth, int len, float **left, float **right, float **fx_left, float **fx_right)
Synthesize a block of floating point audio to separate audio buffers (multichannel rendering).
Definition: fluid_synth.c:2497
FLUIDSYNTH_API double fluid_synth_get_reverb_level(fluid_synth_t *synth)
Get reverb level.
Definition: fluid_synth.c:3888
Virtual SoundFont sample.
Definition: sfont.h:235
FLUIDSYNTH_API int fluid_mod_get_flags2(fluid_mod_t *mod)
Get secondary source flags from a modulator.
Definition: fluid_mod.c:130
fluid_chorus_mod
Chorus modulation waveform type.
Definition: synth.h:164
@ FLUID_SEQ_ANYCONTROLCHANGE
Any control change message (only internally used for remove_events)
Definition: event.h:57
@ GEN_COARSETUNE
Coarse tuning.
Definition: gen.h:88
int(* get_num)(fluid_preset_t *preset)
Method to get a virtual SoundFont preset MIDI program number.
Definition: sfont.h:189
FLUIDSYNTH_API int fluid_synth_cc(fluid_synth_t *synth, int chan, int ctrl, int val)
Send a MIDI controller event on a MIDI channel.
Definition: fluid_synth.c:1061
struct _fluid_midi_router_t fluid_midi_router_t
MIDI router instance.
Definition: types.h:50
@ FLUID_SEQ_PITCHWHEELSENS
Pitch wheel sensitivity set message.
Definition: event.h:48
FLUIDSYNTH_API void fluid_event_timer(fluid_event_t *evt, void *data)
Set a sequencer event to be a timer event.
Definition: fluid_event.c:126
FLUIDSYNTH_API void delete_fluid_file_renderer(fluid_file_renderer_t *dev)
Close file and destroy a file renderer object.
Definition: fluid_filerenderer.c:332
FLUIDSYNTH_API int fluid_synth_process(fluid_synth_t *synth, int len, int nin, float **in, int nout, float **out)
Synthesize floating point audio to audio buffers.
Definition: fluid_synth.c:2645
#define FLUID_SAMPLETYPE_ROM
Flag for fluid_sample_t sampletype field, ROM sample, causes sample to be ignored.
Definition: sfont.h:274
Generated for libfluidsynth by
1.8.17