Synth represents a FluidSynth synthesizer
| Method | __init__ |
Create new synthesizer object to control sound generation |
| Method | all |
Turn off all notes on a channel (release all keys) |
| Method | all |
Turn off all sounds on a channel (equivalent to mute) |
| Method | bank |
Choose a bank |
| Method | cc |
Send control change value |
| Method | channel |
get soundfont, bank, prog, preset name of channel |
| Method | delete |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | get |
Generate audio samples |
| Method | get |
get current value of an arbitrary synth setting |
| Method | midi2audio |
Convert a midi file to an audio file |
| Method | midi |
Undocumented |
| Method | midi |
Undocumented |
| Method | midi |
Undocumented |
| Method | midi |
Undocumented |
| Method | midi |
Undocumented |
| Method | midi |
Undocumented |
| Method | midi |
Undocumented |
| Method | noteoff |
Stop a note |
| Method | noteon |
Play a note |
| Method | pitch |
Adjust pitch of a playing channel by small amounts |
| Method | play |
Undocumented |
| Method | play |
Undocumented |
| Method | player |
Undocumented |
| Method | program |
Change the program |
| Method | program |
get active soundfont, bank, prog on a channel |
| Method | program |
Reset the programs on all channels |
| Method | program |
Select a program |
| Method | program |
Set the preset of a MIDI channel to an unassigned state |
| Method | router |
types are [note|cc|prog|pbend|cpress|kpress] |
| Method | router |
Undocumented |
| Method | router |
Undocumented |
| Method | router |
Undocumented |
| Method | router |
Undocumented |
| Method | router |
Undocumented |
| Method | router |
Undocumented |
| Method | set |
nr Chorus voice count (0-99, CPU time consumption proportional to this value) level Chorus level (0.0-10.0) speed Chorus speed in Hz (0.29-5.0) depth_ms Chorus depth (max value depends on synth sample rate, 0... |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
roomsize Reverb room size value (0.0-1.0) damping Reverb damping value (0.0-1.0) width Reverb width value (0.0-100.0) level Reverb level value (0.0-1.0) |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | setting |
change an arbitrary synth setting, type-smart |
| Method | sfload |
Load SoundFont and return its ID |
| Method | sfont |
Choose a SoundFont |
| Method | sfpreset |
Return name of a soundfont preset |
| Method | sfunload |
Unload a SoundFont and free memory it used |
| Method | start |
Start audio output driver in separate background thread |
| Method | system |
Stop all notes and reset all programs |
| Method | tuning |
Get tuning information for given bank and preset |
| Instance Variable | audio |
Undocumented |
| Instance Variable | custom |
Undocumented |
| Instance Variable | midi |
Undocumented |
| Instance Variable | player |
Undocumented |
| Instance Variable | router |
Undocumented |
| Instance Variable | settings |
Undocumented |
| Instance Variable | synth |
Undocumented |
Create new synthesizer object to control sound generation
Optional keyword arguments: gain : scale factor for audio output, default is 0.2 lower values are quieter, allow more simultaneous notes samplerate : output samplerate in Hz, default is 44100 Hz added capability for passing arbitrary fluid settings using args
Send control change value
The controls that are recognized are dependent on the SoundFont. Values are always 0 to 127. Typical controls include:
1 : vibrato 7 : volume 10 : pan (left to right) 11 : expression (soft to loud) 64 : sustain 91 : reverb 93 : chorus
Generate audio samples
The return value will be a NumPy array containing the given length of audio samples. If the synth is set to stereo output (the default) the array will be size 2 * len.
Adjust pitch of a playing channel by small amounts
A pitch bend value of 0 is no pitch change from default. A value of -2048 is 1 semitone down. A value of 2048 is 1 semitone up. Maximum values are -8192 to +8191 (transposing by 4 semitones).
nr Chorus voice count (0-99, CPU time consumption proportional to this value) level Chorus level (0.0-10.0) speed Chorus speed in Hz (0.29-5.0) depth_ms Chorus depth (max value depends on synth sample rate, 0.0-21.0 is safe for sample rate values up to 96KHz) type Chorus waveform type (0=sine, 1=triangle)
roomsize Reverb room size value (0.0-1.0) damping Reverb damping value (0.0-1.0) width Reverb width value (0.0-100.0) level Reverb level value (0.0-1.0)
Start audio output driver in separate background thread
Call this function any time after creating the Synth object. If you don't call this function, use get_samples() to generate samples.
Optional keyword argument: driver : which audio driver to use for output device : the device to use for audio output midi_driver : the midi driver to use for communicating with midi devices see http://www.fluidsynth.org/api/fluidsettings.xml for allowed values and defaults by platform