Take the 2-minute tour ×
Sound Design Stack Exchange is a question and answer site for sound engineers, producers, editors, and enthusiasts. It's 100% free, no registration required.

I'm new to digital audio signals and read about sampling rate on hydrogenaudio.

What this doesn't mention is how a single sample's value, ranging from -32768 to 32767 in a 16 bit, relates to any real-world amplitude. Since I sometimes use replay gain, I guess this information is simply lost either in the AD conversion or in the data format.

Also replay gain means to me that once there were a real-world amplitude and then there is an intended amplitude interpretation (aka replay-gain) and finally there is always an actual loudness value when the playback happens.

I saw that in many applications the amplitudes of wave files are expressed in negative dB values. I guess this is because there is a maximum amplitude value coming from the bits (and representation 'technique') used to represent the amplitude range, and the maximum amplitude possible in the file is taken as 0 dB.

Is my hypothesis regarding this right? How do I calculate the dBs of the rest of the samples once I decided that the maximum possible amplitude is "0 dB"? Does the minimum possible amplitude equal "silence"? Are there file formats that store the original amplitude?

share|improve this question
    
Sort answer: the real world isn't digital, so no there is essentially no relation. Even shorter answer: don't do math, make music. –  JPollock May 9 '13 at 6:06
add comment

migrated from avp.stackexchange.com Jan 24 at 12:01

This question came from our site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation.

4 Answers

up vote 5 down vote accepted

Once a signal is digitized it is treated as a number (as you quite rightly point out) and for 16bits the range of numbers are -32768 to +32767. The numbers are created by an analogue to digital converter.

The analogue to digital converter (ADC) will have a maximum input range from -X volts to +X volts (i.e. real signals that you could measure inside your mixer or on the input to a PC sound card).

This range of real signals is translated to digital numbers and if the real analogue signal exceeds what the input range is (volts) you will get a limit number of -32768 or +32767 i.e. the signal will be digitally converted but clipped to these limits.

And you are right in your assumption - a number that is -32768 or +32767 is regarded as 0dB.

So, if you had a repetitive signal that brushed against top and bottom limit on your digital VU meter (as per in a DAW or wave editor) it would display the peaks as 0dB. if the signal were numerically half the size i.e. -16384 to +16384, the VU meter would display the peak as -6dB.

A quarter sized signal would be -12dB. In fact, each time the amplitude in numbers (or volts for that matter) drops to a half, the dB level drops by 6dB. This is a rough guide to calculating other signal's dB amplitudes.

On playback, a digital to analogue convertor turns the numbers into voltages that ultimately go to your speakers (after an amplifier). The loudness totally depends on how loud you want it to be - volume controls, bigger amps etc determine this.

And yes, the minimum possible amplitude corresponds to silence and, for a 16 bit ADC, will be -96dB. It's no coincidence that a 16bit signal has potentially 16 x 6dB (96dB) of dynamic range. A 24 bit signal has potentially 24 x 6dB (144dB) of dynamic range.

EDIT - it's might be worth mentioning that back in the early (ish) days of telephony, Bell Laboratories conducted experiments; real folk were asked to judge perceived sound level intensities.

The result, for mid-spectrum sounds (1kHz area), for a halving of perceived loudness became the "Bel" and, one-tenth of a bell is a deci-bel. It was found that this tied in nicely with the fact that ten times the power of a sound causes a perceived doubling in loudness.

10x power = 1bel = 10 decibels increase. This is another way of judging sounds - if your peak signal reduces by 10dB then it has approximately halved in loudness (mid bands of spectrum).

share|improve this answer
1  
Regarding why the 6 dB / bit rule, I found some references at Audio bit depth#Digital audio on wikipedia. The linked article looks promising: Walt Kester (2007). Taking the Mystery out of the Infamous Formula, "SNR = 6.02N + 1.76dB," and Why You Should Care and seems to have a title style from Bell's era ;). –  naxa May 8 '13 at 16:52
    
Good old Analog Devices - as soon as I saw you'd written his name I knew what article you were referring to. A little heavy going for some but if you remember a little bit of calculus then it's not too bad. –  Andy aka May 8 '13 at 16:58
add comment

There is no direct or absolute correspondence between 'original' amplitude and sample value. The concept of dB itself is one of relative amplitude -- unless you specify a reference value, as in dBa or dBm, all you know about a decibel is that it represents a (logarithmic) ratio. There is no 'zero dB' as such.

In asking about original amplitude do you mean the sound pressure level of some audio? Or the voltage generated by the pickup transducer, or some other measurement? What about a sound that originated electronically, that is, with no 'original' value, just a sampled digital representation?

In any event, knowing that the decibel is a logarithmic ratio, you can establish any baseline you like, for example 32767 as 0 dB[naxa] (these numbers are unsigned: -32767 has the same amplitude as +32767). A value 1/2 of that is 3 dB lower, because 3.0 is log10 of 2. This gets complicated when you discuss power ratios vs voltage ratios, but the idea is the same.

I'm sure others will add to this, there's a lot I haven't touched on.

share|improve this answer
1  
A half value will be 6dB lower not 3dB. Halving the power of a signal would make it 3dB lower but not halving the signal in either volts or peak ADC values. –  Andy aka May 8 '13 at 16:32
add comment

I'm surprised nobody else has mentioned this, but the unit in the digital domain is dBFS, where FS stands for Full Scale. 0 dBFS represents the maximum digital signal level. A signal would clip in the digital domain above 0 dBFS. Note, however that just restraining a signal to just below 0 dBFS might not be enough to avoid clipping: Depending on the method of signal reconstruction in a DAC, a signal might clip during reconstruction. There's a good article called "0dBFS+ Levels in Digital Mastering" that explains more: http://www.tcelectronic.com/media/1018207/nielsen_lund_2000_0dbfs_le.pdf

As indicated by the other posts above, there is no direct relation to real world signal levels, but there are plenty of standards that define what it should be. Most notably:

  • The European broadcating union (EBU): +18 dBu at 0 dBFS

  • BBC spec: −18 dBFS = PPM "4" = 0 dBu

For more info check out the Wikipedia article: http://en.wikipedia.org/wiki/DBFS

share|improve this answer
add comment

The first thing to realize is that dB is a logarithmic scale. For every 10dB change, the signal level changes by an order of magnitude. 0db means the signal is unaltered when sampling or "full power" when dealing with a recording. -infinity is 0 signal strength and the amplitude of the signal can be anywhere in between.

To get a +dB level, amplification has to be done on the signal. For example, when you see something like +10dB on a sound board, this means the sound board is amplifying the signal that it received to be 10 times as powerful or 3.162 times the amplitude.

The level in-between 0 and -infinity is determined based on where the current power or amplitude falls on the logarithmic scale. The equations won't format nicely for display here, but the Wikipedia article on decibel has them very nicely formatted if you want further reading on the subject.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.