5. Quantization - Digital Audio Fundamentals
Вставка
- Опубліковано 6 сер 2024
- In this video, on our quest to create a discrete signal out of a continuous signal, we will begin the discussion on how amplitude values of each sampled signal is represented and stored. We'll discuss how the determination of resolution of a sample is lossy when compared to sampling. Finally, we'll look at the real world effects of quantization and bit depth on digital audio - namely noise and dynamic range.
Find the full playlist here: • Digital Audio Fundamen...
Tools used:
Sonic Visualiser (waveform/spectrum analyzer) - www.sonicvisualiser.org/downl...
This video series explains the fundamentals of digital audio, how audio signals are expressed in the digital domain, how they're converted and transformed and the advantages of working with digital signals.
If you've got any questions, suggestions or recommendations, type them out here, or send me a message on any of my social channels mentioned below.
A lot of time was spent on creating this series, and I plan to do more. So please consider subscribing if you wish to be notified about more releases in the future. And if you feel generous: / akashmurthy
Check out the audio track in the intro and outro here: / tinderbox
Check out my music here: farfetchd-official.bandcamp.com/
Give me a shout here:
Facebook - / akash.murthy.319
Instagram - / thrifleganger - Наука та технологія
I bet you can't find a quantization video on the whole UA-cam like this one. Thanks a lot.
Your videos are top-notch, never stop making them.
Thanks very much for the compliments! I'll try to keep making more.
very nice elon
I'm sharing this with my class👌
Cheers mate! Hope your class enjoys it.
OMG! I have a hard time understanding the quantization concept. This video right here is all I wanted!!
Effort you are putting to create these lectures is clearly visible. Sukhriya.
Where was this video when I was studying my electronics and communication engineering 😭 years after all of this is making absolute sense. Thanks!
Hoping it'll help someone else out! Thanks!
I am completely taken aback at the quality and effort that was put into this video! Flawless and very engaging! Thank you so much.
Thanks so much for checkimg it out! It did take a lot of time to do, but I enjoy doing it..
super clear and helpful explanation of smapling and quantization, thank you very much!
Thank you so much for doing this series.
Thank you for checking it out man!
Man oh man! This is the first time I am watching a video from your channel and I am in awe. You have explained the concept to me in the most efficient way and I will forever be grateful for invoking my interest in the subject again.
Very glad you found it insightful!
Bro, this video is a piece of art, you did an excellent job. I'm really surprised how good your explanation is.
Thanks mate!
@@akashmurthy
Before watching this video I only had a blurry conception of what was the dynamic range (and not enough motivation to dig the concept myself). Now I get it. Those videos are excellent I agree with @Gabonidaz I’m sure all those animations represent a considerable amount of work. You rock Akash!
ohh man, where were you from so many days, what a channel. what a knowledge. I was always confused about the bitrate, sample rate, etc. and found this video, great.
Glad you found the channel!
After couple watched videos elswhere now i got the concept. Thanks for the well explained and well illustrated video.
Cheers! Glad it helped you!
omg these videos have such a high value production! great job.. and thank you kind stranger!! i have subscribed and will explore more your channel :)
Thanks buddy! Enjoy exploring!
Beautiful explanations and examples on such digital audio topics. Subscribed!
Thanks for subscribing mate!
The best course I've seen on UA-cam - Thanks!
Thanks very much!
Great video. Awesome examples. Beautifull animations. We dont deserve you, but we need you and we thank you.
Haha..thank you kind human!
I can't even fathom the amount of time and hard work that goes behind the production of these videos. Such a top notch video. I just paused the video to comment here first.
Thanks for the pause and the comment! The videos took a fair bit of time for sure 😅
Best video on this topic on UA-cam 👍👍✍✍👏👏👏👏👏👏👏great job
Many thanks! Excellent tutorial!
Great content!!!
I have to echo the other comments. I came across your videos by accident. They are so well done and super understandable. I wish you a lot more subscribers!
Thanks a lot for letting me know! I'm glad you found the channel.
Thank you for the great video. so quantization is discretizing the amplitude
top notch content...comendable job bro
Impressive videos!
so beautifully explained
Great stuff, excellently explained, thanks so much!
Thanks very much mate!
Hey, Akash, that was beautufully well explained. Thank you so much!
Glad you enjoyed that mate!
amazing series
Great explanation with great graphical representation, thank you sir.
You're welcome!
Amazing explanation
Finally I get it.. I've been revising one paragraph in the book for 2 days already :o... Thank you
You're welcome! Hopefully you can move on to the next paragraph :)
This was amazing
Amazingly well explained!
Thanks mate!
Great job! Very helpful!
This is perfect, thank you so much.
Great explanation...will wait for the next one ..:)
Cheers for checking it out man! Should be out in the next week or 2!
excellent video
i finally understood what makes 8-bit old fashion videogames music sound the way it does!
Thanks a lot bro. I'm a mechanical engineering student in the field if control and this video really helped me with the concept of quantization which was really vague to me.
Glad it helped! Thanks for letting me know!
This is an amazingly well-made video
Thanks so much!
this video is a masterpiece
Oh wow simple, straight forward put informations, thanks dude you are making my studying berable
Glad it's helping you out!
Top class! Thnx a lot.
Excellent video series, love it, I'd like to hear the explanation of the differences between PCM and PDM (aka DSD) in order to understand their differences and advantages of each audio format
Hey, thanks so much for checking out the series! I'd love to do stuff around that topic, but I'll have to get back to it later I'm afraid.
Best explanation ever
You just saved me hours of research
Wooowwwww man great job 👏
thank you very much the best explanation i found on UA-cam
Glad you think so! :)
i love you man. this is great informative stuff
Cheers man! Enjoy!
Boy O Boy
You are the best. ❤
Thanks very much mate!
you must be literally a gigachad to make such good videos
Lol, I'm more of a simp.
Very interesting thanks 👍🏽
Subbed and bell notifications activated!
WOW, high quality video and knowledge. Good to see another super legit source on UA-cam like 3blue1brown and Reducible.
Cheers mate! Glad to be named along side the greats..
Very Sweet
Thank you 🎶
You're welcome!
thankyo , brother , great
One of the best on you tube.
But still hard to understand why we hear errors and not signal with wrong amplitude.
Cheers for that! And thanks for the question.
I'm not entirely sure I understand it fully. What's wrong amplitude here?
Quantisation noise is only heard when the signal level is really low. The level of this noise is also very low. At very low signal levels, there aren't a lot of quantization levels to accurately depict the true nature of the signal. So, this inaccurate representation of the signal is what causes noise.
So why does this result in noise? Audio data is produced 44,100 times a second. That's a lot of data. It needs to be smooth in nature for a speaker to have any chance in representing it, because a speaker cone has to move in relation to the sample amplitude.
If sample amplitudes shift haphazardly, the speaker cone tries to move at the same rate to try and reproduce it, which cause clicks and noise, becausd the erratic movement (not smooth movement) of the speaker cone which causes noise. Hope that helps.
what a king
:)
unreal voice man
such art of videos should have more likes. Promotion. You make so good content.
Cheers! I want to make a promotion campaign, but just waiting to finish the series first.
lovely
you are a king. watched the whole series 5 times!!! love from israel
Omg..you legend!
What is the relationship between bit depth and quantization resolution? Can you share an example as well?
Sir, why do we always calculate noise in terms of power? Not in the amplitude of voltages? What is the intuition behind it?
Nice video! Thank you for the clear explanation. I was wondering if it is possible to use quantization to remove noise from a signal.
You're welcome! Regarding removing noise via quantization, how do you mean?
@@akashmurthy For example, if I have some fluctuations in my signal, will the quantization remove them?
@@mirkohu7624 no, it won't. If you're looking to smooth out a signal which was a lot of fluctuations, use a low pass filter.
@@akashmurthy Thank you for the fast reply, and keep posting!
So sir, please let me know if I am wrong, here we are not converting back the digital signal into analog again to check, just we did in the sampling, rather we are trying to hear the quantized raw audio signal. That is why we are hearing the noise? Like if we have higher resolution like infite, then we sample by nyquist, will we hear the noise? or it will be a clear sound?
I think both of the times you should bring DAC on the scenario.
At niquist and infinite resolution you will get exactly same output sine wave as output.
But with quantization error the output after DAC will not have the pure sine wave as input, it will be noisy.
But, I am confused that we made assumption that output frequency will be unique, but here we are not finding it unique.
How does that happen?
Hi !
You seem to give 2 different definitions of dynamic range :
1 - Difference between max and min amplitudes (DNR ?)
2 - Max amplitude minus Max noise (SNR ?)
So, what should I understand here ?
Thx for your help !
Hey there, it's a good question, there is a lot of complexity once you dig in further. I've tried my best to describe it below:
There are plenty of nuanced usages of the term dynamic range. Sometimes it's used to represent dynamic range of a piece of music, or dynamic range of a listening environment. From Wikipedia: "The dynamic range of music as normally perceived in a concert hall does not exceed 80 dB"
So here, we are talking about the loudest and quietest moments (generally RMS values of sound pressure measured).
The other definition, the one this video is more interested in, is the dynamic range of a digital system.
Here, it's the ratio between the theoretical largest and smallest values that a certain sample value can assume.
I have made a mistake, when I said difference, it should be ratio.
So in digital systems, there is always going to be 1 bit (1 discrete state) of inaccuracy, no matter what bit depth we choose. This is because of the rounding errors due to conversion from a continuous system to a discrete system. This is the theoretically unavoidable quantization noise.
So, the highest amplitude value can only be determined by the bit depth of the system.
So going by the 2nd definition, ratio between the theoretical largest and smallest values that a certain sample value can assume:
2^Q / 1 , where Q is the bit depth.
Representing dynamic range of a 16-bit signal in decibels, we get 20 log (2^16 / 1) = 96dB.
So the only way of increasing dynamic range is by increasing the number of bits. That's because the denominator will always be 1 discrete state of inaccuracies (noise).
So, if I understood this correctly, quantisation noise cannot be removed by any filter (LPF, HPF, BPF), right?
That's right, you can't remove quantization noise by filtering.
Hi, great video! I have not understood one thing. Why does the quantization error stays as noise, after the conversion with the output signal? After the sampling (quantization) the original signal exists no more. Only the quantized signal (the squared sine) exists. The 2 signals (the input original sine and output quantized signal encounter each others nowhere. Therefore I don't understand technically, where does the difference signal (the noise) originates. each others nowhere, therefore I don§t understand, where does the difference signal (the noise) originates.
I'm not very sure if I understand the question right. But I'm guessing you are talking about the section at 5:51
Over there, the difference signal is calculated between an accurately quantized sine wave at 16bit and poorly quantized sine wave at 3bit.
This is a digital to digital comparison, and the noise is just the difference signal.
Also, on another topic, the illustration maybe a bit misleading. There is NO squared sine wave that exists in the digital domain. It's just a simple way of illustrating. Only sample points exist in the digital domain, and these sample points aren't actually connected.
@@akashmurthy Hi. Yes, I have understood that after the A/D conversion, only single samples exists. But then where does the noise physically comes from, as difference with the original signal, if the original signal no more exists?
The analog signal exist only in the input side of the A/D converter. In the converter it gets only measured, step by step, and then translated into numeric single samples. Nobody measures the difference between the sampled signal and the original input signal, so I don't understand why this noise is to be heard, when you convert the samples back to analog. You might notice missing detail from the original signal, but not a noise in that way as it happens.
@@Tyco072 so, we are talking about quantization error. The ADC takes the input signal, samples it at discrete points, and then quantizes it as best as it can.
The error here is in this process, where there a max of half an LSB of error in measuring a sample value.
Let's say if there was no error at all. That would mean that these sampled values could be mathematically reconverted to an output signal which is the EXACT same as the input, without any difference. Practically, we deal with quantization error, since we don't have an infinite number of quantization levels or the precision required to measure the signal super accurately.
The error affects ALL samples. It's not error at certain places. All sampled values are erroneous. The degree of error differs between sample to sample.
How is white noise generated: you generate white noise digitally by choosing a random amplitude (-1 to +1) for all samples. So if you have 44100 samples and each of them having a random amplitude, if they are played back at 44.1k sample rate, you get 1 second of broadband noise.
It's the random variations in sample values that give rise to noise.
In quantization error, the samples have half a bit of random error. This is very little error, but error none the less. If there was no error, according to the sampling theorem, the DAC would use sinc functions to render an output signal which is indifferentiatable from the input signal. But dues to the presense of these error values, the output of the DAC mathematically produces a signal, which sounds like the input signal, with a little bit of noise.
You are right in saying that the input signal disappears after running into the ADC. The DAC mathematically coverts the samples to form an output signal. What we do is measure the difference between the input and the output.
Hey Bro,
I have some questions.
1- What if we record absolute silence in 8 bits, or something very quiet and detailed.
A- In silence, will we have quantization noise?
B- in "something real quiet", can we hear it? or it's covered by the noise?
2- How is that signal subtraction you provided is calculated?
I looked at it and I couldn't understand how "technically" those two signals subtracted to calculate the noise signal.
3- Why this process creates noise anyway? shouldn't the signal be louder or quieter at some points in time? Why creates a semi-white noise?
And by the way, your channel is great, nicely done. Please feed us new content :)))
Hey man!
I think a lot of these questions are answered in the next video: 6. Bit Depth
To answer them here:
1) if you are recording silence in 8bits, you get silence. If you are recording something very quiet, it may be rounded to zero, and you may end up getting a tearing sound as the audio level jumps from 0 to the next quantisation level.
2) To subtract one signal from the other, you invert the phase of one, and add the 2 signals together. If you have 2 identical signals, invert the phase of one and mix the signals together, and you should end up with silence.
3) You should really watch the next video to find out why.
Thanks mate, I'll have some new videos soon..
@@akashmurthy thanks for this informative and quick response.
So as I understood the "difference" between the fine signal and poorly quantized signal (calculated via subtraction) is the nature of the noise. And it's not white noise because it's generated from the actual signal. It's just the signal rounded up or down to the nearest latch, which is perceived as noise because it's not the actual signal and not even near it enough, but it can have the same vibe because it's generated from the source signal anyway.
And it's as loud as the difference of quantized discrete points with the reference signal. With more bit depth we have more latches, therefor the difference between the quantized point with the source point is less, so the noise would be less loud.
Is that right?
@@mohsens22 Exactly! You got it right.
@6:28 why is the dynamic range below the noise floor?
So, at @3:21 the illustration there is the decibel scale. There, anything lower on the scale is lower in signal level.
But @6:28 the illustration used is different, maybe I should've been clearer. The illustration here is instantaneous amplitude, this is what you see when you record an audio track on to DAW software, it swings from -1 to 1 on your DAW software.
-1 doesn't mean it's lower in volume. Any deviation from the center line (0 value) results in a relatively higher signal level. Peaks of audio could lie in the negative axis, and this common.
Ofcourse, -1 to 1 is the the normalized form when we use floating point format on DAWs, but here we're talking about really low precision fixed point format. For a bit depth of 3, you only have 8 distinct levels.
Now the question is, if the signal can peak on either side of the instantaneous amplitude graph, why did I deliberately choose to make it more confusing, and put the peak on the bottom? This is for correctness. If you look at how you can spread the 8 values across the positive and negative axis, you get: -4, -3, -2, -1, 0, 1, 2, 3
There is a skew. You have more negative numbers than there are positive. You can't represent an even number of values symmetrically across the axis. For simple signals like the sine wave which swing from either extreme, there is always a negative bias. Ofcourse, this bias is only exaggerated at such low bitdepths.
@@akashmurthy I've always found the whole instantaneous amplitude illustration thing so confusing, seems to be obvious tho as no one ever takes the time to elaborate, but your answer made it clear. Thank you for this accurate and thorough explanation. You have one gem of a channel btw, so much quality content, keep it up!
The higher the number of pixels or resolution, the better the quality and sharpness and clarity of the image. Decreasing the resolution, would pixelate the image and reduce the overall quality.
16 bits or higher: No error (less noise, accurate sound).
3 bits: Larger error (more noise, poor sound).
Quantization error: Even larger error (most noise, all sounds are lost).
1 Bit - 2 Amplitude Levels - Minimal Quantiz
2 Bit - 4 Amplitude Levels - Super Low Quaniz
3 Bit - 8 Amplitude Levels - Very Lower Quantiz
4 Bit - 16 Amplitude Levels - Very Low Quantiz
5 Bit - 32 Amplitude Levels - Very Lowean Quantiz
6 Bit - 64 Amplitude Levels - Lower Quantiz
8 Bit - 256 Amplitude Levels - Low Quantiz
10 Bit - 1'024 Amplitude Levels - Lowean Quantiz
12 Bit - 4'096 Amplitude Levels - Lower Mid Quantiz
16 Bit - 65'536 Amplitude Levels - Medium Quantiz
20 Bit - 1'048'576 Amplitude Levels - Mean Quantiz
24 Bit - 16'777'216 Amplitude Levels - Average Quantiz
32 Bit - 4'294'967'296 Amplitude Levels - High Quantiz - Big CPU Usage
40 Bit - 1'099'511'627'776 Amplitude Levels - Higean Quantiz - Significant CPU Usage
48 Bit - 281'474'976'710'656 Amplitude Levels - Higherage Quantiz - Gross CPU Usage
64 Bit - 18'446'744'073'709'551'616 Amplitude Levels - Super High Quantiz - Gross CPU Usage
80 Bit - 1.208'926e24 Amplitude Levels - Very Higean Quantiz - Great CPU Usage
96 Bit - 7.922'816e28 Amplitude Levels - Very Higerage Quantiz - Large CPU Usage
128 Bit - 3.402'824e38 Amplitude Levels - Very Super High Quantiz - Huge CPU Usage
160 Bit - 1.461'502e48 Amplitude Levels - Super Highean Quantiz - Vast CPU Usage
192 Bit - 6.277'102e57 Amplitude Levels - Super Higherage Quantiz - Sizable CPU Usage
256 Bit - 1.157'921e77 Amplitude Levels - Hyper High Quantiz - Massive CPU Usage
320 Bit - 2.135'987e96 Amplitude Levels - Very Super Highean Quantiz - Extensive CPU Usage
384 Bit - 3.940'201e115 Amplitude Levels - Very Super Higherage Quantiz - Enormous CPU Usage
512 Bit - 1.340'781e154 Amplitude Levels - Very Hyper High Quantiz - Giant CPU Usage
640 Bit - 4.562'441e192 Amplitude Levels - Hyper Highean Quantiz - Ultimate CPU Usage
768 Bit - 1.552'518e231 Amplitude Levels - Hyper Higherage Quantiz - Superior CPU Usage
1 KBit - 1.797'693e308 Amplitude Levels - Super Hyper High Quantiz - Gigantic CPU Usage
5472 x 3648 Pixels: Better image clarity.
250 x 167 Pixels: Image clarity is slightly reduced.
5:51
Great content Sir. But i wish you wouldn't try so hard to hide your real accent. I bet it is really great.
Lower Resolutions = Less accurate.
Higher Resolutions = More accurate.
Hello sir
Quantization error noise vs cassette noise is apples to oranges. One is random and the other is nasty overtones.
You're right, you can't compare quantization error to cassette noise. Two fundamentally different phenomenon which causes 2 different types of noise. I was talking about dynamic range available for different media. That's a valid comparison. An analog medium like a cassette is physically bound to constraints like how fine the variations in magnetic flux is, on the metal coatings on tapes, and the speed at which the tape is spun, all of which determines the signal to noise ratio (and in the end, the overall dynamic range available). In the digital domain, you have bit depth, which determines the overall signal-to-error ratio of an undithered digital signal., which again determines the overall dynamic range available.
Hello Hello I want to take you are you Hello Hello I want to know what you want to make up ok
Can’t imagine! Looks like privilege.
Thank you so much ! The work you do with animations and explanations are truly amazing bro 🤍
Thank you so much! I'm glad you find it useful.