SynthMaker

About bit depth and dithering

Archive · 2008 52 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

Tzarls ·

Hi. I read somewhere in this forum that audio in SM is handled at 32 bit floating point. So, as long as the host send its audio at anything below that, there´ll be no problems, right? (protools, by the way, and AFAIK, uses a 48 bit fixed pint signal path).

But what happens at the other end? If SM delivers its signal at 32 fp, but the host works at, let´s say, 24 bits, there will be truncation happening. And such a situation could happen when creating and using a standalone version of a synth if the synth delivers audio at 32 fp and my card´s driver receives at 24 bits - in that situation, when truncation happens, one should consider building a dithering module, to compensate for any cuantization induced noise.

So, what´s the real situation with our bits when entering and leaving SM?

matti ·

Do you know of any VST host program that doesn't use a 32bit floating point mixing engine? Usually you should bother with dithering only after all the mixing is done. So no need to do it for every plugin.

infuzion ·

matti wrote: Do you know of any VST host program that doesn't use a 32bit floating point mixing engine?

I wonder if you have 2 effects in Ableton Live that are set to "High resolution" (64bit SSE2+) next to each other, the previous sends audio to the second in 64bit audio?

There were VST programs before everyone went SSE, thus 40bit floats or ints. But I do not know if the VST spec calls for audio data to be transfered as 40bit, 32bit, what have you.

TomC ·

Tzarls wrote: Hi. I read somewhere in this forum that audio in SM is handled at 32 bit floating point. So, as long as the host send its audio at anything below that, there´ll be no problems, right? (protools, by the way, and AFAIK, uses a 48 bit fixed pint signal path).

But what happens at the other end? If SM delivers its signal at 32 fp, but the host works at, let´s say, 24 bits, there will be truncation happening. And such a situation could happen when creating and using a standalone version of a synth if the synth delivers audio at 32 fp and my card´s driver receives at 24 bits - in that situation, when truncation happens, one should consider building a dithering module, to compensate for any cuantization induced noise.

So, what´s the real situation with our bits when entering and leaving SM?

In theory you're right, but from a practical point of view there's no problem. 32 bit floating point has 1 bit for sign, 23 bit base and the rest is exponent. In 32 bit audio, you almost always have values between -1 and 1, so the additional range from the exponent doesn't get used. And the 23 bit base is (more or less) the same as in 24 bit fixed point arithmetic.

Besides this, dithering should only be made once at the end of the signal chain. If you do any further processing AFTER the dithering its effect gets lost. And don't forget each dithering (if done right) introduces about 10 db of additional noise, so you wouldn't want to do it too often.

Tom

matti ·

infuzion wrote: matti wrote: Do you know of any VST host program that doesn't use a 32bit floating point mixing engine?

I wonder if you have 2 effects in Ableton Live that are set to "High resolution" (64bit SSE2+) next to each other, the previous sends audio to the second in 64bit audio?

There were VST programs before everyone went SSE, thus 40bit floats or ints. But I do not know if the VST spec calls for audio data to be transfered as 40bit, 32bit, what have you.

I forgot to say "atleast 32bit mixing engine..".

But what is this talk about 40bit floats? There's only 32 bit "floats" and 64 bit "doubles". Nothing else. The 48bit resolution in some Protools stuff comes from the fact that the plugins are run on a dsp-card that has a double precision compared to the 24bit output. So 24*2 = 48. Also the 80 bit precision that you might see mentioned somewhere is the internal precision of the x87 FPU unit. Usually compilers round the figures back to 64 bit after every operation, so it's not fair to say it would be doing all the math in 80 bits.

And no. Everyone hasn't gone for SSE. Most of the plugins and programs don't have SSE used in them.

Disco_Steve ·

Dithering 'spreads' quantisation distortion, by adding noise with the right (triangular) distribution and level to the signal just before quantisation.

An excellent dither algorithm will add just the right amount noise as to 'remove' the quantisation distortion, this means that added noise is only added to the LSB (least significant bit) (as this is where the quantisation noise arises).

So an excellent dither will only add ~5.7dB of noise to the signal.

The reason for doing this is because, research has shown that the ear is very good at picking up distortion but not very good at picking up board band noise.

the noise added by the dither algorithm can be 'shaped' in the frequency content, with what can be thought of as an IIR filter, with noise shaping the 'noticiability' of the noise can be reduced (reduce 3.3K at 10K add bass, and top). This makes the added noise psychoacousticly quieter.

The ear can 'hear' 45db of dynamic range 'instantaneously', however the ear (by which I mean ear and brain combined) can average over time and slowly be able to hear details as far as 120db apart!! ie the ear has a maximum dynamic range of 120dB!

This corresponds to 20bit recording.

SONY invented supper bit mapping, this adds noise just like other dithers, however the sound of the noise is like that of the signal quieter than the quantisation level, in other words, the Supper bit mapping dither noise actually sounds like the lost signal due to quantisation, this psychoacousticly adds about 24db (4 BITS) (debatable) to the actual SNR of the medium, so with a 16 bit recording with supper bit mapping the cd will sound as good as possible, (and to the ear if heard through perfect speakers, in a perfect room with a perfect DAC etc. would sound no different from reality, the ear wouldn't be able to tell the difference, between the sound from the speakers and ‘real’ sound.)

SO after all that do we need to dither 24 bit sounds? YES!!!!

if one does an fft to a non dithered sine wave quantised to 24 bits, one finds that the peaks in the added harmonics are above -120db, (ie audible), however if one dithers before quantising to 24Bits the harmonics (and noise) is well below -120dB, thus inaudible.

However if this dithered 'noisy' audio is increased in gain at say, the mastering process, the added noise could be brought into the audible range (within -120dB). For this reason it is advised to leave all dithering until the very end.

So if we are only going to dither once at the end, how do we stop hearing the quantisation distortion? answer; use double precision maths (64bit float = 48bits of mantissa, 16bits of exponent), this way all distortion will be inaudible and when supper bit mapped by the mastering engineer at the end of the project, all that will be left is ‘perfect’ zero distortion sound, (due to math processing) when heard by a human ear.

Hope that helps and didn’t bore you all to death Steve

Tzarls ·

I was under the impression that you have to apply dithering every time you had reduction of bit depth. Yes, dithering noise is cumulative, but so is cuantization distorsion.

In practical terms, do we have to worry about this issues when building a synth using SM? I don´t like to leave such details to lady luck - I prefer to know the facts.

Disco_Steve ·

when it comes to doing dither in a plug-in, I have given the user the option of turning dither on or off, this way they can decide whether the accumulative noise is better than the distortion. as I have no idea how much gain is going to be added to the signal path after the plug-in. however I have only dithered on the output, (and used double math where I can). simply because cpu is to great if you dither at every stage. fortunately in most cases, only one set of maths actually changes the signal ie in a compressor or limiter, the gain reduction envelope mult with the input signal.

but for a multi-band compressor I used double math for each band and again for the summation, after which dithered.

I would post my dither algorithm, however its not quite right and needs a bit more work. I have exams now 🙁 so wont be posting for a while sorry.

aliasant ·

Would love to have a peak at your dithering algo. I use dither in my compressors. But only on the sidechain to "oversample" the signal. I havnt done any actual metering but I think it sounds better and it should... I think.... Been 8 years since Sound Engineer school... 😉

Disco_Steve ·

Okay I'll post what I've got so far when I get back to uni

Tzarls ·

Great! 🙂

infuzion ·

Disco_Steve wrote: ...Hope that helps and didn’t bore you all to death

No, actually it was very informative, thanks Steve! It belongs in a mag, like Computer Music or something.

aliasant ·

infuzion wrote: Disco_Steve wrote: ...Hope that helps and didn’t bore you all to death

No, actually it was very informative, thanks Steve! It belongs in a mag, like Computer Music or something.

Agree 101%

Disco_Steve ·

😊

peterv ·

aliasant wrote: infuzion wrote: Disco_Steve wrote: ...Hope that helps and didn’t bore you all to death

No, actually it was very informative, thanks Steve! It belongs in a mag, like Computer Music or something.

Agree 101%

Agree 110%

Disco_Steve ·

I was doing the algorithm right just needed a better way to test it.

set the bit depth to something low, but not too low (eg 4bits) and play a sine wave, hear how it sounds so distorted.

now turn on the dither and hear how the ear cant hear the distortion any more.

the noise is a touch obviously repeating, so make the noise longer. 60,000 samples should make it very hard for the ear to tell.

steve

Disco_Steve ·

this one also has noise shaping which follows the IEEE noise shaping standard, however I have truncated and windowed the filter to 10 points to save cpu, I think this shaped noise is louder, what do other people think?

also note that the filter adds 25db of top so when you set the bit depth to 4bits there isn't enough dynamic range to describe the dither noise!

so only use the shaped noise for 8bits and greater

aliasant ·

I was trying to cancel out the noise but didnt really succeed.

I did some changes though. The idea is to treat the noise the same as the noise + osc and then invert it and add it. That way only the osc would be left. Like balanced cables.

Disco_Steve ·

that type of dither is called subtractive dither, its perfectly valid, to get better results don't quantise the noise in the noise canceller section also I don't think the noise you use is good enough (it's very important).

try this

ps for subtractive dither you need to use noise with a rectangular distribution (as you had), I have edited the noise gen to be rectangular for this example.

note that the noise left behind requires greater resolution than the quantisation level, so for 'real world' dithers this is not very useful. and the additive dither example should be used.

aliasant ·

Trying to get my head around this but theres to many questions 😉

1: What is the difference between your noise and the one I used? I can hear a difference. Yours sounds much smoother except the ugly loop. I zoomed in on them and they look different but its hard for me to say what the difference is. Mine had more soft transitions maybe. I did remake the noisecode I had so that it only worked in neg as yours.

2: Does it matter that it isnt real noise but a loop? Example in delays or other feedback effects.

3: What would be your suggestion if I said I want the noise to raise the resolution inside a compressor. I would add the noise in the beginning of the signal chain and then add it inverted at the end or?

Disco_Steve ·

for a dither to work, each sample of added noise must have nothing to do with the next sample, and in the case of shaped noise it must follow Jensen's theorem.

your noise generator, uses a random number, which is updated 25 times a second, this random number is then put through a cyclick simple piece of code, which generates 'new' random numbers from the original. then to limit the random numbers to within a usable range the noise is clipped.

all in all each sample is related to the one before and isn't very random, and so doesn't make a good dither noise.

however mine is very cyclick and so is also naff, if the noise array is made really long I find it works okay, also the dither noise at high bit depths will be so quiet that you wont be able to hear its cyclick behaviour very easy.

I'm not sure what you mean exactly about 'raising the resolution' I assume you mean in a similar way to how the interpolated delay works?

the best thing to do is to properly oversample, there is an excellent thread on the forum about it, with example code. if you are working at 44.1KHz be waned though as you really need to oversample *8 to be able to catch all the inter sample peaks and remove all the aliases and thus sound really beautiful.

infuzion ·

Disco_Steve wrote: The best thing to do is to properly oversample, there is an excellent thread on the forum about it, with example code. If you are working at 44.1KHz be waned though as you really need to oversample *8 to be able to catch all the inter sample peaks and remove all the aliases and thus sound really beautiful.

So, a 96KHz SR needs about *4 oversampling? Might as well run the DAW at 96KHz then...

aliasant ·

Disco_Steve wrote: all in all each sample is related to the one before and isn't very random, and so doesn't make a good dither noise.

Aah. ok. That makes sense. What if I remove the seed/rand input and set a static number instead. Would that make a better noise?

Disco_Steve wrote: be so quiet that you wont be able to hear its cyclick behaviour very easy.

But what if you use say 20 plugins with this dither in, both on tracks and the master bus, wouldnt they add up since they all use the exact same noise?

Disco_Steve wrote: I'm not sure what you mean exactly about 'raising the resolution' I assume you mean in a similar way to how the interpolated delay works?

Yes. Something like that, maybe. Not quite sure how that works.

Disco_Steve wrote: the best thing to do is to properly oversample, there is an excellent thread on the forum about it, with example code. if you are working at 44.1KHz be waned though as you really need to oversample *8 to be able to catch all the inter sample peaks and remove all the aliases and thus sound really beautiful.

I have tried oversampling with Andrews method and I never got a good result from it. Instead I have been using a kind of rms algo I made. It really smoothes out the aliasing but I wouldnt mind a good dither algo to help making it sound even better. About sampling rate. My plugs works all the way up to 192kHz but since many works at 48kHz oversampling x8 is not really a god option.

Disco_Steve ·

I 'calculated' the *8 oversample amount based on the flowing logic.

take a half sample rate sine wave and set the phase so that the peak of the sine is half way between the closest samples. how much higher is the peak than the samples?

answer 3db.

so a limiter, limiting at this sample rate would limit the sample to 0db but the peak of the sine wave would be +3!! this will thus clip at the DAC and sound less than beautiful. so to stop the inter sample peaks from ever clipping, the gain needs to be turned down by 3db's!

so if you oversample by a factor of two (with the same sine wave, but readjust the phase) how high is the inter sample peak now? 0.7db (-20*log(sin(PI()/2-PI()/4*Over sample level) wow lots better, so even an oversampling factor of two will allow one to turn the gain up by 2.3db!

4*=>0.17db 8*=>0.042db as you can see, when oversampling at 8* the attenuation required to stop inter sample peaks from clipping is so small that its not worth worrying if your limiter will be louder than someone else's.

now what happens if I start at 96KHz? that same sine wave we started with, will be a lower fraction of the sample rate, and thus will require less oversampling to ensure any frequencies in the audible sonic spectrum will never clip. so as infusion said 4* is fine for 96KHz sample rate.

Your comment aliasant about multiple plug ins is a very good one, so I Have come up with this

the noise gen is indexed in a way that I think should produce random noise to a human ear.

no set of noise samples happens within 50ms of each other, (so the will be no apparent tones) alternate samples are switched back and forth so that no same block will appear in human memory. Its not perfect but its close.

also I have subtracted one from the bit crusher, is this more or less corect than before? I've got myself in a muddle

Disco_Steve ·

criky I like long posts don't I! 😀 😊

aliasant ·

Disco_Steve wrote: criky I like long posts don't I! 😀 😊

Indeed you do 🙂

Nice little FIR thing. Gonna have to dissect that one. The noise looks good. But its quite slow. That index is about 87 cycles. Can it be hopped?

Update: No It cant be hopped. Tried packing it but that didnt work either. I sort of knew that it couldnt be hopped but I had to try it. Packing though I thought should work.

Sounds good but uses about 167 cycles.

Disco_Steve ·

I WANT YOUR CPU!

on my p4 it takes 389! (noise maker only)

this has been optimised, there might be more one can squeeze out of the code, I'm quite a newbie to ASM.

this noise gen is now 225 cycles

with the entire dither taking about 680 cycles, i've saved 100 but its still far to many? 🙁

matti ·

This is a great example of how dithering works and affects the sound. Great job! 🙂

Disco_Steve ·

I thought so too 😀 Thank you matti.

sunsynth ·

A great 'little' late XMas present Disco_Steve!

Keep on doing 😉

cheers, Walter

Disco_Steve ·

thank you sunsynth 😀 I'm still a touch worried about the -1 I've added to the quantisation level on the bit crusher, does anybody know which is right?

infuzion ·

Disco_Steve wrote: ...With the entire dither taking about 680 cycles, i've saved 100 but its still far to many?

Yes, & the cycles don't count that Selector inside the index-maker you have bouncing several times a second also eats up CPU that don't count as "cycles" in the CPU Cycle Analyser v1.5. You might want to figure out a different approach with out using a Selector.

How much is 1 OSC in your CPU? IMHO, a ditherer should be no more than 2 OSCs, & really barely more than 1 OSC, since you are just making noise, double checking for repeating sequential numbers, then adding it to the audio? So perhaps there is a better overall approach?

But for now, here is your ASM optimised, saves 7 or so cycles on my AMD64 Warning: I have not tested if this gives equivalent output to the original Code.: streamin seed;streamout index; float oldseed=0;float seeddiff=0;float gap=10000; float F1=1;float F0=0;float FM1=-1;float F65534=65534; int ABSMASK=2147483647; movaps xmm0,seed; movaps xmm5,xmm0; movaps xmm7,seeddiff; subps xmm0,oldseed; movaps xmm6,gap; andps xmm0,ABSMASK; cmpps xmm0,xmm6,6; andps xmm0,xmm7; movaps xmm2,xmm7; cmpps xmm2,xmm6,2; andps xmm2,index; addps xmm0,xmm2; movaps xmm1,xmm0; cmpps xmm0,F65534,1; addps xmm1,F1; andps xmm0,xmm1; movaps index,xmm0; movaps xmm2,xmm7; cmpps xmm2,xmm6,6; andps xmm2,xmm5; //,seed; //movaps xmm7,seeddiff; cmpps xmm7,xmm6,2; andps xmm7,oldseed; addps xmm2,xmm7; movaps oldseed,xmm2;

This only saves 2 cycles: streamin in1;streamin in2; streamout index; float F0=0; float F1=1; movaps xmm0,count1; movaps xmm1,F1; //count1=count1<=0&1; cmpps xmm0,F0,2; andps xmm0,xmm1; subps xmm1,xmm0; //count2=1-count1; mulps xmm0,in1; //in1*count1 mulps xmm1,in2; //in2*count2 addps xmm0,xmm1; movaps index,xmm0;

Should be faster: streamin in;streamin level;streamin nlevel;streamout out; movaps xmm0,in; minps xmm0,level; maxps xmm0,nlevel; movaps out,xmm0;

If you merge all ASMs into one block, & optimize a tad more you will save about 10-20 more cycles.

Disco_Steve ·

I've added infusions upgrades, uses 650 cycles now on my machine (hole lot-flat dither)

2 oscs take 520 cycles on my machine so 100 more needs to be saved to meet infusions target. any other ideas? but the vsti example takes 630, so only a little more needs to be saved before its bearable.

sunsynth ·

Hope you don't kill me 4 this:

I have a very big project (http://www.justmix.biz) with mono4's only... I had no inter sample peaks before using this baby 🙂 but: If i switch shaped on then i get them above -0.1 dB 🙁 (even in prev. versions)

btw: i use X-ISM for testing...

Walter

Disco_Steve ·

no that makes sence, I don't think the noise is perfect yet, and noise contains frequencies which weren't there before so will cause inter sample peaks. the shaped noise also has lots and lots of high frequencies so will cause lots of intersample peaks.

are you getting these peaks without making any notes on the synth or only when the synth is playing? can you explain more?

sunsynth wrote: Hope you don't kill me 4 this

Am I really coming across as that much of a t*at?

sunsynth ·

No no... i'm just kidding 😉

Input was a full maximized Disco-Audio-Stream 🙂

infuzion ·

Disco_Steve wrote: Any other ideas?

I'm thinking you may need a different algorithm. There must be another way. But if there is not one, you still haven't implement all my suggestions...

Disco_Steve ·

the optimised switch you made, I re wrote, now only 4 cycles, the clip was changed and the index maker to your impressive asm. I assume you mean to pulling it all together and removing the selector? my plan is to do all that when the noise is better, a

infuzion wrote: different algorithm.

is needed. I've got some Ideas but cant implement them today. have a great new years everyone, Steve

Disco_Steve ·

I think I've done it? (THINK) all the comparisons happen within the green data (without a selector) this also takes less cpu (and sounds better) happy new year everyone steve

aliasant ·

Disco Steve. Why not change name to Dither Steve ?

Excellent algo I think.

I noticed that if I subtract the shaped dither noise from the bitcrushed signal I get rid of the shaped noise. Is that ok to do?

Uploaded the file so you can see it yourself.

Disco_Steve ·

dither isn't a place to party. which is a pity as I'd be cool at a dither party 😀

I don't know this for a fact, but I think your discovery is proof that the shaper works correctly! good work Aliasant!

as I said before, subtractive dither isn't that useful a technique in the real world as the remaining signal needs more bits than the storage medium has to describe it. but is perfectly valid. subtractive dither should also use 'rectangular' noise, not triangular.

I'm glad you like my algo, Steve

Disco_Steve ·

this is a neat test; 'break' the dither so that the noise is added after the quantiser and see how the quantisation distortion is still present. this is a great way to see how adding any old noise isn't good enough, but also shows how signals cant be 'un-quantised' by adding noise. (even 'correct' noise)

with this, one should see that this dither algo only really works above 24 bits as 'normal floats' have already been quantised to 24 bits. (mentesa). (so for normal floats, quantise to 22 bits or less at the final stage, which is just past the limit of human perception, and allows for 30dB of gain to be added to the signal before the added dither noise will be heard on a 16 bit cd. I also recommend using flat dither for bit depths greater than 16, as the shaped dither gives less available gain increase before it will be heard on a 16bit cd)

however for you perfection heads, I have included an extra double precision quantiser, use this as the note states within the module, and your sound should be able to utilise all 24 bits of digital lovelyness.

steve

sorry I just love long posts! for all you SMers who actual mix music, the middle paragraph brings up another useful point. When bouncing a track down ready to be sent to the mastering engineer. Make sure you wont want to add more than 30db's of gain to make the song as loud as you need. if so, you need to change your gain structure before you bounce, so that the dither you add to 'linearise' the signal before it goes to the mastering engineer, wont be heard when quantised to 16 bit. however, if you feel the need to add a limiter before you bounce, please only increase the gain so that less than 30 dB's more will be needed to make it loud enough, don't limit it to poo, so that the engineer has something to work with 😉 (as you can probably guess I'm a (part time) mastering engineer.)

this also brings up the question; how many parts can one have all with flat dither noise (originally quantised to 22 bits) before the noise will go above the 16 bit threshold? A) 22-17= 5 ; 2^5=32; so 32 parts all playing at once will produce noise which could be heard on a cd. this is ample. however if you feel this isn't enough after dithering to 22 bits divide by 4; why, I hear you ask? well any multiply or divide by 2 doesn't (in this case) cause no quantisation error. as the lsb of the 32 bit float isn't 'active' so by dividing our signal after quantising to 22 bits by 4 will put the lsb of our signal on the lsb of the float, without any math error, hence lowering the noise level and increasing the part count by 4 up to 128 parts! however the peak of the signal is also lower and will thus require 12dB's gain boost AT THE END, once all the mix is done. this is obviously not that practical a 'solution', double precision maths is (allowing 24 bit dither to work giving 128 parts). but it is a solution to the part count problem just the same.

Andrew J ·

Steve, I presume that if you're looking at getting a track mastered that you'd advise to leave dithering to the mastering engineer?

Disco_Steve ·

I would recommend dithering, definitely dithering, when sending the track to the mastering engineer. but dithering only once, with flat dither, set to the highest bit rate possible (22 in this case (using normal floats)) but ensuring that (before the dither is added) less than 30db's of gain will need to be added by the mastering engineer. before (he/she) adds his dither (most likely shaped pow3 or supper bit mapped).

because

any analogue processor the engineer uses will be sourced from a DAC sourced from the supplied file, and will thus contain the quantisation distortion harmonics due to not dithering, these will change the way the eq's, compressors and limiters will behave.

for example, an eq could be used to add top end to the sound, this will also increase the distortion harmonics present in the boosted region, hence producing a sharp painful 'digital' sound, however if the signal was dithered, only a change in character of the noise would occur, sounding very 'analogue', smooth and pleasant.

any digital processor the mastering engineer uses will perform operations on the lbs, thus if the lbs contains un-dithered quantisation distortion, the processed sound will be digital and nasty, but a dithered lsb will sound smoother noisier, but smoother.

the worst effects happen when an expander is 'needed' as the quantisation harmonics are increased with the their parts, and the ear latches onto the distortion much more than at any other time (I've found).

even the best sound cards only have an snr of about 120dB so the dither noise (at 24 bits) is not even heard over the thermal noise!

also whenever I receive a pre master with dither I get the impression the client knows, and cares more about the sonic quality. instantly putting me in a good mood.

sorry another long post 😊

aliasant ·

Love your posts Disco. Very educating.

Something I was wondering about. You say its good if the audio gets dithered once before going to the mastering eng who will convert it from digital to analog, do his magic and then convert it back to the final digital media with a second high quality shaped dither.

Is that right?

Also that the first dither should NOT be shaped?

I know many try to do some kind of mastering them selves using the digital plugs they have. I know. It is very hard for them to get a sound even remotely close that what a good mastering angineer can but still. They do it. Its cheap and fun. Even though most of the times the tracks sounds even worse after their little mastering attempt 😉

Anyways. People do this. And when they do. Should they still dither it to the highest possible before they start the "mastering" ?

Most hosts use 32bits internally I think. Its tempting to thing that one could stay in 32 bits without dither sand just master away and then do one final bounce down to 16 with shaped pow3 dither. But I think maybe it is better to first dither it down as you said. Or?. This part is a bit confusing.

Lets try to make it simpler. At least for me 😉 Lets say Im in my 32bit host and Im about to bounce the whole mix into 1 file that Im going to send to you. What format and what dither? My guess could be 24Bit 48kHz 22bit dither?

Should I use the same if Im about to master it myself in the same host on my machine?

I DONT like long posts. My fingers ake....

TomC ·

aliasant wrote: Love your posts Disco. Very educating.

Something I was wondering about. You say its good if the audio gets dithered once before going to the mastering eng who will convert it from digital to analog, do his magic and then convert it back to the final digital media with a second high quality shaped dither.

Dither for DSP developers (short: DSPD) and audio engineers (short: AE) in a nutshell:

AE: don't worry about it. Record your talent at the desired sample-rate/bit depth, mix it at this sample rate/bit depth as close to the final sound as you can and give it to a experienced mastering engineer. He's most probably got better ears and a better listening environment than you ever will have. Just believe me here. If (and only if) you can't afford a mastering engineer and do the mastering on your own do the downsampling (if necessary) to the final sample rate/bit depth and dithering as the very last step. Use r8brain for this! It's one of the best software sample rate converter available and the free version does almost everything you'll ever need. Don't even think about trying use your own little dithering program, it won't be better. If you don't believe me ask any AE of your choice.

DSPD: don't worry about it, either. In almost all cases you won't hear a difference, especially if your only worries are that the bit-depth of your VST host might be different from that of your plug-in. It's not worth the hassle. If you REALLY feel like it or do bit-depth conversions in your plug-in anyway you should apply dithering when you downsample. You'll increase the noise floor, but you hopefully know what and why you are doing. But keep in mind that if ANY further processing follows your dithering you need to implement a Triangular Probability Density Function (TPDF) for dithering, but that's actually easy to do and not very CPU intensive. DON'T use colored dither like a mastering engineer would do! The noise floor would be less, but any further processing would introduce MUCH more aliasing than you originally wanted to remove.

That's all. Nothing more to say here. And if you don't believe me just try everything on your own before you'll come to the same conclusions

Tom

Disco_Steve ·

Hi tom, have you tried the dither algo in this topic, it uses TPDF noise (very close to) just as you state.

I agree with you almost entirely, however;

TomC wrote: ... do the downsampling (if necessary) to the final sample rate/bit depth ... as the very last step. Tom

changing sample rate often increases the peak amplitude, so sample rate should be lowered within the limiter, like the weise one used by most MAE's. if SR is reduced post limiting, clipping will most likely occur. if your limiter doesn't offer down sampling, down sample before the limiter, (post everything else) and use a limiter with built in internal up-sampling as to catch all those inter sample peaks, and reduce aliasing. (note waves limiters don't oversample!)

thank you for backing me up on the flat noise thing, and your totally right about r8brain, brill plug.

Andrew J ·

Thanks for articulating that Tom - it corresponds with my feelings about the matter.

Steve - I'm a bit surprised that you recommend adding flat dither before sending to the mastering engineer (ME). Are you saying this because a particular ME might not do any digital processing, just go straight from a nice DAC into analogue processing? I'd say the safest thing would be to ask your ME what they'd prefer. Seeing that the client is concerned enough to ask, wouldn't that put the ME in a good mood too? 😉

matti ·

If the undithered material is so filled with ugly distortion, wouldn't a good MAE notice this and apply a dither himself?

My experience with quantisation distortion is that you notice it only at fade ins and outs. That happens alot on MANY commercial CD's. You can't really hear it on the rest of the track. I'm sure it's different with classical music, where there's plenty of very quiet sections. This is where i believe dithering makes most sense. I've still always used dithering because i know what it does and i've heard it's results, but i've never bothered with any noiseshaping. No point with the loud playing music i've mastered. Unshaped dither sounds nicer too. Not that anyone would really hear it tho 😀

One question tho.. does dithering make any sense if the input has enough "normal noise" already? Or is the point that it should be in the right bits?

Whatever anyone thinks of ditherings usefulness these example osms are fabulous at showing how the theory works. I raise my hat for that 🙂

Disco_Steve ·

If someone asked me what dither to use. I would be extatic! I prefer flat dither from the clients because if gives me more options, and has a lower peak level and thus lets me add more gain before I hear it. I greatly prefer the sound of noise to distortion, so I prefer to have dithered files, before I 'play' with them. 😀

sunsynth ·

Disco_Steve please check your PM folder!

Disco_Steve ·

sorry my double maths module didn't work as you cann't have doubles asinputs 🙁 and adding them by conecting to conectors together doesn't work 🙁

hope this is better steve

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.