Hey Stephan,
you are trying to explain the basics of Linux there, mh?
While we are at it: "in a terminal window" -> in a Terminal Emulator There is no Terminal any longer.
Ive actually never stated why we want PW-Jack and whats about the quantum and rates:
Long story short is that when using the PW-Jack Interface, you have more features than with PW-ALSA.
In addition, I use it as kind of "Group" for Apps in Music Production: With using the PW-Jack Server everything connected via PW-JACK will run the same rates and quantum, which can be set globally.
So for the sake of completion to my prior advise:
1. Determ best Audio Output (aka Soundsink):
$ wpctl status -> list all devices. Check your Soundsinks. They list some ID.
$ pw-cli enum-params <ID> EnumFormat -> see supported formats/rates. The best is true F32LE (32Bit Float -> native Signal stays the same as long as possible) if you want to output to a digital device (like HDMI, DisplayPort, SPDIF, USB Audio). Some actual analog output can only use S32 (String Integer), so you want that. Many consumer grade devices, like my Dockingstation, or the CPUs own I/O Pins only allow for S24_32 which is the best you can do. Everything less than this (S24, F16, etc.) will have less and less "quality" and requires computation
$ pw-cli enum-params <ID> Format -> check the actual used Format when a Soundsink is Playing sound.
-> Do this to find at best some F32 or S32 Output device and use it as your output (can be set by various methods, I like Helvum as Patchbay for that) to spare all unnecessary computation.
2. Setup PW-Jack Parameter:
https://docs.pipewire.org/page_man_pipe...hatgpt.com
Create directory for custom config files
$ mkdir -p ~/.config/pipewire/jack.conf.d
$ nano ~/.config/pipewire/jack.conf.d/YOUR-CUSTOM-NAME.conf
This is my actual file content:
jack.properties = {
rt.prio = 88
node.lock-quantum = true
node.force-quantum = 128
node.latency = 128/48000
jack.show-monitor = true
jack.merge-monitor = true
jack.show-midi = true
}
Save the file - done.
(The name of the file doesnt matter at all, every file in the folder will be loaded and you can create multiple ones).
-> Restart the System (systemctl restart services, logout/login, ... they should work, but safest bet is to restart).
3. Use PW-JACK
use "pw-jack" command to start your Apps like PianoTeq. I use .desktop files anyway for my start menu, therefor it was easy to just put "pw-jack" infront the exec path.
To save you some trouble, this is my actual /home/USER/.local/share/applications/PWJACK_PTQv843.desktop file:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=PWJACK Pianoteq 8 STAGE
GenericName=Pianoteq 8 STAGE
Comment=Selfmade Desktop Shortcut for Pianoteq 8
Exec=pw-jack "/home/USER/Music/MX/Programs/PianoTeq/PianoTeq_8_Stage_843/x86-64bit/Pianoteq 8 STAGE" %F
Path=/home/USER/Music/MX/Programs/PianoTeq/PianoTeq_8_Stage_843/x86-64bit/
Icon=/home/USER/Music/MX/Programs/PianoTeq/Extras/modartt.png
StartupNotify=true
StartupWMClass=Pianoteq STAGE
4. Enjoy your Harmonized Production!
5. Double Check
use
$ pw-top
to check for the Quantum (Buffer Size) and Rate (Sample Rate) and Format (F32, etc) of your applications. PW-JACK Applications wont show any format -> they run F32LE globally.
Check in PTQ Options for Buffer Size and Sample Rate -> if working properly, it must show the values from ~/.config/pipewire/jack.conf.d/YOUR-CUSTOM-NAME.conf
Why is this solution my preferred?
My non-Music-Production Apps like Firefox, Spotify, VLC Player ... do not get resampled and use native Pipewire (or PW-Pulse or PW-ALSA) -> no performance loss, no quality loss, no glitching.
PTQ, Ardour, etc. use PW-JACK and run at the Rates/Quantum I desire.
Which Rate and Quantum you pick is another question and is smth. I would love to find other "geeks" explaining why their calculation is the best.
PTQ uses Quantum 64, therefor we would like to use 64.
48kHz Rate on the other hand would divide Quantum of 48 to a perfect 1ms block size (48/48000Hz=0,001Hz=0,001s=1ms).
USB2 SuperSpeed Poll Rates of 1kHz (48/1=48) would match this quite well too, newer USB3 8kHz Hardware (its quite some time ago that I researched the MIDI-USB specs, were they even allowing for 8kHz?) would match nicely too (48/8=6) so we have nice whole numbers and no integers which take more computation to solve neatly.
That is actually the reason why we dont want 44100Hz, or the Quantum 64.
That is why we have to find gcd/gcm and look for other combinations that are elegant: The easiest solution would be to increase the Rate to smth like 384kHz and than enjoy that many natural numbers would fit as factor/divisor to receive some neat Quantum value, but this idea is limited by actual computational power.
The 128/48000 on my Laptop offers great Performance - but the latency is quite weird with 128/48000=0,002666s=2.66ms and therefor mismatches with its blocks other I/O blocks like the ones by the USB-MIDI controller.
But thats maybe just me and my desire for elegant numbers - as Im not aware of too many people probing with lsusb -v -d what Intervals/Poll Rates their MIDI Controller actually use, in an attempt to optimize for that.
Cheers
Last edited by Vepece (25-10-2025 21:29)
Ubuntu24 +Kernel6.14 +PREEMPT_DYNAMIC +PipeWire&PW-Jack +WirePlumber +Helvum | i5-1345U +taskset 4of6 Cores +CPUPower-GUI fixed freq&gov | PTQv843@F32bit/48kHz/128Buffer/256Poly =2.7ms =Perf.Index 118