diff --git a/.gitignore b/.gitignore index 14906e0d..ca928881 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ Jamulus.app/ .DS_Store distributions/opus* distributions/jack2 +distributions/claudio_piano.sf2 +distributions/fluidsynth* diff --git a/distributions/raspijamulus.sh b/distributions/raspijamulus.sh index b3c632fc..13aaba7e 100755 --- a/distributions/raspijamulus.sh +++ b/distributions/raspijamulus.sh @@ -37,6 +37,24 @@ else cd .. fi +# optional: FluidSynth synthesizer +if [ "$1" == "opt" ]; then + if [ -d "fluidsynth-*" ]; then + echo "The Fluidsynth directory is present, we assume it is compiled and ready to use. If not, delete the fluidsynth directory and call this script again." + else + wget https://github.com/FluidSynth/fluidsynth/archive/v2.0.6.tar.gz -O fluidsynth.tar.gz + wget https://data.musical-artifacts.com/hammersound/claudio_piano.sf2 + tar -xzf fluidsynth.tar.gz + rm fluidsynth.tar.gz + cd fluidsynth-* + mkdir build + cd build + cmake .. + make -j${NCORES} + cd ../.. + fi +fi + # compile Jamulus with external Opus library cd .. qmake "CONFIG+=opus_shared_lib" "INCLUDEPATH+=distributions/${OPUS}/include" "QMAKE_LIBDIR+=distributions/${OPUS}/.libs" Jamulus.pro @@ -54,3 +72,18 @@ PATH=$PATH:distributions/jack2/build/common distributions/jack2/build/jackd -P70 -p16 -t2000 -d alsa -dhw:${ADEVICE} -p 128 -n 3 -r 48000 -s & ./Jamulus -n -c jamulus.fischvolk.de +if [ "$1" == "opt" ]; then + sleep 1 + jack_disconnect system:capture_1 "Jamulus:input left" + jack_disconnect system:capture_2 "Jamulus:input right" + ./fluidsynth-*/build/src/fluidsynth -s -i -a jack -g 1 claudio_piano.sf2 &>/dev/null & + sleep 3 + jack_disconnect system:capture_1 "Jamulus:input left" + jack_disconnect system:capture_2 "Jamulus:input right" + jack_disconnect fluidsynth:left system:playback_1 + jack_disconnect fluidsynth:right system:playback_2 + jack_connect fluidsynth:left "Jamulus:input left" + jack_connect fluidsynth:right "Jamulus:input right" + aconnect 'USB-MIDI' 128 +fi +