A complete setup with many options can be performed by running the script at git.io/squishbox with the command
curl -L git.io/squishbox | bash
To perform the minimal steps to set up, first install the required software: Connect to your Pi via ssh or plug in a keyboard and monitor and type in the following commands to install the required software:
sudo apt install git python3-pip libfluidsynth1 fluid-soundfont-gm
sudo pip3 install oyaml RPLCD RPi.GPIO
git clone https://github.com/albedozero/fluidpatcher.git
cp -r fluidpatcher/* /home/pi
ln -s /usr/share/sounds/sf2/FluidR3_GM.sf2 SquishBox/sf2/FluidR3_GM.sf2
Edit the headlesspi.py script and modify the values of PATCH_SELECT_CHANNEL, DEC_CC, and INC_CC to correspond to buttons on your MIDI controller - or reprogram two of the buttons on your controller to send momentary CC messages 27 and 28. If you instead want to select the patch using a knob/slider, uncomment the line containing SELECT_CC and modify the value as needed.
Edit the file /etc/rc.local as root (e.g. sudo vi /etc/rc.local
) and add the following above the exit 0
line:
sudo python3 /home/pi/headlesspi.py &
Finally, run alsamixer
and make sure your volume is turned up. Now, unplug the monitor and keyboard (if using), connect your headphones and MIDI controller, and reboot!
If you want to use a USB sound card instead of the Raspberry Pi's headphone jack:
Edit /boot/config.txt and comment (#) out the following line:
dtparam=audio=on
Edit Squishbox/squishboxconf.yaml and add the following line under the fluidsettings:
line:
audio.alsa.device: hw:0
Hi, I'm really enjoying your project. Thanks for the work you have done on this, it is exactly what I am looking for.
I notice the volume is very low through my speaker, is there a way to increase the gain in fluidsynth?
I have turned the gain up to maximum in the bank1.yaml file with:
fluidsettings: synth.gain: 1
however the overall gain is still very low.

I have also run alsamixer and increased the output to maximum.
I was trying a different process outlined here:
https://medium.com/@rreinold/how-to-use-a-raspberry-pi-3-to-turn-midi-piano-to-into-stand-alone-powered-piano-4aeb79e309ce
and they suggest to increase the fluidsynth gain using the following command:
fluidsynth --audio-driver=alsa --gain 5 /usr/share/sounds/sf2/FluidR3_GM.sf2
Is there a way to incorportate tthe equivalent of his approach into your program?
I'd welcome any thoughts on this.