Related to my ongoing Bach project (and now that I’m solely on Linux), I wondered what people use for resampling? I have 48k/16-bit (triangular dither) lossless files straight out of Ardour/Mixbus for adding to Bandcamp but am wondering what is best for creating the occasional CD? As far as I can tell, my major options are Secret Rabbit Code (baked into Ardour so the most convenient), SoX and zita-resampler (both easy to call up in the terminal but first requiring a wav+cue render out of Ardour). I realize we’ve recently enjoyed an in-depth discussion of dither, thermal noise and the like so wondering if choosing between these three resamplers is dealing with the same kind of minutiae? Does it really matter when, as far as I can tell, any artifacts will probably be both masked by the music and by the 16-bit dither that is subsequently applied? And, if this is the case, why the big deal about Weiss Saracon, Merging Hepta and the like?
If you want to know about/compare resampling implementations: https://src.infinitewave.ca/
Perfection in that context is a perfectly smooth white line (the thinner the better) against a black background.
You will note that SoX high quality is a little better than SRC. Also check the Ableton Live 10.1 result.
Thanks, Paul! I’m familiar with these graphs but have always wondered whether perfectly black backgrounds etc actually sound better? Merging’s HEPTA in Pyramix is considered one of the very best (alongside Saracon) but it clearly doesn’t have as black a background as SoX (as well as some nice non-audible aliasing peaks above 20k). I’m assuming that Ableton also uses SoX (as does Wavelab these days).
I suppose I should re-frame my question: Do most folks here use the built-in Secret Rabbit Code in Ardour/Mixbus or do they go outside to use SoX or something else like zita-resampler because they think/know/hear there is an improvement? As with all these things, I’m trying to take a healthy approach of not getting too caught up that it consumes my creativity but also striving to go with the best option because…well…that feels like the best thing to do with most things in life (especially when all three of the options I mentioned in the original post are free!)
Since posting, I did convert from 48/24 to 44.1/16 using zita-resampler (with triangular dither) and it sounds absolutely fine to my ears. I’m definitely interested in other users’ experiences, though.
For what it’s worth, I’ve always used the built-in code in Ardour. I haven’t done any extensive tests and comparisons. I always record at 48, and the only SRC I do is 48 to 44.1.
The main benefit of zita-resampler is that it uses very little CPU, is reatime-safe, and supports adaptive resampling (the ratio can change). This makes it an ideal candidate to synchronize different clocks and similar cases (e.g. Ardour 6 uses it for vari-speed playback).
For offline resampling and/or fixed-ratios there are better candidates. eg. libsamplerate or soxr.
If you look at the site linked by @paul, the differences are well below -120 dB, and cannot show up in a 16bit export, even when dithered.
zita-resampler may be the odd one out. If you check the transition plot, you can see that frequencies just above Nyquist can be folded back at a level around -65dB (also visible in the sweep plot).
Depending on the source signal, and good playback equipment this might be audible.
It’s usually more important when you resample during import. It can add up when you resample a lot of files and then sum them.
I did notice that particular oddity. By all other accounts the zita-resampler seems to share more in common with the celebrated Merging Pyramix 10 than others (visually on the sweep at least, including the small aliased inverted “V” above 20k and dark blue uniform background on the sweep ascent). The transition in the Merging one is clearly not as “weird” looking but is surprisingly gentle compared to others which I suppose it is reducing ringing somewhat? What I’ve not done as yet with zita-resampler is a proper null test after pushing the 44.1 back up to 48.
With all this said, I will take on board your advice about the better candidates for offline resampling.
I followed up with a proper null test (I think) with zita-resampler files. I converted from 48/24 to 44.1 and back again maintaining 24-bit. Flipping the phase of one of the files shows a -60dB hump above 20k but everything else in the human hearing range is showing peaks below -150dB. Can I be as bold as to say that for a real-time-friendly resampler zita in offline mode is also pretty darn impressive?! As you say, when adding dither (triangular) for moving to 16-bit, the null test is then dominated by white-ish noise peaking south of -80 dB (as would be expected?).
EDIT: I just did the same null test with SoX using default phase setting and there’s not much difference with very similar peaks at or below -150dB (same -60dB hump above 20k).
SoX has a “high quality” and a “very high quality” option. From the plots it looks like VHQ linear phase should be as close to technically fully correct as you can get. I don’t think you will see any bump in response above 20k with that.
Definitely. It’s an awesome tool.
That doesn’t sound right. as @ccaudle said, try the VHQ profile. There’ll still be some cases where signals > 22.1kHz cannot be correctly reconstructed, since some information is lost.
A test 44.1kHz -> 48kHz -> 44.1kHz test would be more appropriate here.
I don’t know why I didn’t immediately realize before but the “bump” I described in the null test is simply original high energy > 20k from the 48k recording that is no longer present in the 44.1 version. D’oh! My bad for describing it in a way as to suggest it was some SRC artifact. The rest of the graph, as described (and as expected), is peaking marvelously under -150dB. Indeed, playing the new file by itself shows the filter in both zita-resampler and SoX doing its job…
I think so, given the above!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.