hiro wrote:Do you want to give us more and more truisms, or will you share your actual experiences?

As, I remember, you promised to refute my claim that Petrov's converter is so good. Right?Then you told that you are not going to try it. Right?Hence, you are going to refute something without trial. Right?

Disregard all that, I found FreeBSD 8+ resampler better suite for me and my project. It is at least twice, triple or quad better than the current "Production quality" of what OSSv4 can offer, both in term of speed and quality.

Disregard all that, I found FreeBSD 8+ resampler better suite for me and my project. It is at least twice, triple or quad better than the current "Production quality" of what OSSv4 can offer, both in term of speed and quality.

I've installed a nice scope for my jack.Now I can see and hear 96kHz and 112db dynamic range (loopback cable noise is around 120db). And I don't hear distortions because there aren't any. libsamplerate is "perfect" enough.I would see some kind of artifacts at -120db >20kHz in some mp3s, but that's under my soundcard's noise level (loopback cable proof)

I have mp3s and oggs containing higher frequencies than my tested cds.

@trew How did you "measure" quality? Have you by any chance also compared to libsamplerate?

No, it is different if you talk about implementation. You'll see grc3 codes there since it is only part of the comparison tests (so does libspeex).

hiro wrote:@trew How did you "measure" quality? Have you by any chance also compared to libsamplerate?

libsamplerate is floating point, while FreeBSD Z is in pure fixed math. On perceive hearing tests (I'm talking about double-blind tests), you'll be disapointed since all resamplers does not make much differences. FreeBSD Z perhaps "subjectively better" due to speed and quality, not to mention that you can even study and learn how the filter coefficients being generated (unlike libsamplerate / grc3).

If I understood you correctly, the algorithm is about the same (in libsamplerate , grc3-OSS4, and FreeBSD resampler).The difference is in the filter and in some other implementation details.Perhaps, grc3-OSS4 is also in "pure fixed math". Right?

It might be possible test the magic resampler on a massive scale, if1. there is a FreeBSD LiveCD, which is bootable on almost all computers2. there is a "test" suite, which is already compiled and ready to use.

Step 1: Boot the LiveCDStep 2: Download (install) and run the test suite

According to this site oss production quality creates distortions at about -110db. If you have a good system and ear you should hear it. But only if you listen to very quiet 24bit files!Try out this nice internet radio station: http://radio.cesnet.cz:8000/cro-d-dur.flac

libsamplerate has a very linear phase and distortions under 150db, which is not even inside the dynamic range of 24bit.

I'll consider using Z on my ARM, which is very slow with floating points. Thanks for bringing this up again.

hiro wrote:According to this site oss production quality creates distortions at about -110db.

Have you tried the test suite, or you took it for granted?

hiro wrote:Yeah, it says grc3 is fixed point.

According to this site oss production quality creates distortions at about -110db. If you have a good system and ear you should hear it. But only if you listen to very quiet 24bit files!Try out this nice internet radio station: http://radio.cesnet.cz:8000/cro-d-dur.flac

libsamplerate has a very linear phase and distortions under 150db, which is not even inside the dynamic range of 24bit.

I'll consider using Z on my ARM, which is very slow with floating points. Thanks for bringing this up again.

If we would not try and discuss the things in a constructive way, nobody would tell us anything new, and we would be here like in the former Soviet Union behind the Iron Curtain.

You seem to refuse to try Petrov's converter, simply because you have not found any reference to it in the net. Yes, it was published exclusively on the OSS4 forum. Would it be better for the OSS4 community, if it would be published on a Russian forum, or simply discussed among a closed circle of friends? If you continue in this way, nobody would share with us any valuable technical information.

That FreeBSD magic tool is of great importance for us. It contains the test suite which allows to study the filter and other things. The filter seems to be the weakest in the old algorithm, and it might be very interesting to learn how they deal with the problemhttp://en.wikipedia.org/wiki/Nyquist%E2 ... iderations

In short, the test suite is of value, and the FreeBSD resampler is, no doubt, an excellent piece of work, which deserves a try, and which deserves respect. But the tests, which were designed for the purpose of proving that it is so good, are likely to be fundamentally wrong. I am very intrigued to study the tests in detail.

To summarize: the so-called "FreeBSD bandlimited sinc interpolator" and the magic filter surely deserve to be studied in detail, even if it may contradict your "mathematical knowledge" and/or "common sense". The latter might be easily dismissed as "superstitions", but there is a certain technical information, which may provide some creative ideas for "clear-cut empirical tests", for instance, this one:

in practice, a signal can never be perfectly bandlimited, since ideal "brick-wall" filters cannot be realized. All practical filters can only attenuate frequencies outside a certain range, not remove them entirely. In addition to this, a "time-limited" signal can never be bandlimited. This means that even if an ideal reconstruction could be made, the reconstructed signal would not be exactly the original signal. The error that corresponds to the failure of bandlimitation is referred to as aliasing. http://en.wikipedia.org/wiki/Nyquist%E2 ... iderations

The reason is simple: libsamplerate , grc3-OSS4, and FreeBSD resampler are of the same sort. And the resampler inside your soundcard is likely to be a similar thing. That is why that magic test suite of FreeBSD might be a very useful tool for us. If it is not perfect, it might be, perhaps, improved, or modified in some way.

It might be necessary to note that the same lossy algorithm is applied for digital recording. The same bandlimiting filters are implemented, and you have the same "failure of bandlimitation" which is also "referred to as aliasing". This is clearly explained in Wikipedia:

It can be argued that analog formats retain some inherent advantages over digital formats. The advantages of analog systems are summarised below:Absence of aliasing distortionAbsence of quantization noiseBehaviour in overload conditionsAliasingUnlike digital audio systems, analog systems do not require filters for bandlimiting. These filters act to prevent aliasing distortions in digital equipment. Early digital systems may have suffered from a number of signal degradations related to the use of analog anti-aliasing filters, e.g., time dispersion, nonlinear distortion, temperature dependence of filters etc. (Hawksford 1991:8). http://en.wikipedia.org/wiki/Analog_rec ... advantages

Each numerical value measured at a single instant in time for a single signal is called a sample; samples are measured at a regular periodic rate to record a signal. The accuracy of the conversion process depends on the sampling rate (how often the sound is sampled and a related numerical value is recorded) and the sampling depth, also called the quantization depth (how much information each sample contains, which can also be described as the maximum numerical size of each sampled value). http://en.wikipedia.org/wiki/Analog_rec ... _recording

The problem is that the lossy sampling algorithm (which is implemented in Linux for everything, for which it should not be applied) does not satisfy the conditions of the Nyquist theorem

The [Nyquist] theorem also leads to a formula for reconstruction of the original signal. The constructive proof of the theorem leads to an understanding of the aliasing that can occur when a sampling system does not satisfy the conditions of the [Nyquist] theorem. http://en.wikipedia.org/wiki/Nyquist%E2 ... ng_theorem

The lossy sampling algorithm of Linux and of FreeBSD is fundamentally wrong simply because it does not satisfy the conditions of the Nyquist–Shannon sampling theorem.

The "true secret" of digital audio recoding, the art of "the real voodoo", and the mythological interpretation of the Nyquist theory might be learned here:

Now we get into the real voodoo. Audiophiles have claimed since the beginning of digital audio that vinyl records on an analog system sound better than digital audio. Indeed, you can find evidence that analog recording and playback equipment can be measured up to 50khz, over twice our threshold of hearing. Here's the great mystery. The theory is that audio energy, even though we don't hear it, exists as has an effect on the lower frequencies we do hear. Back to the Nyquist theory, a 96khz sample rate will translate into potential audio output at 48khz, not too far from the finest analog sound reproduction. This leads one to surmise that the same principle is at work. The audio is improved in a threshold we cannot perceive and it makes what we can hear "better". Like I said, it's voodoo. http://www.tweakheadz.com/16_vs_24_bit_audio.htm

The practical purpose of such mythological interpretations of the Nyquist theory seems to be a pseudo-scientific justification of the fundamentally wrong technologies of digital recording (which are implemented in Linux and FreeBSD). It may help the true believers to fool themselves.

The Linux technologies of digital recording produce ersatz sound, because the lossy algorithm is applied, and the sound is filtered with bandlimiting filters. Then this ersatz sound is processed once more with the same lossy algorithm and the same filters during playback/resampling. As a result, you have what you have, and you are allowed to believe that it is "bit perfect".

"Digital" does contain more information than "analog", but this information is a digital crap produced by the lossy sampling algorithm (that lossy algorithm of digitization is in ADC, which belongs to hardware http://en.wikipedia.org/wiki/Analog-to- ... Processing). In particular, the standard Linux technology of vinyl digitization produces ersatz sound which tends to be named "crap". It seems to be a kind of stupid business. If you really want to digitize vinyl, you have to make your own recorder which has an exact algorithm of digitization inside.

Digital sound is ersatz sound by definition. This is clearly explained in Wikipedia:

The current crop of AD [analog-to-digital] converters utilized in music can sample at rates up to 192 kilohertz. High bandwidth headroom allows the use of cheaper or faster anti-aliasing filters of less severe filtering slopes. The proponents of oversampling assert that such shallower anti-aliasing filters produce less deleterious effects on sound quality, exactly because of their gentler slopes. Others prefer entirely filterless AD conversion, arguing that aliasing is less detrimental to sound perception than pre-conversion brickwall filtering.http://en.wikipedia.org/wiki/Analog-to- ... _recording

Hence, whether anti-aliasing filters were implemented, or not, digital sound is crap in any case. The problems is that "you listen to crap played through crap". If you listen to crap played through the exact resampler, it may sound much better. This should be obvious. If not, try to decode/encode the same mp3 file several times and you may notice dramatic reduction in quality with each re-encoding.

There is already a magic plugin for the Russian "Ultimate Music Player For GNU/Linux", and Russian audiophiles can now enjoy digital sound played through the exact scientific resampler.

Last edited by igorzwx on Tue Oct 26, 2010 4:14 pm, edited 9 times in total.

I took the grc3 results for granted. It doesn't seem trivial to test, so I probably won't.

I already told you the reason I haven't tried that resampler: I don't have the source (I don't run random stuff not even knowing where it's coming from).Also, why should I test something nobody would ever use or know. What's the use of it? We all know it can't be "perfect" and we all still have converters which are good enough.

hiro wrote:I took the grc3 results for granted. It doesn't seem trivial to test, so I probably won't.

I already told you the reason I haven't tried that resampler: I don't have the source (I don't run random stuff not even knowing where it's coming from).Also, why should I test something nobody would ever use or know. What's the use of it? We all know it can't be "perfect" and we all still have converters which are good enough.

Yes, ifwe all think in exactly the same way, if we all have the same thing, we may have nothing to discuss, simply because we all know what the others know and what they think.

To make things clear: the source code is not going to be published, and other things too. Why do you need it? We all know it cannot be perfect.The binary was suggested for those who may need it for testing. It comes together with certain info which might be useless for those who already know everything.