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: Dither and silence (Read 5179 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Dither and silence

ok,

this is sort of a support question so it's here.

The problem is as follows,
I used MPC (-xtreme) for some rare records back in my old HD, and now I'm using Foobar to transcode them for my portable. MPCs being lossy benefit from dithering, so I'd like to use it. however when dither with strong ATH noise shaping is used the dither noise is added even through digital silence so it:
Adds some bitrate
keeps me from using MP3Trim or similar apps for killing the annoying gaps that were in the original discs.

So, what do you think about this..
is the dither algorithym supposed to add noise even to digital silence? (I think so, just double checking)


What should I do?
Should I input Lame 24bit data and turn off the dither?

Thx for your time...
"You have the right to remain silent. Anything you say will be misquoted, then used against you."

Dither and silence

Reply #1
Try to use the gap killer DSP  for fb2k from http://fb2k-plugins.hydrogenaudio.org/DSP.html and see if it fits to your needs.

Yes, dither is added to ANYTHING that comes through fb2k's 'decoding-processing pipeline', including digital silence.

Dither and silence

Reply #2
If you are going to post-process the output of FB2k, flat (no noiseshaping) or triangular noiseshaping are recommended. ATH noiseshaping is not recommended in these cases. ATH ns. is recommended just as a final step, or in other words, just when you are listening to your audio files.

Dither and silence

Reply #3
hm...
seems like I better disable the dithering.
I prefer to loose a small amount of range (which is worthless because I'll use a 24bit temp file) than bearing the 3 seconds of silence between tracks.

Thx anyway
"You have the right to remain silent. Anything you say will be misquoted, then used against you."

Dither and silence

Reply #4
Ok, but that noise is at -94 dB below full scale (16-bit output), so I doubt you can hear it under usual listening conditions.

The thing is this: when there's music playing, dither solves some problems, but there's noise also when there's no music playing. Not using dither, there will be some small problems when music is playing, but also pure silence when there's not music playing. So pick your poison.

But, another possibility that overcomes all these problems is to output 24-bit wavs, and then convert them to mp3. Here, you can use dither (flat would be best idea) or not use dither at all. To dither or not to dither won't make a difference in practice, due to the low quantization noise or distortion of 24-bit audio.

Dither and silence

Reply #5
Quote
Ok, but that noise is at -94 dB below full scale (16-bit output), so I doubt you can hear it under usual listening conditions.

I know, but it cannot be removed automatically with MP3trim
"You have the right to remain silent. Anything you say will be misquoted, then used against you."

Dither and silence

Reply #6
Ah, if you're need to automatically remove silence with MP3trim, then yes, use convert using 24-bit with no dither to guarantee digital silence exists in the end-of-track silence, and will also encode at 32 kbps under LAME APS. Dithered silence might just encode at 128 kbps if Lame decides it's not digital silence.

You can use foo_clienc and pass 24-bit data to Lame. I think that's how the LAME presets in the latest foo_clienc work already, even without specifying the --bitwidth 24 option in the commandline.

Dither and silence

Reply #7
hmm....
foo_clienc....

nice...
"You have the right to remain silent. Anything you say will be misquoted, then used against you."


Dither and silence

Reply #9
I don't think Lame can accept floating point input, but why not try it by outputting a PCM WAV in floating point (i.e. it had a header to say what format it is) then trying to encode it in Lame. 32-bit float, however, has a 23/24-bit mantissa, so it's not much advantage.

Anyhow 24-bit fixed point has a theoretical noise floor lower than any audio electronics, so it's already overkill (it's just a multiple of 8 bits, and it's the one above 16 bits, which is why it's used).

I think the direct foobar lossy encoders (foo_mppenc and foo_vorbisenc) do take the native 64-bit floating point that's used internally through the FB2K signal path, though Case would know for sure (or you can read the source code)

Dither and silence

Reply #10
actually Lame could be fed with 32bit longs (Fixed Point), however since the option to write them wasn't added to the diskwriter until 0.667, Foo_Clienc does not list it on the resolutions box.
"You have the right to remain silent. Anything you say will be misquoted, then used against you."

Dither and silence

Reply #11
I just noticed weird thing with dithering. Both Triangular noise shaping and Strong ATH noise shaping in playpack produce about -50dB (+-7dB) noise acording to my MD-player level display. I don't know how precise the scale is, but still it's not even close to -90dB. Without dithering the noise level drops verry mutch beyond MD-player (max -60dB) scale.

Output data format: 16bit fixed-point.
Hardware: SB Libve! using S/PDIF out.

Dither and silence

Reply #12
Very strange. Flat dither should produce a noise around -94 dB *below* full scale. I don't remember if I have measured this with last (0.667) version, but I think it will be this way.

Your Live card will resample all 44.1 KHz signals to 48 KHz even using the digital output, and maybe will increase a little bit this dither noise. But -50 dB is too much, by far.

Maybe your MD recorder uses some kind of AGC (automatic gain control) so that it amplifies low-level signals and attenuates high-level signals?

Try with diskwriter and analyze the results, in all tests I've done it produces exactly same output as realtime playing, verified using bit-perfect digital recording.

Dither and silence

Reply #13
Quote
Very strange. Flat dither should produce a noise around -94 dB *below* full scale. I don't remember if I have measured this with last (0.667) version, but I think it will be this way.

I converted one song with silence in the midle with foobar2000. One dithered and one undithered 16bit PCM WAV. I opened both wav files in SoundForge and cut of begining of the song to poin where silence should begin and after 20sec from that i cut the end of and saved both files. I packed them with FALC and i put them in web if you like to hear them. SoundForge gives me same result as my MD player.
dithered sample
undithered sample
Quote
Your Live card will resample all 44.1 KHz signals to 48 KHz even using the digital output, and maybe will increase a little bit this dither noise. But -50 dB is too much, by far.

I'm using 48kHz 64bit slow resampling just because i use S/PDIF out.

Dither and silence

Reply #14
Well, I downloaded the samples, and what I can see is that the dithered sample has been dithered with strong ATH noiseshaping dither. The noise is around -71 dB below FS (not -50!!), which is the right value for this type of dither. The -94 dB value is for flat (no noiseshaping) dither. For triangular noiseshaping dither, the value should be around the high -80s or low -90s.

Dither and silence

Reply #15
Quote
Well, I downloaded the samples, and what I can see is that the dithered sample has been dithered with strong ATH noiseshaping dither. The noise is around -71 dB below FS (not -50!!), which is the right value for this type of dither. The -94 dB value is for flat (no noiseshaping) dither. For triangular noiseshaping dither, the value should be around the high -80s or low -90s.

So i will use no noiseshaping ater now? No noise shaping looks kind a better than strong ATH.
Thank you for helping me.

Dither and silence

Reply #16
Noise shaping increases the _total_ noise level to _decrease_ the _audible_ noise level.

Dither and silence

Reply #17
Quote
Noise shaping increases the _total_ noise level to _decrease_ the _audible_ noise level.

I don't quite get it. Why does the _audible_ noise level decrese if total noise level is increased? Has this been discussed before or could you explane it to me?

Dither and silence

Reply #18
Using noiseshaping the total amount of noise is increased. However, this noise is spectrally shaped so that most of this noise is at high frequencies where it is less audible. At medium frequencies, where our ear is most sensitive, the remaining noise is lower than in the case of flat dither.

So, the audible effect is that there is less noise.

Anyway, my advice is that you are going to record the output of fb2k to MD, use flat or triangular noiseshaping. ATH noiseshaping is advised just as a final listening step, but not when you are going to process further (compress for example) this output.