A performance-oriented patch interface for FluidSynth. Fluidsynth is an open source software synthesizer that uses soundfonts - a freely-available and well-documented sound format. A patch is a collection of settings such as soundfont presets for each MIDI channel, control-change/sysex messages to send when the patch is selected, and midi router or effects settings. Groups of patches are stored in banks, which are saved as human-readable and -editable YAML files. This allows a musician to easily create complex combinations of synthesizer settings ahead of time and switch between them on the fly during a performance.
FluidPatcher should work on any operating system on which FluidSynth and Python can be installed. The patcher module controls FluidSynth and handles patches and banks, allowing you to create your own interfaces/implementations so your bank files can be portable and useful in different contexts (e.g. performing, editing, or recording). Several implementations are included:
- squishbox.py - runs the SquishBox, a Raspberry Pi synth with a 16x2 character LCD and two buttons in a guitar pedal, designed by Geek Funk Labs, or variants on it using a 20x4 character LCD, with GPIO or I2C interfaces
- headlesspi.py - runs on a Pi with no screen, keyboard, or extras and allows you to change patches and banks using pads/knobs on your MIDI keyboard/controller
- fluidpatcher.pyw - a cross-platform wxpython-based GUI that allows live editing of bank files, playing of patches, and browsing/playing soundfont presets; can also connect to an instance of squishbox.py or headlesspi.py to control it and edit/test banks.
Check the wiki for more information about using the scripts, bank/config file formats, the API, etc.
In addition, a player is provided to allow .wav, .mp3, and .ogg files to be played, either from the Pi or from a USB drive, either as single songs or as playlists:
- squishplayer.py - allows single songs or playlists to be played
- squishmaster.py - allows switching between squishbox and squishplayer
Requires Python 3. Installation of FluidSynth and needed Python modules varies a bit by system.
You can run a script that will query you for options, then install and configure FluidSynth and FluidPatcher for you by typing the following at a command line:
curl https://geekfunklabs.com/squishbox | bash
To see what the script does first, eliminate the final | bash
.
Run the setup program in the latest release of FluidPatcher.
sudo apt install git fluidsynth python3-pip python3-wxgtk4.0
sudo pip3 install oyaml mido python-rtmidi
git clone https://github.com/albedozero/fluidpatcher.git
ln -s /usr/share/sounds/sf2/FluidR3_GM.sf2 fluidpatcher/SquishBox/sf2/
brew install git fluidsynth python3-pip
sudo pip3 install oyaml mido python-rtmidi wxpython
git clone https://github.com/albedozero/fluidpatcher.git
ln -s /usr/share/sounds/sf2/FluidR3_GM.sf2 fluidpatcher/SquishBox/sf2/
* The package repositories on these systems may not provide the latest version of FluidSynth. If you want newer features, it can be compiled from source.
Bank files are stored in the SquishBox/banks directory. The example bank file includes comments to help explain the format and highlight some of the capabilities of patches. Soundfonts are stored in SquishBox/sf2. A few sample fonts are provided, and many more can be found on the internet or created/edited/tweaked with software such as Polyphone. Details on using the included scripts can be found in the Programs section of the wiki.
You can write your own python programs that will use your bank files and patches - the public API is described in the wiki. Here is a simple example:
import patcher
cfgfile = 'myconf.yaml'
bankfile = 'mybank.yaml'
p = patcher.Patcher(cfgfile)
p.load_bank(bankfile)
n = 0
while True:
p.select_patch(n)
print("Patch %d/%d: %s" % (n + 1, p.patches_count(), p.patch_name(n)))
n = int(input("select patch: ")) - 1