[sdiy] DACs on-board 12 vs external 16 vs 24 bit
rburnett at richieburnett.co.uk
rburnett at richieburnett.co.uk
Wed Nov 6 14:11:55 CET 2013
>> I seriously doubt 24-bit D-A is within the reach of any synth
>> designer. Or even 22-bit. Not even Yamaha would bother.
>
> I think Richie didn't mean D-A'ing, but doing internal calculations
> with
> that bitness, in order to have enough margin for summing and
> attenuation.
You do the internal calculations to as high a precision as you can. Or
to put it another way, you want the word-length of the final output DAC
to be the limiting factor. If things are getting heavily truncated
before they reach the final DAC then that's an additional source of
quantization noise that can't be removed later. These days cheap 24-bit
delta-sigma converters are the norm for audio.
You might do all your internal calculations to 32-bit accuracy and then
output the final left/right mix to a 24-bit DAC (rejecting the least sig
8 bits.) Colin Fraser wisely suggested adding dither before truncating,
as this turns the horrible fizzy buzzing sound of the quantisation noise
into "random noise". Our ears find this resulting low-level
de-correlated noise much more natural & less objectionable than the
fizzy correlated harmonics from non-dithered truncation.
Chris, an example of why you might want to use larger word-lengths might
go something like this. If I synthesise an 808 bass-drum in an analogue
modelling synth to 16-bits accuracy it will sound pretty good provided
it is at full volume, (i.e. the positive and negative peaks come close
to +32767 and -32768). Okay, the very tail of the BD decay might sound
a bit fuzzy when the level drops so low that it's not being represented
by many bits, but let's assume I make a design decision that we can live
with 16-bits for the BD provided it's always at *full volume*. Now I
have to allow for the fact that most of the bass-drum hits are going to
be "normal" velocity and some will be accented. In order to make room
for the accented hits I need to turn down the "normal" level by say
12dB. This means that my normal BD hits now only take up 14 bits of the
16-bit converters available dynamic range. Now consider that this sound
might be one of 16 sounds that could potentially all play at maximum
volume at the same time in a drum machine. So the volume needs to be
scaled back further to allow for the addition of the other remaining 15
sounds otherwise clipping could occur at the output. If I were to
reduce the sound of each voice to 1/16th of its normal level then I
could be sure that all 16 voices could sound at maximum volume & maximum
velocity at the same time without clipping. But scaling the BD sound
amplitude down futher by a factor of 16 would mean that it now uses just
10-bits of resolution. This bass drum on it's own would now sound very
fuzzy, certainly not warm and "analogue", and the tail of the decay
would deteriorate into a horrendous fizzy, hissy mush. Clearly not
acceptable.
The answer here is not to scale down the levels of the instruments but
rather add additional resolution to the output to allow you to mix all
of the 16-bit voices together without clipping. Eg. 16 x 65536 =
1048576 Or to put it another way sixteen 16-bit numbers added together
requires a 20-bit number to hold the result. It's really just the same
as "gain staging" in analogue design, except is DSP land the evil is
quantisation noise rather than thermal noise. *(See note)
Regarding 24-bits for DIY projects, Tom pretty much summed that up
perfectly...
> The DAC chips to do it are easily and cheaply available. Whether the
> analog side lives up to the promises made by that incredible S/N is
> a different story. But Richie is right - at least if you've got that
> much resolution, you can add a load of waveforms together without
> having
> to lose bits off the bottom, even if some of that might get lost in the
> noise floor.
The only thing I would add is that the analogue noise floor often sounds
"natural, fuzzy and warm" and the digital noise floor often sounds
"hard, brittle, glitchy or fizzy". That's why we might mix our digital
audio to 24-bits (to keep the horrible digital artifacts down to
inaudible levels) even though we know perfectly well that real-world
analogue limitations mean that we will never actually realise that full
24-bits of dynamic range in the full strict scientific sense of the
phrase.
-Richie,
* Note: This is just a mixing example for demonstration purposes. In
practice it is unlikely that all 16 instruments will all sound on the
same step, all with maximum velocity, all with their volume sliders
pushed to 100%, and all hitting their maximum peak amplitude at the same
point in time! So you might make a design decision to increase the gain
slightly at the mixing stage to recover some signal-to-noise ratio
during perceived "normal" usage, at the potential risk of unlikely (but
theoretically possible) clipping under worst case abnormal usage
conditions. In a drum machine each sound is not correlated with the
other instruments so you can use maths to predict how the average and
peak levels of numerous mixed voices will increase as more sources are
added to the mix. You can contrast this to a VCO that allows you to
adjust the mix of saw, sine, tri and square in the output, where all of
these waveforms are at the same frequency and are correlated.
More information about the Synth-diy
mailing list