Sample frequency conversion, dithering? Flavio?

When mixdown song is selected and the setting of the sample frequency from 96000hz 16bit, (thats what the tracks are recorded at) and I select 48000hz 16bit as the Sampling Frequency, dither is not checked marked, however when the conversion takes place after the file is created, I see dither is checked marked but grayed out during the conversion process.

Now for the question, is dithering taking place as the file is converted from 96000hz 16bit to 48000hz 16bit?

This is a potential problem because there is no option to stop the dithering process during file conversion. If I apply dithering say in OZONE from a 24bit 96,000hz file down to 44,000hz 16bit, this will cause a crappy output. Double dithering.

PACO

Perhaps a dumb question and certainly off topic, but why 16/96k? You would be doing yourself a favor going 24/44.1 rather than a higher sample rate with a lower bit depth IMO.

Due to previous hardware configurations, I was only able to record stable at 16bit 96,000hz

With improvements to n-track and my own hardware I can now record at 24 bit at 96,000hz, this is not an issue.

The reason for this question is, I use OZONE for mastering, and it does it’s own dithering (ie: sound shaping)

The sample converting process in n-track has no options with some items, like dithering, show a check mark beside it but it’s grayed out. I have been using the dithering part of OZONE but I felt it, n-track, was doing more than it should, effecting the final output too much. I convert from 16bit @ 96,000hz to 16bit @ 44,000hz suitable for CD’s using OZONES dithering, but I feel n-track might be also dithering in it’s conversion to 44,000hz

If dithering happens twice to a master, the output it will mess up the master. Thats why I’m asking if there is any dithering taking place in n-tracks sample conversions.

Incidentally, in my quest to find out why my outputs were not matching what I was hearing through the monitors, I realized that if your original tracks are done in 16 bit, you really don’t need to dither because the whole point of dithering is to create a high quality sample of a 24bit recording in 16 bit format suitable for CD’s. Whether or not dithering should take place on the master output when converting from 96,000hz to 44 or 48,000hz when the bit rate remains the same is not clear. In the master PFD makes no mention of it and the dithering PFD also makes no mention of it. It does however in both manuals clearly state 24bit to 16bit dithering is required and done last with no further modification to the output. It’s the last thing done in the mastering process.


PACO

I read where this one person records at 32 bit / 88.2 khz rate so when he goes to
16 / 44.1 there is no question about where the sample is. Dithering randomizes
the sample selection of (in between) samples.
But I haven’t actually got far enough along to try this yet to see if it makes
dithereing unneccessary.

BTW - I assume if the dithering box is greyed out that N is not
using it. Only because the manual says dithering CAN be used. As in
doesn’t have to be. But it would be nice to know for sure.

Quote: (sevenOfeleven @ Jan. 31 2009, 6:15 AM)

BTW - I assume if the dithering box is greyed out that N is not
using it. Only because the manual says dithering CAN be used. As in
doesn't have to be. But it would be nice to know for sure.

N-Tracks sample conversion window is not accessible, the fact the option is grayed out, one assume it's not an option, but the grayed out part shows it enabled.

As I understand the dithering part, it takes the upper and lower bits and fills them with low level noise to create the CD quality sound from 24bit or even 32bit recordings. In the PFD it says, "good" noise.
----------------------------
From the OZONE PFD
As we take more samples per second (e.g. 44.1 kHz2, 48 kHz, 96 kHz, etc.), we get better "horizontal" resolution, which translates to being able to represent higher frequencies. As we use more bits per sample (e.g. 16 bits, 24 bits, 32 bits, 64 bits, etc.) we get better "vertical" resolution which translates to better "dynamic resolution" (i.e. more dynamic range and/or signal to noise ratio.) In the context of dithering, it is in the "bits per sample" that we're interested.
-------------------------------

The two problems I'm faced with are:
1) Is n-track dithering on sample conversions?
2) Do 16 bit recordings require dithering?

From the above mentioned PDF, it looks like dithering only applies to the conversion of bit rate as opposed to sample rate.

Nevertheless, I was seeing problems with audio quality in dithering my 16bit@96,000hz to 16bit@44,000hz outputs, this could be due to trying to dither 16 bit when it doesn't need it or n-track is dithering when I mix down the audio file resulting in double dithering, which is not recommended. Hopefully Flavio will tell us if any dithering is taking place on mix down sample conversions in n-track.


PACO
Quote: (sevenOfeleven @ Jan. 31 2009, 7:15 AM)

I read where this one person records at 32 bit / 88.2 khz rate so when he goes to
16 / 44.1 there is no question about where the sample is. Dithering randomizes
the sample selection of (in between) samples.
But I haven't actually got far enough along to try this yet to see if it makes
dithereing unneccessary.

32 bit recording doesn't exist. 16 and 24 bit fixed point recording does. Dithering also doesn't "randomize" the sample selection between samples. Lastly, even if 32 bit/88.2 existed, it isn't just a matter of dividing everything by two to down sample and bit depth convert. IMO, unless your target media is DVD audio , SACD or BlueRay (as their native formats) this super high sample rate stuff is a waste of space. You might convince me that it is better in some circumstances IF you have relatively cruddy converters and by pushing the low pass filters way up in the spectrum gets rid of artifacts. However, then you have to consider your down sample alg and whether it is undoing the benefit.


On topic, I have feeling that what you are seeing is a bug in the video code, however, Flavio needs to confirm as adding dither to a file that doesn't need it (simply sample rate converting) is indeed a bad thing.


As for question 2 above... you never ever ever ever ever ever dither when maintaining the same bit rate. However, one must understand that INTERNALLY, the N-track mix bus is operating at either 64 or 32 bit float (depending on what option you have enabled). This means that everything gets converted to 32 or 64 bit float, crammed through the mix bus, and then truncated to the output format of 16 or 24 bit. (Again, depending on what you have chosen). Therefore, you will indeed want to dither at this point. Dither is the very last thing to put in the chain when mixing down.

Sigh, dither such a little understood concept and such a big worry for so many folks that can hardly benefit from it.
Quote:

As I understand the dithering part, it takes the upper and lower bits and fills them with low level noise to create the CD quality sound from 24bit or even 32bit recordings. In the PFD it says, "good" noise.


My understanding is that when you convert sample rate (down) say from 48 to 41,
there are artifacts (usually low level) that are in between sample (voltage)
bit representations. So with no dither, it picks one, which could end up being
a single level or dc i.e noise.

-----------------------------











--------------------------














-------------------------

That's assuming the same bit depth. Dithering adds noise so you get more of
a sine wave from the above. It's still noise, but at that level it's pretty
inaudible. But a low level square wave is audible. And probably contains
harmonics to boot.

But if for example the sample rate is a straight divide by 2 (88.2 to 44.1) and at
the same time you halve the bit depth (32 to 16)
then there is no (in-between) representation of a voltage.
At least that's what the person I referenced earlier claims.

Dither has absolutely nothing to do with sample rate conversion. It is a manner in which artifacts created from bit depth truncation are made less nasty. Perhaps you are thinking of anti-aliasing? This is a whole other concept which is completely different from dither.

Your audio quality difference going from 16/96 to 16/44.1 likely has to do with either cruddy SRC algs, dithering wrong, cruddy dither, or a combination of the above. You are likely really needing to consider the audio as 32 bit float/96k. Dither at an LSB of 2 and SRC to 44.1. Worst case, mix down to 32 (or 64 bit depending if you have N set to use 64 bit) bit float/96 and do the conversion with r8brain.

Quote: (sevenOfeleven @ Jan. 31 2009, 1:23 PM)

That's assuming the same bit depth. Dithering adds noise so you get more of
a sine wave from the above. It's still noise, but at that level it's pretty
inaudible. But a low level square wave is audible. And probably contains
harmonics to boot.

But if for example the sample rate is a straight divide by 2 (88.2 to 44.1) and at
the same time you halve the bit depth (32 to 16)
then there is no (in-between) representation of a voltage.
At least that's what the person I referenced earlier claims.

No. First off, we are confusing fixed bit and floating point systems. Secondly, you cannot ever just halve a bit depth. It doesn't work that way.

I love it when you guys talk dirty like this.

Quote: (Paco572 @ Jan. 31 2009, 10:43 AM)

[quote=sevenOfeleven,Jan. 31 2009, 6:15 AM]The two problems I'm faced with are:
1) Is n-track dithering on sample conversions?
2) Do 16 bit recordings require dithering?

Dithering is useful when converting from a higher bit depth format to a lower one. It is useful when mixing down a song made up of 16 bit recordings because the internal sample format that n-Track uses is 32 (or 64) bits floating point, so when mixding down the 16 bit signal first gets converted to 32/64 bit float, processed with EQ, effects etc., then converted back to the destination format.

Dithering basically lowers the distortion that comes from using a lower bit depth at the cost of adding a slight amount of noise.
Noise shaping moves the noise that dithering has added to a frequency range where humans can't hear it (mostly).

Dithering should be applied as the very last step in the process of creating a digital file to be burned to CD. It shouldn't be used at all if the destination is mp3 or similar format, as mp3 or similar compression will process the signal further thus nullifying the benefits of dithering while you get to keep some of the dithering noise.

That said the dithering checkbox in the sampling frequency box does indeed start as checked. When the sampling frequency is run automatically after a mixdown (if a sampling frequency different from the project default one is selected in the mixdown box) n-Track will automatically start the conversion without letting you adjust the sampling frequency conversion settings, and will thus always use dithering.
I will fix this in the next build of v6.0.3. The dithering+noise shaping settings in the sampling freq. box should mimic the ones set in the mixdown box, i.e. if you the mixdown requires a sampling frequency conversion and you selected dithering/noise shaping in the mixdown box, dithering/noise shaping should _not_ be applied to the mixdown but only to the sampling frequency conversion. Currently if you enable dithering in the mixdown box and you select a non-default sampling freq.
you'll indeed get double dithering.
If you want have the maximum control with the current version of n-Track, don't enable dithering and leave the default sampling frequency, mixdown to 32/64 bit (the same format used for mixing, as set in the Settings menu), then manually convert the sampling frequency with the "File/Convert wave file/Change sampling frequency" command, use dither+noise shaping and set the destination bit format to the desired one (16 bit for CD).

Flavio.



Yup - I blew it.
Was thinking about two different things.
The article I was thinking about was indeed bit-depth related (24 to 16) and
was refering to reverb tails that would get truncated without dithering.
My apologies.

This dither pdf is pretty good and easy to understand.
Should have re-read it before I posted.

dither explained pdf

(right click / save target as)

I thought I was loosing my mind, I guess not. Thanks Flavio for explaining it to us.

As a side note: will the EQ windows sizing/set mentioned earlier in features request be in v6.0.3? Just wondering,

Thanks
PACO

Quote: (Paco572 @ Feb. 01 2009, 10:45 AM)

I thought I was loosing my mind, I guess not. Thanks Flavio for explaining it to us.

As a side note: will the EQ windows sizing/set mentioned earlier in features request be in v6.0.3?
Just wondering,

Thanks
PACO

At this point no new features will be added to v6.0.3, sorry, just bug fixes until the non-beta version.
The "restoring of EQ windows" + "double click on EQ knob on mixer -> set EQ boost value" will be in v6.0.4.
I've created a Roadmap page that that lists new features planned for upcoming versions (it's very tentative, I will update it as new features are added or changed).

Flavio.