Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Resampling - Rounding Errors and Bit Depth. (Read 36874 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Resampling - Rounding Errors and Bit Depth.

Reply #25
Some resampler comparisons:
http://src.infinitewave.ca/

How to read the graphs:
http://src.infinitewave.ca/help.html

The click sound at the end of the resampled 13579.wav is not a sign of bad resampling. In fact the quality of the file you uploaded is good.

Resampling - Rounding Errors and Bit Depth.

Reply #26
Can i make one such graph to try the resampler i use?

I didn´t say anything about the click sound, don´t you hear the noise?
It seems that the nosie it present in the original one as well, just quite lower.

Resampling - Rounding Errors and Bit Depth.

Reply #27
http://src.infinitewave.ca/faq.html
Quote
Absolutely; you can convert the test files as described above and analyze them with any suitable spectrum analyzer, such as Adobe Audition or iZotope RX.


You can if have such software. Audacity (free) can display similar graphs as well.
for 54321.wav I can also hear the noise before and after resampling if I turn the volume up, but for 13579.wav I can't turn up the volume to listen because my ears will hurt. If you can hear noise then the reason should not be the resampler itself, but similar to this:

http://www.hydrogenaudio.org/forums/index....howtopic=100657




Resampling - Rounding Errors and Bit Depth.

Reply #28
I don't hear any problem with your resampled audio, and the spectrogram looks fine. You could try uploading another sample, but I think the problem is in your playback chain and not your resampler. What software and hardware are you using for playback?
Oh ah see, i thought More bit for Resampler was making all the difference.
I guess it´s not the best resampler then, what is difference between bad and good resampling?
Filter quality, not bit depth, is the main consideration. If you look at the src.infinitewave.ca graphs, they try to tell you how the filter compares to an ideal one- flat passband frequency response, silent stopband, infinitely steep transition, linear phase but no pre-echo, normalized sinc impulse response. Such an ideal filter is only possible with infinitely long signals and infinite bit depth; real-world filters have to make some tradeoffs, but the better resamplers from the past decade are close enough to the ideal that the differences oughtn't be audible.

A resampler with a filter that doesn't do a good job of stopping the stopband will have aliasing. When the passband isn't flat you will have other kinds of distortions.

Quote
I know more about Noise and Dither now, but that´s not done while resampling, but afterwards right?
Assuming you mean quantization noise, yes, if a resampler works in higher precision internally it will do the bit depth conversion and dithering (if any) after it has resampled.

 

Resampling - Rounding Errors and Bit Depth.

Reply #29
BTW I'm sorry if my earlier response sounded harsh towards AndyH. Pinpointing someone's problem and explaining stuff is hard; I'm certainly not doing a perfect job either of figuring out where zerowalker is at and adapting to his level of understanding. It's just that getting deeper and deeper into the subtler points about quantization and dither and proposing detailed tests wasn't going to help if basic perspective about the small impact of 16bit quantization was lacking.

We all tried to communicate that perspective- indeed, AndyH more than anyone- but somehow it was getting buried in all those details.

Resampling - Rounding Errors and Bit Depth.

Reply #30
Really?
Don´t you hear any noise at all;S?

Cause i don´t hear noise on other clips and stuff, and i am pretty sure of it, i can most of the time hear noise. Distortion and Artifacts on the other hand, is not something i can clearly hear at high bitrates, though that´s another thing.

I use Windows 8 with Creative ZxR Sound Blaster at 24Bit 48khz (not sure if i am supposed to use the higher 192khz though, i don´t know that the card resamples to internally).
And doesn´t matter player or Wasapi etc, the noise is there, but as said, very faint, it´s not like Tape noise, i would probably not be bothered even if an entire movie had this kind of noise.

Resampling - Rounding Errors and Bit Depth.

Reply #31
I'm not sure what you mean by noise in that clip? It sounds fine to me.

My playback setup on Win7 is foobar2k (WASAPI) -> FiiO E7 -> Westone UM3X.

Resampling - Rounding Errors and Bit Depth.

Reply #32
Increase your volume, listen at 4 sec towards the end.
You should be able to hear it.

Resampling - Rounding Errors and Bit Depth.

Reply #33
Can i make one such graph to try the resampler i use?


http://sox.sourceforge.net/

The following command will generate 96kHz (-r 96000) stereo (-c 2) 24bit (-b 24) 8 seconds long sine sweep starting at 1Hz, ending at 48kHz, volume -6dBFS into file sweep.wav:

Code: [Select]
sox -V -r 96000 -c 2 -b 24 -n sweep.wav synth 8 sine 1:48000 vol -6dB



Generating spectrum of the file, Kaiser window, dynamic range -180dB, image stored into spectrum.png:

Code: [Select]
sox sweep.wav -n spectrogram -w Kaiser -z 180 -o spectrum.png



Resampling - Rounding Errors and Bit Depth.

Reply #34
Source and result files in src.infinitewave.ca are at least in 24-bit so 16-bit files in this thread cannot have such a clean background anyway. How about downloading the files in
http://src.infinitewave.ca/faq.html
and send the avisynth results to the webmaster?

Resampling - Rounding Errors and Bit Depth.

Reply #35
Spectrogram for the file uploaded in post #25 (sox 13579.wav --null spectrogram -w Kaiser):



Resampling - Rounding Errors and Bit Depth.

Reply #36
Increase your volume, listen at 4 sec towards the end.
You should be able to hear it.


Do you mean the beeps? There's one at about 3.5s, I can also hear a guitar/bass note at 4s but no noise.

Resampling - Rounding Errors and Bit Depth.

Reply #37
http://www.hydrogenaudio.org/forums/index....howtopic=100951

Noise spectrum of avisynth's resampler (uploaded in post #25 by zerowalker) vs Adobe Auditon 1.5's resampler (convert to 32-bit float before resampling, then convert to 16-bit without dithering)
Red: Audition
Green: avisynth

Resampling - Rounding Errors and Bit Depth.

Reply #38
Increase your volume, listen at 4 sec towards the end.
You should be able to hear it.


Do you mean the beeps? There's one at about 3.5s, I can also hear a guitar/bass note at 4s but no noise.


Oh, i think we are talking about 2 different samples here.

The 8bit at 16bit (which was incorrect, it´s truly 16bit) sample does NOT have noise.
but If i resample it with the resampler i use (which seems to be quite bad, especially on 16bit) there will be noise.

the: 13579.wav sample does have noise, and that´s what i was talking about.
Both before and after resampling.

But it´s very faint, but it´s there, and is probably supposed to be there i guess.

Resampling - Rounding Errors and Bit Depth.

Reply #39
What samples should i resample at 24 bit?
And should i convert it to float before, or let it be?

And from looking at the Versus against Adobe Audition 1.5, isn´t it a bit better, or am i wrong?
And it doesn´t seem to be dithered by Avisynth resampler anyway, as it wouldn´t have those peaks if i understood the Instruction video linked earlier.


And just to confirm the SRC graphs, The less noise (Blue and colored lines) the better, is that correct?
Cause if so, the Adobe Audition CS6 seems to be one of the best, and Zinotope.


Will make when i can, but the site http://sox.sourceforge.net/ is currently blocked.


Resampling - Rounding Errors and Bit Depth.

Reply #40
Both before and after resampling.

But it´s very faint, but it´s there, and is probably supposed to be there i guess.

I see only dither in the original 13579.wav, and I don't think it's possible to hear it. I also doubt that the noise in resampled 13579.wav is possible to hear.

Resampling - Rounding Errors and Bit Depth.

Reply #41
What samples should i resample at 24 bit?
And should i convert it to float before, or let it be?


I wouldn't convert anything at all. 

Instead I would figure out whats wrong with your processing thats causing you to corrupt your audio and then fix that problem. 



Resampling - Rounding Errors and Bit Depth.

Reply #43
And from looking at the Versus against Adobe Audition 1.5, isn´t it a bit better, or am i wrong?
And it doesn´t seem to be dithered by Avisynth resampler anyway, as it wouldn´t have those peaks if i understood the Instruction video linked earlier.

You are not wrong, when I listened to the 13579.wav you uploaded at high volume (which I feel pain), I can also hear noise at the end. From technical point of view (graphs and statistics) the resampler in SoX is even better then Audition 1.5.

Benefits of dithering depend on the singal to noise ratio of the original signal. If the original signal has enough noise and the signal (the rising tone of 13579.wav in this discussion) is strong enough, there is no need to add extra noise (dither) during processing, therefore I disabled dithering in Audition to show that there is no visible truncation artifacts even when dithering is disabled.

I don't know if avisynth can disable dithering, or use less noise, or use different kinds of noise shaping or not, but it is unfair to say a resampler is a bad one because of higher dithering level. A (relatively) bad resampler can show more than 1 bright line in the graph, like Ableton Live 8.2 shows up in the default page of
http://src.infinitewave.ca/
while a (relatively) good one is like Audacity 2.0.3. An extremely bad one is like Secret Rabbit Code 0.1.2 (ZOH) with bright lines all over the graph.

Resampling - Rounding Errors and Bit Depth.

Reply #44
Both before and after resampling.

But it´s very faint, but it´s there, and is probably supposed to be there i guess.

I see only dither in the original 13579.wav, and I don't think it's possible to hear it. I also doubt that the noise in resampled 13579.wav is possible to hear.


Well i do hear it;S
But it´s pretty hard, it´s like it´s at the back of my head.
But i do hear it, right before the Beeping goes to it´s highest point from there to the end.

To hear it more easily, click at about the end of the beep and pause.
Listen carefuly how it sounds, and when you pause, you should here that noise is gone.
What i mean is, it´s not easy to hear at all, but if you compare the sound of the noise to complete silence, it´s easier to hear it.

If the noise was randomly in something, i probably wouldn´t notice it if i wasn´t listening for it.

Resampling - Rounding Errors and Bit Depth.

Reply #45

I see only dither in the original 13579.wav, and I don't think it's possible to hear it. I also doubt that the noise in resampled 13579.wav is possible to hear.

Well i do hear it;S

The background dither noise which is visible in the original 13579.wav is about -100 dB:


So you can NOT hear it in the requested normal listening conditions.
Please download the files and play them directly, using normal volume as if you are listening to a normal song.


If you do hear noise then it doesn't come from the file but there must be something going wrong in your playing chain, as already suggested here:
http://www.hydrogenaudio.org/forums/index....st&p=834855

Resampling - Rounding Errors and Bit Depth.

Reply #46
Okay i compared Avisynths Resampler at both Float to 16bit from 92khz to 44.1khz and at 16bit entiarly against Adobe Auditions, not sure if it works in float or not, but fed it the float and converted it to 16bit and 44.1khz, and the 16bit file and just resampled (i did NOT have dither on. with it, the spectrum was a lot "noisier").

And Avisynth was pretty clear, but it did have a few lines that bent around (not sure what they are called), while Audition just had noise at the part where the audio is and just black afterwards.


And also did a test with the 16 bit at 8 bit file, and it was much nosier at 16bit vs Float to 16bit with Avisynth Resampler.

Resampling - Rounding Errors and Bit Depth.

Reply #47
Try this sample - if you hear anything except dial tones then your playback chain is compromised.

[edit]

Health Warning: play at normal volume as ultrasonics can damage tweeters!

Apologies for omitting this.

[/edit]

lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

Resampling - Rounding Errors and Bit Depth.

Reply #48
Try this sample - if you hear anything except dial tones then your playback chain is compromised.


When posting links to udial, I always preface them with the warning that turning it up too loud can fry or blow fuses in tweeters (as reported some years ago on these foums) thanks to the high amplitude, but inaudible ultrasound, so maintain a normal playback volume and don't apply ReplayGain or R128 Equalizer to the sound.

In fact, I used to have a copy stored in a password protected ZIP file named "udial WARNING may fry tweeters if turned up, password is 'warned'.zip"
Dynamic – the artist formerly known as DickD

Resampling - Rounding Errors and Bit Depth.

Reply #49
Just think that udial is more useful to detect clipping rather than the quality of the resampler itself.