Opening a 44.1kHz session with pw-jack

The problem started when Debian testing replaced pulseaudio with pipewire. I’m running this command, because my session is in 44.1kHz:

PIPEWIRE_LATENCY="512/44100" pw-jack /opt/Ardour-6.9.0/bin/ardour6

When I try to open my 44.1kHz project, Ardour says:

This session was created with a sample rate of 44100 Hz, but Ardour is currently running at 48000 Hz. If you load this session, audio may be played at the wrong sample rate.

So Ardour thinks that jackd is running at 48kHz. I open the session anyway, and listen – yes, everything is up 1.5 semitone and sounds funny.

On the other hand, pw-top shows me this:

49    512  48000 181.1µs   0.2µs  0.02  0.00    1  alsa_input.pci-0000_00_1f.3.analog-stereo
39      0      0   0.1µs   3.0µs  0.00  0.00    1   + Midi-Bridge
48      0      0  40.1µs  15.8µs  0.00  0.00    1   + alsa_output.pci-0000_00_1f.3.analog-stereo
67      0      0   3.2µs  30.2µs  0.00  0.00    1   + alsa_input.usb-Yamaha_Corporation_Steinberg_UR44C-00.analog-surround-21
80    512  44100  40.3µs  51.2µs  0.00  0.00    1   + ardour

For comparison, if I select a 48kHz session and load it (still with PIPEWIRE_LATENCY="512/44100"), Ardour doesn’t show the message, but instead crashes with a segmentation fault.

Has anyone else seen this problem?

(Side note: Going back to jackd as a workaround doesn’t work. I tried and got “Problems starting jackd: Method RequestRelease is not implemented”. Then I downloaded jackd sources, compiled them, and the daemon ran, but the output volume is almost zero, and I don’t have an option to change it. I might start another thread about it. Let’s focus on the sample rate in this thread.)

I believe that just sets the latency, with the latency given as time calculated from the buffer size and sample rate, so in your example latency time of 512/44100=11.6ms.

In a different forum thread someone suggested using this to set both buffer period size and sample rate:
pw-jack -p 256 -s 44100 ardour6

This page has some information on changing sample rate. It seems pw-metadata tool is the CLI program for that:
Pipewire config

Thanks for the clarification about PIPEWIRE_LATENCY.

Indeed, pw-jack seems to handle some command line arguments:

$ pw-jack -h
/usr/bin/pw-jack - run JACK applications on PipeWire
/usr/bin/pw-jack [options] application [arguments]
	-h                  show brief help
	-r <remote>         remote daemon name
	-v                  verbose debug info
	-s                  samplerate (default "48000")
	-p                  period in samples

I have tried it out:

pw-jack -p 512 -s 44100 /opt/Ardour-6.9.0/bin/ardour6 ~/DAW/Corcovado/Corcovado.ardour

…but I get the same dialog:

This session was created with a sample rate of 44100 Hz, but Ardour is currently running at 48000 Hz. If you load this session, audio may be played at the wrong sample rate.

When I click “Load session anyway”, Ardour loads the session, but the recording is 1.5 semitones sharp and sounds funny. So I’m guessing this is a 44.1kHz recording played at 48kHz. Output from pw-top:

    58    512  48000 177.7µs   0.3µs  0.02  0.00    3  alsa_input.pci-0000_00_1f.3.analog-stereo
    39      0      0  42.1µs   3.6µs  0.00  0.00    3   + Midi-Bridge
    55      0      0  36.3µs  44.7µs  0.00  0.00    3   + alsa_output.usb-Yamaha_Corporation_Steinberg_UR44C-00.analog-surround-21
    56      0      0   0.1µs  41.8µs  0.00  0.00    3   + alsa_input.usb-Yamaha_Corporation_Steinberg_UR44C-00.analog-surround-21
    87    512  44100   5.1µs  45.3µs  0.00  0.00    3   + ardour

I’m wondering, if Ardour is playing my recording at 48kHz, why is there a 44100 in pw-top? Confusion intensifies.

I found the magic incantation:

pw-metadata -n settings 0 clock.force-rate 44100
pw-jack /opt/Ardour-6.9.0/bin/ardour6

This is a temporary setting, and that’s great: I don’t want to change my whole system to 44.1kHz just because I have one Ardour session in that sample rate. (Also, most of my sessions are in 48kHz.)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.