How to enable "production quality with extra precision"?

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Re: How to enable "production quality with extra precision"?

Postby igorzwx » Tue Oct 05, 2010 1:48 pm

trew wrote:What is this "Sergey Petrov experimental SRC" thing I keep seeing?

I'm sensing placebo effect, not sure...


Yes, if all the true knowledge is already in The Holy Book, an alternative Holy Book may only produce a "placebo effect".
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: How to enable "production quality with extra precision"?

Postby hiro » Tue Oct 05, 2010 2:25 pm

Do you want to give us more and more truisms, or will you share your actual experiences?
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: How to enable "production quality with extra precision"?

Postby igorzwx » Tue Oct 05, 2010 2:39 pm

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?
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: How to enable "production quality with extra precision"?

Postby hiro » Tue Oct 05, 2010 2:46 pm

You misunderstood me. As I explained earlier I gave up trying to hear perfection, because I couldn't hear imperfection.
Now I'm trying to find out where you hear it...

I've checked that tar file and it seems that petrov's resampler is distributed only as a binary. I haven't found any other reference to it besides this forum.
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: How to enable "production quality with extra precision"?

Postby trew » Tue Oct 05, 2010 3:39 pm

I couldn't agree more with hiro ...

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.

http://people.freebsd.org/~ariff/z/src/
trew
New Member
 
Posts: 6
Joined: Thu Jun 28, 2007 9:52 am

Re: How to enable "production quality with extra precision"?

Postby igorzwx » Tue Oct 05, 2010 4:10 pm

trew wrote:I couldn't agree more with hiro ...

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.

http://people.freebsd.org/~ariff/z/src/


Many thanks for very interesting information!
Is it available as a standalone converter?

Would you be so kind as to provide some recommendations for testing scenarios, or a kind of "howto"?
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: How to enable "production quality with extra precision"?

Postby hiro » Tue Oct 05, 2010 9:13 pm

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?
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: How to enable "production quality with extra precision"?

Postby hiro » Tue Oct 05, 2010 9:17 pm



Isn't that the same? grc3 is fromm OSS...
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: How to enable "production quality with extra precision"?

Postby igorzwx » Tue Oct 05, 2010 10:23 pm

hiro wrote:


Isn't that the same? grc3 is fromm OSS...


It might be another implementation of the same old thing, but it looks very promising.
It seems that it has a kind of "magic filter", and, perhaps, something else.
It deserves a try.

It seems that the tools are here:
http://people.freebsd.org/~ariff/z/

mkfilter.awk 2007-Sep-24 16:07:34 13.7K application/octet-stream
mkfilter.awk.html 2007-Sep-24 16:07:36 60.5K text/html
udial.wav 2007-Jul-13 21:28:06 473.7K audio/x-wav
zcoeff.h 2007-Sep-24 16:07:40 58.1K text/plain
zpresets.txt 2007-Aug-26 10:00:04 2.7K text/plain
zresampler.rb 2007-Aug-29 22:45:46 11.9K application/octet-stream
zresampler.rb.html

udial.wav is, perhaps, that same test file (which should be used with certain precautions).
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: How to enable "production quality with extra precision"?

Postby trew » Wed Oct 06, 2010 1:10 am

igorzwx wrote:Many thanks for very interesting information!
Is it available as a standalone converter?

The "test" suite compile easily as a standalone converter on FreeBSD. Not sure on others.

igorzwx wrote:Would you be so kind as to provide some recommendations for testing scenarios, or a kind of "howto"?

Simple double-blind tests, perhaps requiring numbers of volunteer for perceive hearing test. SoX for pictorial frequency/numerical analysis, like generating sine sweep spectrogram, GNU Octave, audacity, etc.

hiro wrote:


Isn't that the same? grc3 is from OSS...


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).

By the way, http://people.freebsd.org/~ariff/z_comparison/ speak for itself and it is 100% reproducible using SoX spectrogram generator, in a same manner of http://src.infinitewave.ca/
trew
New Member
 
Posts: 6
Joined: Thu Jun 28, 2007 9:52 am

Re: How to enable "production quality with extra precision"?

Postby igorzwx » Wed Oct 06, 2010 2:14 am

Many thanks for this information!

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, if
1. there is a FreeBSD LiveCD, which is bootable on almost all computers
2. there is a "test" suite, which is already compiled and ready to use.

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

What do you think about such scenario for testing?
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: How to enable "production quality with extra precision"?

Postby hiro » Wed Oct 06, 2010 7:45 am

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.
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: How to enable "production quality with extra precision"?

Postby igorzwx » Wed Oct 06, 2010 12:01 pm

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 problem
http://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 distortion
Absence of quantization noise
Behaviour in overload conditions
Aliasing
Unlike 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".

delude yourself if you must believe that digital contains more information than analog... If you listen to crap played through crap, how can you possibly ascertain quality reproduction? http://www.audioasylum.com/cgi/t.mpl?f=vinyl&m=5232


"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.
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: How to enable "production quality with extra precision"?

Postby hiro » Wed Oct 06, 2010 11:24 pm

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
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: How to enable "production quality with extra precision"?

Postby igorzwx » Thu Oct 07, 2010 12:15 am

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, if we 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.
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

PreviousNext

Return to Linux

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest