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


I actually prefer to put the
synth.gainsetting in SquishBox/squishboxconf.yaml - that way it's the same for all my bank files.