Working with a differente sample rate in a Session

Hi.

Mi system is a Debian Linux with pipewire. I use Ardour 9.7 configured to 48000 sample rate, but I have old sessions with 44100. Which is the best form of working with those sessions without Ardour asking me to migrate them to the new sample rate?

Greets.

When you load the projects, Ardour ought to recognize the resolution at which they were created.

It recognizes, but the only options are convert it to the default 48000 or exit.

It could be due to the PipeWire configuration—a reason I’m not aware of. I use ALSA exclusively for Ardour projects.

Before starting Ardour, force new sample rate:

pw-metadata -n settings 0 clock.force-rate 44100

When you are done, switch back to the default:

pw-metadata -n settings 0 clock.force-rate 0

Alternatively, you can use a GUI tool to do the same. Cable seems to be quite popular, though never used it myself.

1 Like

It seems weird that in a system like pipewire you have to force the system global settings for launching Ardour with a different rate. Do you know why it is so needed?

In other words: why Ardour can’t work with a sample rate beyond global system configuration?

Thank you :slight_smile:

Ardour interacts with pipewire via the JACK API. The only way to control the sample rate in JACK is to start the JACK server with the SR as an argument. In the case of pipewire, the “JACK server” (i.e. pipewire) is already running, and there is no part of the JACK API that can be used to change the SR.

Perhaps some day Ardour could work directly with pipewire?

In general, that’s not going to happen. It’s not even intended by Pipewire’s creator.

The most that we might do is use some small part of the Pipewire API to control sample rate.

1 Like

I modified Ardour to submit the pm-metadata commands for the sample rate directly when loading a file. I just added a new option to set it to what the file wants and I don’t have to mess with the command line anymore.

I also fixed the buffer management with the same technique. I could not get Ardour to switch the buffer size. It always got stuck on 1024 and computed a latency of 10ms no matter what I did, inside or outside of Ardour. That was a little different issue as I believe it was the target buffer size that was getting confused, but it’s nice to be able to switch the buffer sizes and sample rates from within Ardour and not have bounce out to the command line all the time. I don’t know if anyone else had experienced or noticed that. Seems only related to the JACK/Pipewire configuration.

Paul, do you still monitor the help@ardour.org email? I sent my changes to you and your team on it in case you wanted to look further into it. It’s not a very complicated addition.

Yes, I’ve seen it, but am not in the right place right now to consider this sort of change.

Ok. Easy enough for me to add it to my configuration when you update Ardour. It’s a pretty nice QOL feature.

Ardour never converts existing audio files of a session!

Since Ardour 6, there are 3 options: live resampling (like pipewire also does these days), reconfiguring the engine or indeed not loading the session.