2

This is kind of a basic question which might sound too obvious to many of you , but I am getting confused so bad.

Here is what a Quora user says. Now It is clear to me what a Sampling rate is - The number of samples you take of a sound signal (in one second) is it's sampling rate.

Now my doubt here is - This rate should have nothing to do with the quantisation, right?

About bit-depth, Is the quantisation dependant on bit-depth? As in 32-bit (2^32 levels) and 64-bit (2^64 levels). Or is it something else?

and the bit-rate, is number of bits transferred in one second? If I an audio file says 320 kbps what does that really mean?

I assume the readers have got some sense on how I am panicking on where does the bit rate, and bit depth have significance?

EDIT: Also find this question if you have worked with linux OS and gstreamer framework.

RC0993
  • 898
  • 1
  • 13
  • 44

2 Answers2

2

Let's take a worked example 'Red-book' CD audio

  • The Bit depth is 16-bit. This is the number of bits used to represent each sample. This is intimately coupled with quantisation.
  • The Smaple-rate is 44.1kHz
  • The Frame-rate is 44.1kHz (two audio channels make up a stereo pair)
  • The Bit-rate is therefore 16 * 44100 * 2 = 1411200 bits/sec

There are a few twists with compressed audio streams such such as MP3 or AAC. In these, there is a non-linear relationship between bit-rate, sample-rate and bit-depth. The bit-rate is generally the maximum rate per-second and the efficiency of the codec is content dependant.

marko
  • 9,029
  • 4
  • 30
  • 46
1

Now my doubt here is - This rate should have nothing to do with the quantisation, right?

Wrong. Sampling is a process that results in quantisation. Sampling, as the name implies, means taking samples (amplitudes) of a (usually) continuous signal (e.g audio) at regular time intervals and converting them to a different represantation thereof. In digital signal processing, this represantation is discrete (not continuous). An example of this process is a wave file (e.g recording your own voice and saving it as a wav).

About bit-depth, Is the quantisation dependant on bit-depth? As in 32-bit (2^32 levels) and 64-bit (2^64 levels). Or is it something else?

Yes. The CD format, for example, has a bit depth of 16 (16 bits per sample). Bit depth is a part of the format of a sound (wave) file (along with the number of channels and sampling rate). Since sound (think of a pure sine tone) has both positive and negative parts, I'd argue that you can represent (2^16 / 2) amplitude levels using 16 bits.

and the bit-rate, is number of bits transferred in one second? If I an audio file says 320 kbps what does that really mean?

Yes. Bit rates are usually meaningful in the context of network transfers. 320 kbps == 320 000 bits per second. (for kilobit you multiply by 1000, rather than 1024)

dsp_user
  • 2,061
  • 2
  • 16
  • 23
  • `I'd argue that you can represent (2^16 / 2) amplitude levels using 16 bits` These _amplitude levels_ you are refering to `taking samples (amplitudes)`? – RC0993 Feb 13 '19 at 12:55
  • `you can represent (2^16 / 2) amplitude levels using 16 bits` Why won't I take a bigger number then? say 64. What limits me? My OS? (example Opensuse 32 bit OS) – RC0993 Feb 13 '19 at 12:57
  • @RC0993, No, there's simply no need for that. Some audio uses even 24 bits but 16 bits is enough to encode sound dynamics. Using 64 bits would unnecessarily waste memory. Note that programs may use more bits (e.g 32 bit float) but that's usually because it's easier to process wave files in memory using floats (range -1 + 1), especially if you're manipulating sound in any way. – dsp_user Feb 13 '19 at 13:01
  • Okay! Now `bit-rate, is number of bits transferred in one second` transferred to where? – RC0993 Feb 13 '19 at 13:07
  • E.g from the server to your computer. – dsp_user Feb 13 '19 at 13:09
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/188351/discussion-between-rc0993-and-dsp-user). – RC0993 Feb 13 '19 at 13:10