Skip to content

Instantly share code, notes, and snippets.

@henriquegogo
Last active February 15, 2022 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henriquegogo/5427798c6fe8e19d019b249b0ec302a5 to your computer and use it in GitHub Desktop.
Save henriquegogo/5427798c6fe8e19d019b249b0ec302a5 to your computer and use it in GitHub Desktop.
Autoload fluidsynth. Copy to .bashrc
#!/bin/bash
# Add these lines in .bashrc and set Raspberry Pi to auto login
if [ ! -f /tmp/fluidsynth-bootloaded ]; then
touch /tmp/fluidsynth-bootloaded
killall fluidsynth
fluidsynth -a alsa -g 1 /usr/share/sounds/sf2/default-GM.sf2 -o midi.autoconnect=1 -c 4
fi
#!/bin/bash
# Use this script to load soundfonts manually
select value in `ls -A /usr/share/sounds/sf2/`
do
killall fluidsynth
fluidsynth -a alsa -g 0.8 /usr/share/sounds/sf2/$value -o midi.autoconnect=1 -c 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment