Skip to main content
Topic: Resampling: SoX vs. ALAC (Read 986 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Resampling: SoX vs. ALAC

Hi,

I've been downsizing some of my HD 24Bit audio to 16Bit 44,1/ 48 kHz. I was playing around with XiVero MusicScope a bit and then noticed that the spectrum changes whether I first convert to WAV or when I compress to ALAC directly.




There are minor differences between SoX MQ and VHQ Linear Phase already, though minor. But generally it looks like SoX has a steep roll-off whereas ALAC is a lot more linear and shows less SPL at 19+ kHz.

I'm on a Mac and I use XLD. Which would you generally prefer? Is there a reason why one would make more sense over the other? There are no options for using FLAC for resampling. How does it compare?
headphone aficionado, tech fan, realist

Re: Resampling: SoX vs. ALAC

Reply #1
ALAC is just a compression format, not a resampler.

Re: Resampling: SoX vs. ALAC

Reply #2
OK, then what tool does XLD use to resample? Shouldn't it be SoX too? But the outcome is very different.
headphone aficionado, tech fan, realist


Re: Resampling: SoX vs. ALAC

Reply #4
http://tmkk.undo.jp/xld/dsd.html.en

I don't have a Mac so I am unable to try it, but SoX's resampling algorithm is adjustable.

BTW, your spectrum is in linear mode but human hearing is in log mode so the differences should be small, did you try to ABX them?

Re: Resampling: SoX vs. ALAC

Reply #5
It is probably not SoX.  Check the documentation?
I couldn't find it but XLD uses SoX for resampling from DSD so why would it use something else for conversion from higher PCM? The DSD settings do not seem to affect the resampling method of the original post.

your spectrum is in linear mode but human hearing is in log mode so the differences should be small, did you try to ABX them?
I don't hear the difference between -50 dB or -51 dB at 19 kHz.
I know the linear display is not accurate to hearing but it makes the differences easier to see that I mentioned in the original post.
headphone aficionado, tech fan, realist

Re: Resampling: SoX vs. ALAC

Reply #6
SoX uses quite a wide array of resampling parameters, including roll-off settings. Results will vary depending on what each program that uses SoX thinks is best.

The SoX "quality setting" that some software out there presents to the user are just common presets. But in reality SoX provides much more than just preset quality settings. That means two different programs that use SoX can produce quite different results.

With that being said, resampling is pretty much an open-ended complexity algorithm. There's no upper limit to accuracy. If you wanted 100% accuracy, you'd have infinite complexity. Usually, the high complexity settings of a resampler just represent a set of parameters that are well past the point of diminishing returns, but they're still not actually fully accurate. So you shouldn't worry about it much. If you chose the highest quality setting in both programs, the results should be indistinguishable from each other, even if they don't look the same when looking at the sample data.

Re: Resampling: SoX vs. ALAC

Reply #7
Thank you @Nikaki, I'm probably overthinking it. It's not like my hearing at 18 kHz is better than at -80 dB...
I just noticed that when I'm using SoX for resampling in JRiver MC23 there is no roll-off at all. I'm not sure which method is best. Aesthetically I'd say the early linear roll-off from ALAC looks most natural and leaves the least impression that 16/44,1 would be limiting.
headphone aficionado, tech fan, realist

Re: Resampling: SoX vs. ALAC

Reply #8
No visible roll-off may simply mean aliasing.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: Resampling: SoX vs. ALAC

Reply #9
Instead of songs you can use the TestSignals.zip below to test resamplers.
http://src.infinitewave.ca/faq.html

Convert Swept_24.wav (as hi-res files are often 24-bit instead of 32 int/float) with different settings and attach the converted files here and we'll analyze them.


Re: Resampling: SoX vs. ALAC

Reply #11
Thanks a bunch for helping me clear this up!

I have also received a reply on the JRiver board:
Quote
It is a steep filter with a very late cutoff - and it might be best if the cutoff was reduced slightly - but it does roll-off rather than aliasing.
https://yabb.jriver.com/interact/index.php/topic,115843.0.html
headphone aficionado, tech fan, realist

 
SimplePortal 1.0.0 RC1 © 2008-2018