some fixes

This commit is contained in:
Volker Fischer 2019-09-22 11:51:43 +02:00
parent 6ba18141a5
commit 25d06b7e82

View File

@ -39,18 +39,19 @@ fi
# optional: FluidSynth synthesizer # optional: FluidSynth synthesizer
if [ "$1" == "opt" ]; then if [ "$1" == "opt" ]; then
if [ -d "fluidsynth-*" ]; 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." 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 else
wget https://github.com/FluidSynth/fluidsynth/archive/v2.0.6.tar.gz -O fluidsynth.tar.gz 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 tar -xzf fluidsynth.tar.gz
rm fluidsynth.tar.gz rm fluidsynth.tar.gz
cd fluidsynth-* mv fluidsynth-* fluidsynth
cd fluidsynth
mkdir build mkdir build
cd build cd build
cmake .. cmake ..
make -j${NCORES} make -j${NCORES}
wget https://data.musical-artifacts.com/hammersound/claudio_piano.sf2
cd ../.. cd ../..
fi fi
fi fi
@ -59,31 +60,31 @@ fi
cd .. cd ..
qmake "CONFIG+=opus_shared_lib" "INCLUDEPATH+=distributions/${OPUS}/include" "QMAKE_LIBDIR+=distributions/${OPUS}/.libs" Jamulus.pro qmake "CONFIG+=opus_shared_lib" "INCLUDEPATH+=distributions/${OPUS}/include" "QMAKE_LIBDIR+=distributions/${OPUS}/.libs" Jamulus.pro
make -j${NCORES} make -j${NCORES}
cd distributions
# get first USB audio sound card device # get first USB audio sound card device
ADEVICE=$(aplay -l|grep "USB Audio"|head -1|cut -d' ' -f3) ADEVICE=$(aplay -l|grep "USB Audio"|head -1|cut -d' ' -f3)
echo "Using USB audio device: ${ADEVICE}" echo "Using USB audio device: ${ADEVICE}"
# start Jack2 and Jamulus in headless mode # start Jack2 and Jamulus in headless mode
cd ..
export LD_LIBRARY_PATH="distributions/${OPUS}/.libs:distributions/jack2/build:distributions/jack2/build/common" export LD_LIBRARY_PATH="distributions/${OPUS}/.libs:distributions/jack2/build:distributions/jack2/build/common"
PATH=$PATH:distributions/jack2/build/common PATH=$PATH:distributions/jack2/build/common
distributions/jack2/build/jackd -P70 -p16 -t2000 -d alsa -dhw:${ADEVICE} -p 128 -n 3 -r 48000 -s & 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 if [ "$1" == "opt" ]; then
./Jamulus -n -c jamulus.fischvolk.de &>/dev/null &
sleep 1 sleep 1
jack_disconnect system:capture_1 "Jamulus:input left" ./distributions/jack2/build/example-clients/jack_disconnect system:capture_1 "Jamulus:input left"
jack_disconnect system:capture_2 "Jamulus:input right" ./distributions/jack2/build/example-clients/jack_disconnect system:capture_2 "Jamulus:input right"
./fluidsynth-*/build/src/fluidsynth -s -i -a jack -g 1 claudio_piano.sf2 &>/dev/null & ./distributions/fluidsynth/build/src/fluidsynth -s -i -a jack -g 1 distributions/fluidsynth/claudio_piano.sf2 &>/dev/null &
sleep 3 sleep 3
jack_disconnect system:capture_1 "Jamulus:input left" ./distributions/jack2/build/example-clients/jack_disconnect system:capture_1 "Jamulus:input left"
jack_disconnect system:capture_2 "Jamulus:input right" ./distributions/jack2/build/example-clients/jack_disconnect system:capture_2 "Jamulus:input right"
jack_disconnect fluidsynth:left system:playback_1 ./distributions/jack2/build/example-clients/jack_disconnect fluidsynth:left system:playback_1
jack_disconnect fluidsynth:right system:playback_2 ./distributions/jack2/build/example-clients/jack_disconnect fluidsynth:right system:playback_2
jack_connect fluidsynth:left "Jamulus:input left" ./distributions/jack2/build/example-clients/jack_connect fluidsynth:left "Jamulus:input left"
jack_connect fluidsynth:right "Jamulus:input right" ./distributions/jack2/build/example-clients/jack_connect fluidsynth:right "Jamulus:input right"
aconnect 'USB-MIDI' 128 aconnect 'USB-MIDI' 128
else
./Jamulus -n -c jamulus.fischvolk.de
fi fi