module documentation


pyFluidSynth

Python bindings for FluidSynth

Copyright 2008--2024, Nathan Whitehead <nwhitehe@gmail.com> and others.

Released under the LGPL

This module contains python bindings for FluidSynth. FluidSynth is a software synthesizer for generating music. It works like a MIDI synthesizer. You load patches, set parameters, then send NOTEON and NOTEOFF events to play notes. Instruments are defined in SoundFonts, generally files with the extension SF2. FluidSynth can either be used to play audio itself, or you can call a function that returns chunks of audio data and output the data to the soundcard yourself. FluidSynth works on all major platforms, so pyFluidSynth should also.


Class fluid_midi_router_t Undocumented
Class fluid_synth_channel_info_t Undocumented
Class Modulator No class docstring; 0/1 instance variable, 1/18 method documented
Class Sequencer No class docstring; 0/2 instance variable, 1/12 method documented
Class Synth Synth represents a FluidSynth synthesizer
Function cfunc Build and apply a ctypes prototype complete with parameter flags
Function find_libfluidsynth macOS X64: * 'fluidsynth' was found at /usr/local/opt/fluid-synth/lib/libfluidsynth.dylib. macOS ARM64: * 'fluidsynth' was found at /opt/homebrew/opt/fluid-synth/lib/libfluidsynth.dylib. Ubuntu X86: * 'fluidsynth' was found at libfluidsynth...
Function fluid_synth_write_s16_stereo Return generated samples in stereo 16-bit format
Function raw_audio_string Return a string of bytes to send to soundcard
Constant FLUID_FAILED Undocumented
Constant FLUID_MOD_BIPOLAR Undocumented
Constant FLUID_MOD_CC Undocumented
Constant FLUID_MOD_CHANNELPRESSURE Undocumented
Constant FLUID_MOD_CONCAVE Undocumented
Constant FLUID_MOD_CONVEX Undocumented
Constant FLUID_MOD_GC Undocumented
Constant FLUID_MOD_KEY Undocumented
Constant FLUID_MOD_KEYPRESSURE Undocumented
Constant FLUID_MOD_LINEAR Undocumented
Constant FLUID_MOD_NEGATIVE Undocumented
Constant FLUID_MOD_NONE Undocumented
Constant FLUID_MOD_PITCHWHEEL Undocumented
Constant FLUID_MOD_PITCHWHEELSENS Undocumented
Constant FLUID_MOD_POSITIVE Undocumented
Constant FLUID_MOD_SIN Undocumented
Constant FLUID_MOD_SWITCH Undocumented
Constant FLUID_MOD_TRANSFORM_ABS Undocumented
Constant FLUID_MOD_TRANSFORM_LINEAR Undocumented
Constant FLUID_MOD_UNIPOLAR Undocumented
Constant FLUID_MOD_VELOCITY Undocumented
Constant FLUID_OK Undocumented
Constant FLUID_PLAYER_DONE Undocumented
Constant FLUID_PLAYER_PLAYING Undocumented
Constant FLUID_PLAYER_READY Undocumented
Constant FLUID_PLAYER_STOPPING Undocumented
Constant FLUID_PLAYER_TEMPO_EXTERNAL_BPM Undocumented
Constant FLUID_PLAYER_TEMPO_EXTERNAL_MIDI Undocumented
Constant FLUID_PLAYER_TEMPO_INTERNAL Undocumented
Constant FLUIDSETTING_EXISTS Undocumented
Variable api_version Undocumented
Variable delete_fluid_audio_driver Undocumented
Variable delete_fluid_event Undocumented
Variable delete_fluid_file_renderer Undocumented
Variable delete_fluid_midi_driver Undocumented
Variable delete_fluid_midi_router_rule Undocumented
Variable delete_fluid_mod Undocumented
Variable delete_fluid_player Undocumented
Variable delete_fluid_sequencer Undocumented
Variable delete_fluid_settings Undocumented
Variable delete_fluid_synth Undocumented
Variable fluid_event_note Undocumented
Variable fluid_event_noteoff Undocumented
Variable fluid_event_noteon Undocumented
Variable fluid_event_set_dest Undocumented
Variable fluid_event_set_source Undocumented
Variable fluid_event_timer Undocumented
Variable fluid_file_renderer_process_block Undocumented
Variable fluid_midi_event_get_channel Undocumented
Variable fluid_midi_event_get_control Undocumented
Variable fluid_midi_event_get_key Undocumented
Variable fluid_midi_event_get_program Undocumented
Variable fluid_midi_event_get_type Undocumented
Variable fluid_midi_event_get_value Undocumented
Variable fluid_midi_event_get_velocity Undocumented
Variable fluid_midi_router_add_rule Undocumented
Variable fluid_midi_router_clear_rules Undocumented
Variable fluid_midi_router_handle_midi_event Undocumented
Variable fluid_midi_router_rule_set_chan Undocumented
Variable fluid_midi_router_rule_set_param1 Undocumented
Variable fluid_midi_router_rule_set_param2 Undocumented
Variable fluid_midi_router_set_default_rules Undocumented
Variable fluid_mod_clone Undocumented
Variable fluid_mod_get_amount Undocumented
Variable fluid_mod_get_dest Undocumented
Variable fluid_mod_get_flags1 Undocumented
Variable fluid_mod_get_flags2 Undocumented
Variable fluid_mod_get_source1 Undocumented
Variable fluid_mod_get_source2 Undocumented
Variable fluid_mod_get_transform Undocumented
Variable fluid_mod_has_dest Undocumented
Variable fluid_mod_has_source Undocumented
Variable fluid_mod_set_amount Undocumented
Variable fluid_mod_set_dest Undocumented
Variable fluid_mod_set_source1 Undocumented
Variable fluid_mod_set_source2 Undocumented
Variable fluid_mod_set_transform Undocumented
Variable fluid_mod_sizeof Undocumented
Variable fluid_mod_test_identity Undocumented
Variable fluid_player_add Undocumented
Variable fluid_player_get_status Undocumented
Variable fluid_player_join Undocumented
Variable fluid_player_play Undocumented
Variable fluid_player_seek Undocumented
Variable fluid_player_set_playback_callback Undocumented
Variable fluid_player_set_tempo Undocumented
Variable fluid_player_stop Undocumented
Variable fluid_preset_get_name Undocumented
Variable fluid_sequencer_get_tick Undocumented
Variable fluid_sequencer_get_time_scale Undocumented
Variable fluid_sequencer_process Undocumented
Variable fluid_sequencer_register_client Undocumented
Variable fluid_sequencer_register_fluidsynth Undocumented
Variable fluid_sequencer_send_at Undocumented
Variable fluid_sequencer_set_time_scale Undocumented
Variable fluid_settings_copystr Undocumented
Variable fluid_settings_getint Undocumented
Variable fluid_settings_getnum Undocumented
Variable fluid_settings_setint Undocumented
Variable fluid_settings_setnum Undocumented
Variable fluid_settings_setstr Undocumented
Variable fluid_sfont_get_preset Undocumented
Variable fluid_synth_activate_key_tuning Undocumented
Variable fluid_synth_activate_tuning Undocumented
Variable fluid_synth_all_notes_off Undocumented
Variable fluid_synth_all_sounds_off Undocumented
Variable fluid_synth_bank_select Undocumented
Variable fluid_synth_cc Undocumented
Variable fluid_synth_deactivate_tuning Undocumented
Variable fluid_synth_get_cc Undocumented
Variable fluid_synth_get_channel_info Undocumented
Variable fluid_synth_get_chorus_depth Undocumented
Variable fluid_synth_get_chorus_depth_ms Undocumented
Variable fluid_synth_get_chorus_level Undocumented
Variable fluid_synth_get_chorus_nr Undocumented
Variable fluid_synth_get_chorus_speed Undocumented
Variable fluid_synth_get_chorus_speed_Hz Undocumented
Variable fluid_synth_get_chorus_type Undocumented
Variable fluid_synth_get_program Undocumented
Variable fluid_synth_get_reverb_damp Undocumented
Variable fluid_synth_get_reverb_level Undocumented
Variable fluid_synth_get_reverb_roomsize Undocumented
Variable fluid_synth_get_reverb_width Undocumented
Variable fluid_synth_get_sfont_by_id Undocumented
Variable fluid_synth_handle_midi_event Undocumented
Variable fluid_synth_noteoff Undocumented
Variable fluid_synth_noteon Undocumented
Variable fluid_synth_pitch_bend Undocumented
Variable fluid_synth_program_change Undocumented
Variable fluid_synth_program_reset Undocumented
Variable fluid_synth_program_select Undocumented
Variable fluid_synth_set_chorus Undocumented
Variable fluid_synth_set_chorus_depth Undocumented
Variable fluid_synth_set_chorus_full Undocumented
Variable fluid_synth_set_chorus_level Undocumented
Variable fluid_synth_set_chorus_nr Undocumented
Variable fluid_synth_set_chorus_speed Undocumented
Variable fluid_synth_set_chorus_type Undocumented
Variable fluid_synth_set_midi_router Undocumented
Variable fluid_synth_set_reverb Undocumented
Variable fluid_synth_set_reverb_damp Undocumented
Variable fluid_synth_set_reverb_full Undocumented
Variable fluid_synth_set_reverb_level Undocumented
Variable fluid_synth_set_reverb_roomsize Undocumented
Variable fluid_synth_set_reverb_width Undocumented
Variable fluid_synth_sfload Undocumented
Variable fluid_synth_sfont_select Undocumented
Variable fluid_synth_sfunload Undocumented
Variable fluid_synth_system_reset Undocumented
Variable fluid_synth_tuning_dump Undocumented
Variable fluid_synth_unset_program Undocumented
Variable fluid_synth_write_s16 Undocumented
Variable fluid_version Undocumented
Variable lib Undocumented
Variable majver Undocumented
Variable new_fluid_audio_driver Undocumented
Variable new_fluid_cmd_handler Undocumented
Variable new_fluid_event Undocumented
Variable new_fluid_file_renderer Undocumented
Variable new_fluid_midi_driver Undocumented
Variable new_fluid_midi_router Undocumented
Variable new_fluid_midi_router_rule Undocumented
Variable new_fluid_mod Undocumented
Variable new_fluid_player Undocumented
Variable new_fluid_sequencer2 Undocumented
Variable new_fluid_settings Undocumented
Variable new_fluid_synth Undocumented
Variable _fl Undocumented
def cfunc(name, result, *args): (source)

Build and apply a ctypes prototype complete with parameter flags

def find_libfluidsynth(debug_print: bool = False) -> str: (source)

macOS X64: * 'fluidsynth' was found at /usr/local/opt/fluid-synth/lib/libfluidsynth.dylib. macOS ARM64: * 'fluidsynth' was found at /opt/homebrew/opt/fluid-synth/lib/libfluidsynth.dylib. Ubuntu X86: * 'fluidsynth' was found at libfluidsynth.so.3. Windows X86: * 'libfluidsynth-3' was found at C:toolsfluidsynthbinlibfluidsynth-3.dll. --or-- * 'fluidsynth-3' was found as C:toolsfluidsynthbinfluidsynth-3.dll. >= v2.4.5

def fluid_synth_write_s16_stereo(synth, len): (source)

Return generated samples in stereo 16-bit format

Return value is a Numpy array of samples.

def raw_audio_string(data): (source)

Return a string of bytes to send to soundcard

Input is a numpy array of samples. Default output format is 16-bit signed (other formats not currently supported).

FLUID_FAILED: int = (source)

Undocumented

Value
-1
FLUID_MOD_BIPOLAR: int = (source)

Undocumented

Value
2
FLUID_MOD_CC: int = (source)

Undocumented

Value
16
FLUID_MOD_CHANNELPRESSURE: int = (source)

Undocumented

Value
13
FLUID_MOD_CONCAVE: int = (source)

Undocumented

Value
4
FLUID_MOD_CONVEX: int = (source)

Undocumented

Value
8
FLUID_MOD_GC: int = (source)

Undocumented

Value
0
FLUID_MOD_KEY: int = (source)

Undocumented

Value
3
FLUID_MOD_KEYPRESSURE: int = (source)

Undocumented

Value
10
FLUID_MOD_LINEAR: int = (source)

Undocumented

Value
0
FLUID_MOD_NEGATIVE: int = (source)

Undocumented

Value
1
FLUID_MOD_NONE: int = (source)

Undocumented

Value
0
FLUID_MOD_PITCHWHEEL: int = (source)

Undocumented

Value
14
FLUID_MOD_PITCHWHEELSENS: int = (source)

Undocumented

Value
16
FLUID_MOD_POSITIVE: int = (source)

Undocumented

Value
0
FLUID_MOD_SIN: int = (source)

Undocumented

Value
128
FLUID_MOD_SWITCH: int = (source)

Undocumented

Value
12
FLUID_MOD_TRANSFORM_ABS: int = (source)

Undocumented

Value
2
FLUID_MOD_TRANSFORM_LINEAR: int = (source)

Undocumented

Value
0
FLUID_MOD_UNIPOLAR: int = (source)

Undocumented

Value
0
FLUID_MOD_VELOCITY: int = (source)

Undocumented

Value
2
FLUID_OK: int = (source)

Undocumented

Value
0
FLUID_PLAYER_DONE: int = (source)

Undocumented

Value
3
FLUID_PLAYER_PLAYING: int = (source)

Undocumented

Value
1
FLUID_PLAYER_READY: int = (source)

Undocumented

Value
0
FLUID_PLAYER_STOPPING: int = (source)

Undocumented

Value
2
FLUID_PLAYER_TEMPO_EXTERNAL_BPM: int = (source)

Undocumented

Value
1
FLUID_PLAYER_TEMPO_EXTERNAL_MIDI: int = (source)

Undocumented

Value
2
FLUID_PLAYER_TEMPO_INTERNAL: int = (source)

Undocumented

Value
0
FLUIDSETTING_EXISTS = (source)

Undocumented

Value
FLUID_OK if majver.value > 1 else 1
api_version: str = (source)

Undocumented

delete_fluid_audio_driver = (source)

Undocumented

delete_fluid_event = (source)

Undocumented

delete_fluid_file_renderer = (source)

Undocumented

delete_fluid_midi_driver = (source)

Undocumented

delete_fluid_midi_router_rule = (source)

Undocumented

delete_fluid_mod = (source)

Undocumented

delete_fluid_player = (source)

Undocumented

delete_fluid_sequencer = (source)

Undocumented

delete_fluid_settings = (source)

Undocumented

delete_fluid_synth = (source)

Undocumented

fluid_event_note = (source)

Undocumented

fluid_event_noteoff = (source)

Undocumented

fluid_event_noteon = (source)

Undocumented

fluid_event_set_dest = (source)

Undocumented

fluid_event_set_source = (source)

Undocumented

fluid_event_timer = (source)

Undocumented

fluid_file_renderer_process_block = (source)

Undocumented

fluid_midi_event_get_channel = (source)

Undocumented

fluid_midi_event_get_control = (source)

Undocumented

fluid_midi_event_get_key = (source)

Undocumented

fluid_midi_event_get_program = (source)

Undocumented

fluid_midi_event_get_type = (source)

Undocumented

fluid_midi_event_get_value = (source)

Undocumented

fluid_midi_event_get_velocity = (source)

Undocumented

fluid_midi_router_add_rule = (source)

Undocumented

fluid_midi_router_clear_rules = (source)

Undocumented

fluid_midi_router_handle_midi_event = (source)

Undocumented

fluid_midi_router_rule_set_chan = (source)

Undocumented

fluid_midi_router_rule_set_param1 = (source)

Undocumented

fluid_midi_router_rule_set_param2 = (source)

Undocumented

fluid_midi_router_set_default_rules = (source)

Undocumented

fluid_mod_clone = (source)

Undocumented

fluid_mod_get_amount = (source)

Undocumented

fluid_mod_get_dest = (source)

Undocumented

fluid_mod_get_flags1 = (source)

Undocumented

fluid_mod_get_flags2 = (source)

Undocumented

fluid_mod_get_source1 = (source)

Undocumented

fluid_mod_get_source2 = (source)

Undocumented

fluid_mod_get_transform = (source)

Undocumented

fluid_mod_has_dest = (source)

Undocumented

fluid_mod_has_source = (source)

Undocumented

fluid_mod_set_amount = (source)

Undocumented

fluid_mod_set_dest = (source)

Undocumented

fluid_mod_set_source1 = (source)

Undocumented

fluid_mod_set_source2 = (source)

Undocumented

fluid_mod_set_transform = (source)

Undocumented

fluid_mod_sizeof = (source)

Undocumented

fluid_mod_test_identity = (source)

Undocumented

fluid_player_add = (source)

Undocumented

fluid_player_get_status = (source)

Undocumented

fluid_player_join = (source)

Undocumented

fluid_player_play = (source)

Undocumented

fluid_player_seek = (source)

Undocumented

fluid_player_set_playback_callback = (source)

Undocumented

fluid_player_set_tempo = (source)

Undocumented

fluid_player_stop = (source)

Undocumented

fluid_preset_get_name = (source)

Undocumented

fluid_sequencer_get_tick = (source)

Undocumented

fluid_sequencer_get_time_scale = (source)

Undocumented

fluid_sequencer_process = (source)

Undocumented

fluid_sequencer_register_client = (source)

Undocumented

fluid_sequencer_register_fluidsynth = (source)

Undocumented

fluid_sequencer_send_at = (source)

Undocumented

fluid_sequencer_set_time_scale = (source)

Undocumented

fluid_settings_copystr = (source)

Undocumented

fluid_settings_getint = (source)

Undocumented

fluid_settings_getnum = (source)

Undocumented

fluid_settings_setint = (source)

Undocumented

fluid_settings_setnum = (source)

Undocumented

fluid_settings_setstr = (source)

Undocumented

fluid_sfont_get_preset = (source)

Undocumented

fluid_synth_activate_key_tuning = (source)

Undocumented

fluid_synth_activate_tuning = (source)

Undocumented

fluid_synth_all_notes_off = (source)

Undocumented

fluid_synth_all_sounds_off = (source)

Undocumented

fluid_synth_bank_select = (source)

Undocumented

fluid_synth_cc = (source)

Undocumented

fluid_synth_deactivate_tuning = (source)

Undocumented

fluid_synth_get_cc = (source)

Undocumented

fluid_synth_get_channel_info = (source)

Undocumented

fluid_synth_get_chorus_depth = (source)

Undocumented

fluid_synth_get_chorus_depth_ms = (source)

Undocumented

fluid_synth_get_chorus_level = (source)

Undocumented

fluid_synth_get_chorus_nr = (source)

Undocumented

fluid_synth_get_chorus_speed = (source)

Undocumented

fluid_synth_get_chorus_speed_Hz = (source)

Undocumented

fluid_synth_get_chorus_type = (source)

Undocumented

fluid_synth_get_program = (source)

Undocumented

fluid_synth_get_reverb_damp = (source)

Undocumented

fluid_synth_get_reverb_level = (source)

Undocumented

fluid_synth_get_reverb_roomsize = (source)

Undocumented

fluid_synth_get_reverb_width = (source)

Undocumented

fluid_synth_get_sfont_by_id = (source)

Undocumented

fluid_synth_handle_midi_event = (source)

Undocumented

fluid_synth_noteoff = (source)

Undocumented

fluid_synth_noteon = (source)

Undocumented

fluid_synth_pitch_bend = (source)

Undocumented

fluid_synth_program_change = (source)

Undocumented

fluid_synth_program_reset = (source)

Undocumented

fluid_synth_program_select = (source)

Undocumented

fluid_synth_set_chorus = (source)

Undocumented

fluid_synth_set_chorus_depth = (source)

Undocumented

fluid_synth_set_chorus_full = (source)

Undocumented

fluid_synth_set_chorus_level = (source)

Undocumented

fluid_synth_set_chorus_nr = (source)

Undocumented

fluid_synth_set_chorus_speed = (source)

Undocumented

fluid_synth_set_chorus_type = (source)

Undocumented

fluid_synth_set_midi_router = (source)

Undocumented

fluid_synth_set_reverb = (source)

Undocumented

fluid_synth_set_reverb_damp = (source)

Undocumented

fluid_synth_set_reverb_full = (source)

Undocumented

fluid_synth_set_reverb_level = (source)

Undocumented

fluid_synth_set_reverb_roomsize = (source)

Undocumented

fluid_synth_set_reverb_width = (source)

Undocumented

fluid_synth_sfload = (source)

Undocumented

fluid_synth_sfont_select = (source)

Undocumented

fluid_synth_sfunload = (source)

Undocumented

fluid_synth_system_reset = (source)

Undocumented

fluid_synth_tuning_dump = (source)

Undocumented

fluid_synth_unset_program = (source)

Undocumented

fluid_synth_write_s16 = (source)

Undocumented

fluid_version = (source)

Undocumented

Undocumented

Undocumented

new_fluid_audio_driver = (source)

Undocumented

new_fluid_cmd_handler = (source)

Undocumented

new_fluid_event = (source)

Undocumented

new_fluid_file_renderer = (source)

Undocumented

new_fluid_midi_driver = (source)

Undocumented

new_fluid_midi_router = (source)

Undocumented

new_fluid_midi_router_rule = (source)

Undocumented

new_fluid_mod = (source)

Undocumented

new_fluid_player = (source)

Undocumented

new_fluid_sequencer2 = (source)

Undocumented

new_fluid_settings = (source)

Undocumented

new_fluid_synth = (source)

Undocumented

Undocumented