Hello All.
I thought I'd share my really good sound set up for those
interested in all-round integration.
OVERVIEW:-
After logging in, PulseAudio asserts itself as the desktop
sound daemon. This remains the case until a JACK application
is started. QjackCtl (jackd) is started, briefly terminating
PulseAudio then restarting it again using a JACK sink profile.
This keeps the application compatibility benefits of PulseAudio
by connecting to JACK instead of the sound card.
This isn't a pro-audio setup per se as PulseAudio would normally
be terminated as to not hinder JACK latency performance unnecessarily.
REQUIREMENTS:-
Working PulseAudio installation.
Pulseaudio-module-jack is installed.
CAVEATS:-
1) If suspending to RAM / hibernating be sure to stop JACK from running
allowing PulseAudio to take over, as JACK is not supported in this way.
2) Pause/stop playback of clients first when starting/stopping JACK.
3) Allow one or two seconds between any successive stopping and starting
of JACK.
Okay then!
Create the following BASH scripts and make them executable:-
1)
.............................................................
#!/bin/bash
pulseaudio -kkk
#sleep 1
pulseaudio -nF /etc/pulse/jack-sink.pa -D
exit
.............................................................
Create the above script as /usr/local/bin/jack-pulse
2) EXAMPLE JACK CLIENT START SCRIPT (Phasex)
.............................................................
#!/bin/bash
if [ "$(pidof qjackctl)" ]; then phasex &
else
qjackctl &
sleep 2
phasex &
fi
exit
.............................................................
Create the above script as /usr/local/bin/phasex-qjackctl
Change Phasex to JACK app of choice. Create more as required.
This script will check for a running instance of QjackCtl
and run it first if needed before launching the application
itself.
This script should be executed by a custom menu/desktop application
launcher.
3) Create a JACK SINK profile for PulseAudio:-
Use your existing '/etc/pulse/default.pa' as a template and add the
following:-
......................................
load-module module-jack-sink
load-module module-jack-source
......................................
Then save as /etc/pulse/jack-sink.pa
4) QJACKCTL CONFIGURATION
This configuration will start minimized in the system tray and handle
PulseAudio.
Save as '.config/rncbc.org/QjackCtl.conf' in your home directory.
See Below:- (Config only, not an executable)
................................................
[Splitter]
AudioConnectView\sizes=267, 86, 267
MidiConnectView\sizes=34, 20, 34
AlsaConnectView\sizes=34, 20, 34
PatchbayView\sizes=34, 20, 34
[Settings]
Server=jackd
Realtime=false
SoftMode=true
Monitor=true
Shorts=false
NoMemLock=false
UnlockMem=false
HWMon=true
HWMeter=true
IgnoreHW=false
Priority=0
Frames=1024
SampleRate=48000
Periods=3
WordLength=16
Wait=21333
Chan=0
Driver=alsa
Interface=
Audio=0
Dither=0
Timeout=500
InDevice=
OutDevice=
InChannels=0
OutChannels=0
InLatency=0
OutLatency=0
StartDelay=1
Verbose=false
PortMax=256
MidiDriver=none
[Geometry]
qjackctlMessagesForm\x=0
qjackctlMessagesForm\y=0
qjackctlMessagesForm\width=328
qjackctlMessagesForm\height=200
qjackctlMessagesForm\visible=false
qjackctlStatusForm\x=0
qjackctlStatusForm\y=0
qjackctlStatusForm\width=386
qjackctlStatusForm\height=238
qjackctlStatusForm\visible=false
qjackctlConnectionsForm\x=0
qjackctlConnectionsForm\y=0
qjackctlConnectionsForm\width=567
qjackctlConnectionsForm\height=286
qjackctlConnectionsForm\visible=false
qjackctlPatchbayForm\x=0
qjackctlPatchbayForm\y=0
qjackctlPatchbayForm\width=740
qjackctlPatchbayForm\height=385
qjackctlPatchbayForm\visible=false
qjackctlMainForm\x=0
qjackctlMainForm\y=0
qjackctlMainForm\width=486
qjackctlMainForm\height=100
qjackctlMainForm\visible=false
[Program]
Version=0.3.4
[Presets]
DefPreset=(default)
[Options]
StartJack=true
StartupScript=true
StartupScriptShell=pulseaudio -k
PostStartupScript=true
PostStartupScriptShell=jack-pulse
ShutdownScript=true
ShutdownScriptShell=
PostShutdownScript=true
PostShutdownScriptShell=killall jackd
StdoutCapture=false
XrunRegex=xrun of at least ([0-9|\\.]+) msecs
XrunIgnoreFirst=true
ActivePatchbay=true
ActivePatchbayPath=
MessagesLog=false
MessagesLogPath=qjackctl.log
BezierLines=false
TimeDisplay=0
TimeFormat=0
MessagesFont="Sans,9,-1,5,50,0,0,0,0,0"
MessagesLimit=true
MessagesLimitLines=1000
DisplayFont1="Sans,12,-1,5,75,0,0,0,0,0"
DisplayFont2="Sans,9,-1,5,50,0,0,0,0,0"
DisplayEffect=true
DisplayBlink=true
JackClientPortAlias=0
ConnectionsIconSize=0
ConnectionsFont="Sans,9,-1,5,50,0,0,0,0,0"
QueryClose=true
KeepOnTop=false
SystemTray=true
StartMinimized=true
DelayedSetup=false
ServerConfig=true
ServerConfigName=.jackdrc
ServerConfigTemp=false
QueryShutdown=true
AlsaSeqEnabled=true
AliasesEnabled=false
AliasesEditing=false
LeftButtons=true
RightButtons=true
TransportButtons=true
TextLabels=true
BaseFontSize=0
[Defaults]
PatchbayPath=
.................................................
That's it. Good Luck!

P.S. For JACK clients that are unable to connect automatically,
a patchbay XML file will need to be created using QjackCtl and
set to 'active'.