How to avoid double conversions

My computer normally runs with a 48000Hz sampling rate for audio, that’s the one you would also use for most video productions like when producing something for the ‘tubes and such.

But CDs had 44100Hz which is also perfectly fine, and which saves some space if you record with that frequency – and so some (or even most?) of my friends over at Wikiloops use that sampling rate for their music.

No problem; Ardour checks when importing, and would normally automatically convert the imported 44.1kHz files to 48kHz ones. But that would mean that I’d make it harder for others who would probably like to add my single tracks to the rest (with 44.1Khz). And also, each conversion diminishes the quality just a tiny bit, so it’s always best if/when you can avoid these and use the material as it comes. Even Ardour says so:

But how to temporarily set Ardour to 44.1kHz? Easy in case you’re using the new pipewire! I just wrote the following short shell script which I named ‘ardour44k.sh’:

pw-metadata -n settings 0 clock.force-rate 44100
PIPEWIRE_LATENCY=128/44100 pw-jack ardour
wait
pw-metadata -n settings 0 clock.force-rate 0

So if I start Ardour using that, I can use 44100Hz just perfectly fine – and when Ardour ends, the system will be set back to 48000Hz; just what I wanted. Here are some screenshots from Ardour’s Edit and Mixer windows while it ran with 44100Hz:

And when I stop Ardour, the script ends with:

set property: id:0 key:clock.force-rate value:0 type:(null)

Just what I always wanted, as Tigger would say 🙂 Thanks to the pipewire crew, and thanks also to my friends over at Wikiloops 🙂

Oh, and what I’m also using with pipewire (which is now the standard audio “engine” on Debian and most other Linux distributions) is a program called qpwgraph, and that is a graphical patchbay like the older tools (qjackctl, Carla, Catia & Co). Looks like this:

Here you see three inputs for my upright bass on the left, which go into Ardour. The right side shows Ardour’s monitor section and its metronome going out into my sound interface, and from there, into my headphones. The outputs of individual tracks go back into Ardour’s master track, which gives you this figure 8 shape. Easy peasy, isn’t it? Virtual cabling, so to say…

Thanks to you for reading.