Download Latest Version FluidPatcher 0.9.1 source code.zip (3.9 MB)
Email in envelope

Get an email when there's a new version of FluidPatcher

Home
Name Modified Size InfoDownloads / Week
v0.9.1 2024-06-27
v0.8.5 2023-11-25
v0.8.4 2023-11-24
v0.8.3 2023-11-23
v0.8.2 2023-11-17
v0.8.1 2023-11-17
v0.7.15 2023-03-12
v0.7.14 2023-01-30
v0.7.13 2022-12-24
v0.7.12 2022-08-09
v0.7.11 2022-08-01
v0.7.10 2022-07-28
v0.7.9 2022-07-12
v0.7.8 2022-07-11
v0.7.7 2022-06-11
v0.7.6 2022-05-30
v0.7.5 2022-05-26
v0.7,4 2022-05-18
v0.7.4 2022-05-17
v0.7.3 2022-05-12
v0.7.2 2022-04-24
v0.7.1 2022-04-11
v0.7 2022-04-11
v0.6.2 2022-02-05
v0.6 2022-01-28
v0.5.10 2022-01-02
v0.5.9 2021-12-31
v0.5.7 2021-11-27
v0.5.6 2021-11-25
v0.5.4 2021-11-20
v0.5.3 2021-11-17
v0.5.2 2021-10-30
v0.5.1 2021-10-11
v0.5 2021-10-02
v0.4.2 2021-04-16
v0.4.1 2021-03-28
v0.4 2021-03-09
v0.3.5 2021-02-17
v0.3.4 2021-02-06
v0.3.3 2021-01-14
v0.3.1 2020-12-21
v0.3 2020-12-18
v0.2 2020-08-19
README.md 2020-08-05 6.0 kB
Totals: 44 Items   6.0 kB 0

FluidPatcher

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 creates a Python wrapper around FluidSynth's C functions and provides an API to handle patches and banks, load soundfonts, change FluidSynth settings, etc. This repository includes the following implementations of FluidPatcher: - squishbox.py - a front-end designed to work on a Raspberry Pi with a 16x2 character LCD and two buttons, like the SquishBox designed by Geek Funk Labs - headlesspi.py - a simple implementation that can run at startup on a bare-bones Raspberry Pi with no screen or keyboard - wxfluidpatcher.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.

Installation

Download and install Python 3. FluidPatcher is not designed to be backwards-compatible with Python 2 (although it will probably work with minor tweaks). Some systems (e.g. Raspberry Pi OS), already have Python 2 installed, so be aware commands may be modified to differentiate them (e.g. python -> python3 and pip -> pip3). Then, use pip to install additional needed Python packages. Finally, obtain FluidSynth. You can download packages for most systems. On Windows you can download a release FluidPatcher bundled with a precompiled binary of FluidSynth from GitHub or SourceForge. If you want the latest and greatest Fluidsynth, it's also fairly easy to compile from source code.

Quick Install by System

Windows

Run the setup program in the release of FluidPatcher. Install Python 3 - pip is included with most distributions. Enter the following on a command line to install Python modules:

pip install oyaml wxpython mido python-rtmidi

Linux

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
cp -r fluidpatcher/* /home/pi

On a Raspberry Pi, add sudo pip3 install RPLCD RPi.GPIO.

Mac OS X

brew install fluidsynth git python3-pip
sudo pip3 install oyaml mido python-rtmidi wxpython
git clone https://github.com/albedozero/fluidpatcher.git

Usage

Double click the wxfluidpatcher.py script or the FluidPatcher shortcut created by the installer. FluidSynth must be in your path or in the same directory as FluidPatcher. The patcherconf.yaml config file contains system-wide settings.

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 the excellent Polyphone. The included ModWaves.sf2 soundfont demonstrates using modulators in a soundfont to expose FluidSynth's performance capabilities. In this case, control changes (CC) 70 and 74 are mapped to the filter's cutoff and resonance, allowing these to be controlled dynamically with FluidPatcher.

Example

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 = 'patcherconf.yaml'
p = patcher.Patcher(cfgfile)
p.load_bank()

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

First, FluidPatcher is started by creating a Patcher instance with a config file as its argument, describing where bank files and soundfonts are stored, the name of the first bank file to load, and what settings to pass to FluidSynth on startup. This starts FluidSynth in a separate thread. When load_bank is called with no arguments, it loads the last bank used. The function select_patch will accept a number or the patch name. Most recent versions of FluidSynth will automatically connect to any attached MIDI input devices, so playing notes on an attached controller will make sounds according to the selected patch from the loaded bank file.

Source: README.md, updated 2020-08-05