Skip to content

Instantly share code, notes, and snippets.

@monkut
Created January 4, 2021 05:09

Revisions

  1. monkut created this gist Jan 4, 2021.
    19 changes: 19 additions & 0 deletions autostartsynth.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #! /bin/sh
    # rasbian
    # add the following line to /etc/rc.local above the "exit 0" line to start on boot
    # /home/pi/autostartsynth.sh &

    killall fluidsynth

    # set sound
    export DESIRED_SOUNDFONT=/usr/share/sounds/sf2/FluidR3_GM.sf2
    # start fluidsynth with desired sound
    fluidsynth -si -p "fluid" --audio-driver=alsa --gain 5 ${DESIRED_SOUNDFONT} &
    sleep 10
    # auto-connect midi
    python /home/pi/scripts/connectmidicontroller.py