# Audio Bit Depth “mapping” from DAW to Audio card: is this correct?

Let say I'm generating a 1 kHz sine wave within my DAW, using some synth (Sytrus in my case). I normalize it, so it play at max "digital" amplitude 0db.

Thus, any sample of the signal would gets a Floating Point values (in 32 or 80 bit of precision, using FL Studio 32bit; but that's irrelevant right now).

This means that all values (since the signal is normalized) goes from -1.0 to 1.0 max.

Now, the signal go through ASIO Drive and reach my sound card (an M-Audio FireWire Solo), 24-bit (fixed-point representation). Due to ENOB, it will use 21-bit, thus the max value would be 1048576 (which is 100000000000000000000 in binary).

Is correct to state that the value 1.0 is mapped to 100000000000000000000? And -1.0 to 000000000000000000000?

I'm really not sure about this. Does this mapping happen? Is it correct the range I've used (-1.0/1.0 => 000000000000000000000/100000000000000000000)?

Can you help me to understand this "mapping", if any?

• nope, that's not the meaning of ENOB. The DAC will (most likely, I can't look inside) use all the 24 bits you send it – ENOB is just the amount of "precision" that you effectively achieve. – Marcus Müller May 2 '18 at 9:31
• @MarcusMüller: but how will happens this mapping between DAW range and audio card range? Any example? – markzzz May 2 '18 at 10:15
• You're just making assumptions on what your hardware consumes. Maybe they are right, in which case your assumptions about the conversion could be right, or they could be wrong (which I actually think is not that unlikely) and then your conversion is wrong. Ex falso quodlibet, from a wrong presumption follows arbitrary stuff. – Marcus Müller May 2 '18 at 10:48
• @MarcusMüller: that's just an example. My dubt is: I pass from a 4,294,967,296 distinguishable values (fp 32 bit) to 6,777,216 . So the audio card decide how to "map" a huge range to number to a small one. Is it the audio card builder that decide it? Or any standard? (or example) – markzzz May 2 '18 at 10:54
• There's no 32 bit floats involved anywhere here. The digital hardware designer, the driver author and the DSP engineer will define what the sound card does with the numbers it gets over the wire, and what kind of numbers these are. – Marcus Müller May 2 '18 at 11:38

You make false assumptions:

• Your audio software might work on floating point numbers. In most cases, it converts these before handing them over to your operating system's sound architecture, but these architectures usually offer userland applications a wide range of sample formats – be it floating point, signed or unsigned integers.
• The sound system internally converts to the sound card driver's format – again, drivers typically offer multiple sample formats to the OS
• The driver then converts what it gets to the appropriate on-the-wire format. This is usually absolutely specific to your hardware. It is usually not floating point numbers. It might be signed or unsigned 2-complement integers of very different bit depths, or something else. The sky's the limit: Someone designed the driver together with the hardware with a lot of requirements that have nothing to do with "it's an easily understood standard number format".
• The sound card hardware takes the on-the-wire format and converts it to an internal sample format suitable for internal DSP. Usually, you don't have any clue what that is.
• The DSP chain will at the end talk to a DAC – and DACs can take signed or unsigned integers of bit depths between 1 and 32 bit.

Oh, and throw in some endianness confusion while you're considering all this.

• So its the DAW (or audio application) that convert its 32 bit floating point signal to ASIO (or Directsound or WASAPI) format, used by OS. Than that's driver communicate with soundcard and make another conversion to another format. – markzzz May 2 '18 at 12:47

If your sound card has input range 2Vp-p (2 volts peak to peak = -1V to +1v) and has 24 bits of resolution (ENOB doesn't play any role in this, you still get 24 bits for each sample for each channel, but the higher ENOB the smaller noise you get), here is what voltage represents the output code of ADC:

00000000 00000000 00000000 (lowest possible result from ADC) => -1V
10000000 00000000 00000000 (midpoint) => 0V
11111111 11111111 11111111 (highest possible value) => +1V


000 (0 dec) => -1V
001 (1 dec)
010 (2 dec)
011 (3 dec)
100 (4 dec) => (midpoint approximately) 0V
101 (5 dec)
110 (6 dec)
111 (7 dec) => +1V


So the voltage is proportionally distributed in the full ADC range, to calculate the voltage correspondig to specific code, you can use following formula:

U = (code/(2^bits-1)) * (Umax - Umin) + Umin


where Umin = -1V, Umax = 1V, bits = 24 For conversion between binary and decimal numbers refer to this document

• you probably meant "your ENOB is higher the less noise you get" – Marcus Müller May 2 '18 at 11:58
• by the way, there's ADCs that are differential and actually emit 2-complement signed numbers :) I must admit I don't know whether that's common in the field of audio ADCs. – Marcus Müller May 2 '18 at 11:59
• So converting from 32fp (from DAW) to sound card 24bit integer will make a lots of data loss. Fortunately, I think it doesn't make any significant differences, and 24bit is enough. Why does sound card (hardware) use fixed point (integer) instead of floating point? Is it more quickly on calculation? – markzzz May 2 '18 at 13:19
• All of the comparator or sigma delta based DACs/ADCs use fixed length code word. In some special applications multiple ADCs connected in parallel are used and for the result the highest non satuarted code word is taken to achieve better resolution of small signals. But this is not your case. "Floating point" is by my opinion only code word transformed into floating point number to make further numeric processing more straightforward. Can you please post the link of your DAW's specification? – gabonator May 2 '18 at 14:20