There is a python package pyfluidsynth that has ctypes bindings that directly use the FluidSynth API, rather than using subprocess to talk to the clunky FluidSynth shell. However, this library seems like it's aimed at letting people use FluidSynth as a MIDI file player from python, and is missing some bindings needed for live performance (like setting up the MIDI driver). So, I started working on adding these in my own python script.

The script for the JamPi now runs on startup using a systemd script, which seems to get things up and running considerably faster. Controlling FluidSynth with ctypes is much more versatile than talking to the shell. My config files are starting to seem like a little declarative language for describing patches. Right now they just set the soundfonts, router rules, and chorus/reverb settings for each patch, but they could do much more, and do it in a way that's portable and reusable between different files, or "banks".

What makes this project interesting is that it's starting to feel like creating a generalized platform for building a synthesizer interface, which I can customize to give me the best playing/creating experience.