I used the transcoder in DeadBeef with the "Secret Rabbit resampler", using the settings rate=48000 quality=best.

I opened both of these files in Audacity, inverted the track converted with Petrov's converter, and mixed it with the file converted with DeadBeef. The resulting file is essentially "DeadBeef-Petrov". Since the signal was too low to register on the FFT scale, I amplified it by 48db, a multiple of 6db, to avoid volume aliasing.

I have attached the screenshot of the spectrum analysis, and the exported textfile in case someone knows how to use it.

So it is clear there IS a difference between Petrov's resampler and the standard "best quality" resampler. Unsurprisingly, the biggest differences lie in the treble region. The rest of the spectrum seem to follow the envelope of the original file's spectrum, indicating the errors below the treble range aren't highly frequency-dependent.

Because the difference file was amplified by 48db, the scale on the spectrum graph should no be taken for granted. On this scale -72db corresponds to -120db, which is said to be the lower limit to human hearing. This gives us an estimate of the scale of these differences. The largest difference below treble is -113db. The treble difference rises above -120db at 17KHz and peaks at -107db at 23KHz.

keantoken wrote:I used the transcoder in DeadBeef with the "Secret Rabbit resampler", using the settings rate=48000 quality=best.I opened both of these files in Audacity, inverted the track converted with Petrov's converter, and mixed it with the file converted with DeadBeef.

You could easily convert it with Audacity, it has the "Secret Rabbit Code" inside (Edit → Preferences → Quality, then File → Export, it will export to the "default format", which is set in "Quality"). The Windows version of Audacity has a similar resampler, but not the same.

A Sample Rate Converter using libsndfile for file I/O and Secret Rabbit Code (aka libsamplerate) for performing the conversion. It works on any file format supported by libsndfile with any number of channels (limited only by host memory).

If you want to test them too, you may contact Sergey by e-mail. Petrov's ALSA plugin libasound2-plugin-fftrate_0.8 is available for download on the Russian Ubuntu forum http://forum.ubuntu.ru/index.php?PHPSES ... #msg939449 The latest version is 0.9, it sounds better. It can be easily installed on any Linux, just unpack the .deb file with the archive manager and copy the files to the place (e.g. arateconf to /usr/bin or /usr/local/bin ).

Do you hear the difference in sound quality? Do you perceive it? What is your "subjective" opinion?

The sound seems to be in general clearer and more life-like. Reverberations and spatial sense are stronger and more realistic, which in my experience means time-related distortions have been lowered. The background is quieter, and instruments are easier to separate from each other. The flute in that file seems to be a good test for resamplers (compared to what I usually listen to anyways). Often these kinds of instruments will be overwhelmed by other instruments and reverberations which are distorted. This can be a symptom of harmonic distortion, which makes all instruments sound strangely the same, or time distortions which affect the spatial sense by which we can tell whether a sound is made by two instruments or just one. Since time distortion seems to be the dominant one for resamplers I think it is safe to say it is the culprit. With Petrov's resampler quiet instruments are not so overwhelmed by loud ones.

That is the most I can make out, trying to compare the sound to what I think "real" sounds like, without accidentally making things up. Subjectively, I enjoy the Petrov resampler more. It is more emotionally engaging, there is less getting between me and the music.

For those who want to understand the scientific reason Petrov's resampler is better, look through these links:

They mostly concern image resampling, but the FFT algorithm is universal, the same algorithm used for images can be applied to music. Wait, that's an idea, convert a music file into a string of pixels and use photoshop to manually resample it! Could probably make a script to do that automatically, the problem would be making sure each program used was free of buggy math operations.

You should certainly try more advanced versions. I am not authorized to distribute them, and it does not make much sense. The author need feedback and bug reports. There is still a lot of work, there are still some "exact scientific methods" to be implemented to make it more perfect.

Last edited by igorzwx on Sun Dec 04, 2011 11:37 pm, edited 1 time in total.

I don't know much about math, but when I saw it was an FFT algorithm I realized what it was. A good idea!

While It seems the FFT-based resampling should be more accurate than any kind of interpolation, there is still a limit to how much of the original signal can be reconstructed. For one thing, signals above the samplerate will heterodyne backwards in frequency, and no algorithm can tell this apart from the musical signal with 100% accuracy. At the same time filtering out these extra signals before A-D conversion causes unwanted complexity which may decrease sound quality by introducing phase shift, and maybe harmonic distortion.

Another reason for this is that an FFT made from a finite number of samples has a resolution limit. It cannot recover information that was lost in the original conversion.

Using higher samplerates such as 96k or 192k may shift these errors out of the audible range of hearing, if they are in fact audible. This is why high samplerates are preferred when there will be many sample conversions.

keantoken wrote:I don't know much about math, but when I saw it was an FFT algorithm I realized what it was. A good idea!

While It seems the FFT-based resampling should be more accurate than any kind of interpolation, there is still a limit to how much of the original signal can be reconstructed. For one thing, signals above the samplerate will heterodyne backwards in frequency, and no algorithm can tell this apart from the musical signal with 100% accuracy. At the same time filtering out these extra signals before A-D conversion causes unwanted complexity which may decrease sound quality by introducing phase shift, and maybe harmonic distortion.

Another reason for this is that an FFT made from a finite number of samples has a resolution limit. It cannot recover information that was lost in the original conversion.

You may discuss this with Sergey Petrov.

keantoken wrote:an FFT made from a finite number of samples has a resolution limit. It cannot recover information that was lost in the original conversion.

keantoken wrote:Using higher samplerates such as 96k or 192k may shift these errors out of the audible range of hearing, if they are in fact audible. This is why high samplerates are preferred when there will be many sample conversions.

Or may not. It is just an interpolation. It is never exact by definition. You cannot produce "information" from the absence of "information". "Higher samplerate" simply means "smaller step by time". Just a "common sense", just the obvious, no science at all, simply charlatanism. There is, however, a kind of Cargo Cult Information Theory which can easily produce "credible information" from the absence of information. This theory has already produced a lot of "fundamental results" including the most fundamental "Cargo Cult Sampling Theorem": http://en.wikipedia.org/wiki/Nyquist%E2 ... ng_theoremThe purpose of this theorem is to imitate the rituals of mathematics. Otherwise, nobody may believe that it is something "scientific". To fool the public, they use "mathematical terminology", to solve the practical problem, they use heuristic functions discovered by "trial-and-error". These heuristic functions are implemented in ADC and DAC. It has nothing to do with mathematics and with science in general. Just the ancient method of "trial-and-error" which was invented in the Stone Age. This method is also used by our brothers in Vanuatu to improve the shape of "wooden earphones" and "bamboo antenna", and of "wooden microphone", of course http://www.lhup.edu/~DSIMANEK/cargocul.htm