Talk:Sample Format - Bit Depth

From Audacity Development Manual
Revision as of 13:28, 11 April 2018 by Stevethefiddle (talk | contribs) (moved ol ednotes to talk page)
Jump to: navigation, search

Bit Depth versus Sample Format

The more common term among computer musicians / audio technicians is "bit depth". The more common term for audio programmers is "sample format".

The terms have subtly different meanings.

  • Bit depth: The number of bits (binary digits) per sample.
  • Sample format: The "numeric type" of samples.

To illustrate the difference, "32-bit" may be "integer" or "floating point". Both could be described as having a "bit depth" of 32, but "32-bit float" is a different "format" (a different numeric type) to "32-bit integer".

The term "bit depth" is usually used in relation to "integer format linear PCM". In other words, The full amplitude range of sample values is divided into a large number of _equally_spaced_ values, where the number of distinct values is determined by the number of bits per sample.

The term "bit depth" is somewhat lacking when considering floating point formats, and/or non-linear amplitude scales (such as ADPCM), because the "depth" (distance from one value to the next) varies according to amplitude.


Steve 11Apr18: Moved section out of page. It is wildly inaccurate, and imo not really necessary.

Bit depth of various sources

Peter 15Mar18: toDo-2 Do we need this section? Or maybe we shunt it off onto its own sub-page?

Figures vary a little for analog sources, depending on quality of equipment and recording. Some figures were measured using above average quality domestic hifi equipment (where applicable), and will be typical for professional recordings played on good domestic equipment. Other figures were obtained from audio engineers' written material.

CD

  • Standard audio CDs (cda): the digital recording format is 16-bit, but a fair bit of the source material is of much lower dynamic range. Also high dynamic range source material is often deliberately compressed, so the resulting real dynamic range is well below 16-bit in many cases. Some CD recordings do have 16 bits of dynamic range, but far from all.
  • Other file types on data CDs: Resolution depends on the file format and audio content, and can vary widely.

Cassette

  • Ferric: 6 bit
  • Chrome: 6 bit
  • Metal:
  • Some home recordings have less dynamic range
  • Low quality equipment or recordings will generally have less dynamic range.
  • A 1970s portable cassette player recording live via microphone, with plenty of hiss, a little motor noise and low sound quality, yielded just 2.5 bit depth for the whole record & play cycle.

Vinyl and shellac

  • 16 rpm (broadcast record):
  • 33 rpm 12" (album): 9 - 10 bit
  • 45 rpm 7" (single):
  • 45 rpm 12" (12" single): 10 bit
  • 33 rpm 7" (EP double single):
  • 45 rpm flexible single (paper thin plastic film):
  • 78 rpm (shellac):
  • 78 rpm aluminium disc (home recordings):

Note that 33 rpm 12" compilation albums that have 10 tracks recorded per side usually have noticeably reduced dynamic range. This is needed to achieve the extended play time.

FM Radio

  • Single measurement only: 4.5 bit. Exact bit depth is dependant on signal strength and tuner specs.

AM Radio

No data.

MiniDisc

MiniDiscs can record in 24-bit format, but the dynamic range will often be less than 24 bits due to the limitations of the source material.

Video Tape

  • VHS analog audio:
  • VHS digital audio:
  • Umatic analog:
  • Betamax:

Until figures come in, analog recording on VHS & Betamax will give similar to poorer bit depth than cassette.

TV Sound

TV systems vary, and several systems are in use. As a general guide:

  • Today's mono broadcast tv sound is FM, and not far removed from FM radio
  • Digital stereo sound formats tend to be of significantly better spec
  • Historic formats (eg 405 line black & white), used AM sound, and are similar in quality to AM radio.

Cinema Film

  • Standard optical recording:
  • Variable density recording: I have no sample to test, but its much poorer quality than the standard system, and is not often encountered

Telephone

Telephone is historically in a 3000Hz range from 300Hz to 3300Hz, which covers the human voice, though higher/lower range subtleties of the human voice are lost, which is what makes someone on the phone sound different than they do in person. Most VoIP Interactive Voice Response (IVR) systems demand 8 bit, 8000 Hz sampling to conserve hard drive space, which is more than adequate to deal with this range.

Laser disc

No data.

8 Track

  • Typical 1970s player: 5.5 bit depth

Reel to Reel

aka Open Reel:

  • 15/16th ips:
  • 1 7/8th ips:
  • 3.75 ips:
  • 7.5 ips:
  • 15 ips:
  • 30 ips with Dolby A: 11 bit

Microcassette

Used in many dictation machines & answerphones. Unsuitable for music.

Picocassette

Used in few dictation machines

Wire Recorder

1940s dictation machine technology

Edison Cylinder

Probably the least popular home audio format!

  • Prerecorded: comparable to 78 rpm discs
  • Home recording: not tested, but probably in the region of 2 bit resolution.

Companders

Companders are often used with cassette and open reel tape to improve the signal to noise ratio (SNR). Compansion is a combination of dynamic range compression and expansion, in this case (and almost always), compression in recording or transmission followed by expansion on playback.

The use of compansion can effectively increase bit depth during low level passages. How much extra bit depth is added at these times depends on the amount of compansion used. Increased bit depth is only achieved if the compansion is used during playback.

  • Dolby A adds
  • Dolby B can adds nearly 2 bits of extra dynamic range
  • Dolby C adds just over 3 bits at low levels
  • Dolby SR adds up to 4 bits
  • Dolby S adds 2-4 bits
  • DNL and DNR can add less than 2 bits of dynamic range at most
  • Dbx type I adds...
  • Dbx type II adds...
  • Dbx type B adds up to nearly 2 bits
  • HighCom Telefunken adds.. (btw. - is there any HighCom compander plug-in out there? )
Peter 15Mar18: commenting this out - based on Steve's observations:

Bit resolution also affects CPU use. Recording in 32-bit quality, which is Audacity's default behaviour, takes a lot more work than recording 16 bits, and a slower computer may not be able to keep up, with the result being lost samples. If you are recording for immediate export without editing, 32-bit recording may offer no advantage over 16-bit recording if you only have a 16-bit sound device. Most built-in consumer sound devices on computers (and even many cheaper soundcards) are only 16-bit. You can change the default sample format Audacity records at to 24-bit or 16-bit by going to the Quality pane of Preferences.

Steve 5July2014: From actual tests, the claim that recording in 32-bit float "takes a lot more work" and "a slower computer may not be able to keep up" appears to be a myth! I see no difference in cpu usage between recording 32-bit float and 16-bit, and the load on my (quite slow) hard drive when recording is barely detectable at any bit-depth.

{{ednote|Peter 15Mar18: commenting this out:

If there will be no adjustment of gain after recording and no effects applied, the recording bit depth can be 1 bit more than the audio source bit depth without losing any quality.

If gain will be reduced after recording, recording with 1 bit more depth will avoid degradation.

Steve 5July2014: Does this make sense? At best it is incomplete as it takes no account of dither. It seems to imply that to record a 16-bit source without losing any audio quality requires 17-bit recording !?
Steve 5July2014: This paragraph seems to severely underplay the importance of 32-bit float format for processing audio. As can be demonstrated with the "Bass and Treble" effect, the audible difference between 16-bit processing and 32-bit float can be very significant.
  • Peter 7Jul14: I was minded to agree with Steve so I took out the disparaging comments and tweaked the ordering of the text. It perhaps needs a bit more editing.
    • Peter 7Jul14 later: I moved much of the materials from this H3 section up into the new H2 section on "Audacity Defaults"