Import audio WITHOUT resampling

Hello everyone! This may be a funny question:

I’m working on a project in Ardour with a sample rate of 48000 hz, and I’d like to import some voice recordings at 44100 hz.

Here’s the thing: When ardour plays the 44100 hz audio at 48000 hz when previewing, it sounds perfect! It’s exactly the pitch/time shift I want. But when I import it, it resamples the audio to the “correct” original pitch- which is what I would normally want, but not this time. I’d do a pitch/time shift effect on it, but those give me artifacts.

How can I import the audio so that Ardour DOESN’T correct the different sample rate? Better yet, is there a process in audacity or some other free program for linux that would do the same thing prior to importing into Ardour?

Thanks in advance!

Going off memory you can do this by cheating the import dialog slightly…

Move the audio file into your session directory, you should probably create a folder under Interchange for this for the sake of consistency, but don’t use the default folder. The entnire reason for doing this is just so that when you move the session, you are moving the source file as well as you will see in a moment, we are going to tell Ardour specifically not to copy the file itself.

Open Ardour, Import from the new location, and tell it NOT to copy the file to the session(Checkbox in the lower right hand corner of the import dialog). This will create a hard link to the file, but Ardour shouldn’t resample it. It should effectively provide what you want I believe.


Ahh ok. The SN makes a difference;)


There are a couple of approaches:

  1. Use sox to do the pitch change (see the speed command). This gives you a speeded up file at 44100. Then import into ardour which will do the rate conversion (but the resulting audio will still be speeded up).

You could also use audacity to do the pitch change I imagine.

  1. Alternatively, bring the original file into ardour and use the timefx tool to speed up the audio.

Sorry-- It’s Sam (Rocketman)! We worked together on Jason’s 48hr film festival, and you’ve helped me out with audio in Linux before…

Uh yes…

Who is this?


I did the speed command in Audacity and it worked pretty much the same way. Thanks!

@Seablade: Hey Thomas, is that you? That’s another pretty good method; I’ll have to try that next time.

Importing a wav file to the session with resampling from 44.1 to 48, I had crackling sound when the flute reaches high notes.
I had the same issue with SOX.
The solution was to use the “-v” option for Very high quality. (Because “High quality” means with crackling sounds …)
sox Bartok_6.wav Bartok_6.48.wav rate -v 48000

Seems that the rationale is that “Very high quality” is a bit faster. Honestly, I spend (lost) a lot of time to solve this issue.
RFE: if Ardour could do the import at “Ultra Very high quality” that would be excellent !

What is the peak value of the original recording? That sounds like clipping the digital filter.
You can see the peak value with sndfile-info, although that does not show any inter-sample over values, it just shows the peak of the sample values. I thought I had a cli program on my machine which would display true peak values, but I can’t find it at the moment. Output from sndfile-info and ebur128 should give a pretty good idea though.

ebur128 Bartok_6.wav
Integrated loudness:      6.1 LU
Loudness range:          14.2 LU
Peak level               -1.4 dB

Resample at 48 in VeryHighQuality, Peak level is at -1.3dB

sndfile-info Bartok_6.wav
File : Bartok_6.wav
Length : 11506732
RIFF : 11506724
fmt  : 16
  Format        : 0x1 => WAVE_FORMAT_PCM
  Channels      : 2
  Sample Rate   : 44100
  Block Align   : 4
  Bit Width     : 16
  Bytes/sec     : 176400
data : 11506688

Sample Rate : 44100
Frames      : 2876672
Channels    : 2
Format      : 0x00010002
Sections    : 1
Seekable    : TRUE
Duration    : 00:01:05.231
Signal Max  : 27959 (-1.38 dB)

Resample at 48 in VeryHighQuality, Signal Max is 28055 (-1.35 dB)

I see what you mean. If a sound is sampled at 44.1 and then “normalized” to use the full range of the 16 bits width. Then when re-sampling at higher rate, 48 kHz for example, it is almost sure to have points out of the bit width. Meaning it will clip.

But from a user perspective, if there is a solution as simple as adding a “-v” for Very High Quality, wouldn’t it be nice to have it by default ? (In Ardour, it is not streaming, it is a one shot import.)

Now I remember there is a combo box to choose the quality in Ardour, from Best to Quick to Fast. It is “Best” by default, but it is kind of misleading as sox -v ... can do better than Ardour’s “best”.

Good day,

I read through your question and thought about what you might want to do with it.
Your question: “How can I import the audio so that Ardor DOESN’T correct the different sample rate?”

in fact, with a little detour, you can do that with Ardour. A great gimmick.

  1. Create a project with a sample rate of 44100 hz.

  2. Import a WAV file with 44100 hz.

  3. Save and close the project.

  4. Open the same project again and set the sample rate from 44100 hz to the desired 48100 hz.

  5. An error message appears that the sample rate does not match. Klicken Sie auf Click “Load project anyway”
    Samplerate Error

The project will load and your imported file will play distorted as it hasn’t been converted to 48100hz.

The only downside is that you have to go through step 4 and step 5 over and over again with this project.

This is identical to what happens when importing. The audio is resampled for audition.