I use Ubuntu Studio - a creative and live-media centered version of Ubuntu - to run all of my rigs: a home studio, a hybrid local and remote meeting with a good recording to watch later, a streaming church service, and projection in a different church.
A free and open operating system for creative people.
ubuntustudio.org
UStudio has JACK and a TON of other things preinstalled, so all I had to do was put them together. For the meeting rig, there's enough going on that I have a script to manage it, instead of starting and shutting down manually. Part of the script sets up the audio loopbacks to go between Ardour (DAW) and everything else:
Bash:
#
# Start Jack
#
echo
echo "Start Jack"
qjackctl &
PID_JACK=$!
sleep 5
#
# Create Bridges to/from PulseAudio
#
echo
echo "Create Bridges to/from PulseAudio"
INDEX_SINK_0=$( pactl load-module module-jack-sink channels=2 sink_name=PA_out_Playback client_name=PA_out_Playback )
INDEX_SINK_1=$( pactl load-module module-jack-sink channels=2 sink_name=PA_out_Meet_Rtrn client_name=PA_out_Meet_Rtrn )
INDEX_SOURCE_0=$( pactl load-module module-jack-source channels=2 source_name=PA_in_Mics client_name=PA_in_Mics )
INDEX_SOURCE_1=$( pactl load-module module-jack-source channels=2 source_name=PA_in_Meet_Send client_name=PA_in_Meet_Send )
INDEX_SOURCE_2=$( pactl load-module module-jack-source channels=2 source_name=PA_in_Record client_name=PA_in_Record )
#
# Remove Automatic Connections
#
disconnect_all ()
{
for CONNECTION in $(jack_lsp --connections "$1")
do
if [[ "$CONNECTION" = "$1" ]]
then
continue
fi
jack_disconnect "$1" "$CONNECTION"
done
}
disconnect_all system:capture_1
disconnect_all system:capture_2
disconnect_all system:playback_1
disconnect_all system:playback_2
#
# Save and Set Default Connections
#
PA_DEFAULT_SINK=$( pactl get-default-sink )
PA_DEFAULT_SOURCE=$( pactl get-default-source )
pactl set-default-sink PA_out_Playback
pactl set-default-source PA_in_Mics
- QjackCtl is set to start and stop the server when it starts and stops, so after its
sleep 5, I have JACK running, and the teardown code below really does put everything back to how it was before.
- Then the script creates 5 named pipes between PulseAudio and JACK. The DAW connects to the JACK side, and OBS and the meeting connect to the PA side of each pipe.
- Then there's some cleanup, and routing whatever else I might want to use to these new connections.
Once everything is set up, the script waits for me to tell it I'm done, and then tears the rig down too. The corresponding bit of code to the above is:
Bash:
#
# Restore Default Connections
#
echo
echo "Unload Bridges between Jack and PulseAudio"
pactl set-default-sink "$PA_DEFAULT_SINK"
pactl set-default-source "$PA_DEFAULT_SOURCE"
#
# Remove Bridges to/from PulseAudio
#
pactl unload-module $INDEX_SOURCE_2
pactl unload-module $INDEX_SOURCE_1
pactl unload-module $INDEX_SOURCE_0
pactl unload-module $INDEX_SINK_1
pactl unload-module $INDEX_SINK_0
#
# Stop Jack
#
echo
echo "Stop Jack"
kill -TERM "$PID_JACK"
sleep 1
In your case, I think you'd simply replace the DAW with Qsynth, and have maybe 1 bridge instead of 5, but otherwise keep the same structure.