Digital audio compression reduces file size by exploiting psychoacoustic effects—specifically, how the human ear's basilar membrane causes loud sounds to mask quieter sounds in adjacent frequency ranges—allowing certain audio data to be discarded without perceptible quality loss; this is combined with standard compression techniques like Huffman coding to efficiently encode the remaining data.
How Digital Audio Compression Works | Psychoacoustics Explained
Added:If you imagine quite far back you started off [with] midi files.
[It] was one of the ways of transmitting music initially over the internet, then you added things called mod files, these were midi files with a very small amount of audio -- normally 8-bit audio added to it.
You're talking about 1980s video games [of] the territory so [it] was slightly better sounding the Midi was but considerably worse than audio was, and then compression techniques started to come in, with sort of a ten-to-one, twenty-to-one compression rates and you could get a mono audio track down to something you could easily download off the internet.
So, we're talking about digital audio, fascinating topic, I think you've done a piece on it before, just to recap taking in a analog Audio Stream and then sampling it both that way over time and in that way over amplitude -- slightly less relevant today, but obviously when the internet first got it going you didn't have much speed so he wanted to have these files very much reduced.
You know so take an audio file that was quite massive, squeezed it down so you can pull over a small connection that led onto the field of audio compression being studied One of the studies was our understanding of how we hear, so clearly we don't want to encode information [that] is irrelevant to the way we hear.
[It] requires us to understand the human ear, so let's have a look at that.
So if you imagine in your ear itself this one will be pretty apt you've got a bunch of little bones, and then you've got what's called a "basilar membrane" so a piece of skin that's rolled up, very much like that, and then alongside of it, you've got these little hairs They're called "cilia" and what happens is all the sound comes in different bits, if you imagine this basilar membrane unrolled vibrate at different points -- if it's a low frequency it vibrates at one end, if it's a high frequency it vibrates to the other -- that with the little nerves hairs underneath they make a little nerve firing up the brain which enables you to perceive pitch in another higher level sort of concepts of sound.
Because of that rather limited nature of hearing, what happens is if -- if there's a loud sound in a certain area, because [it is a] physical membrane this bit vibrates, but makes us desensitized to other frequencies around it yeah and that -- that's the basis by which we get to do some aspects of compression that particular bit is called the psychoacoustic effects which is how we perceive sound (Off camera:) Is it like the louder sounds kind of, like, obscure the lower sounds and then we kind of hide the different frequencies?
The loud sounds obscure the less loud sounds around a certain frequency, because of that physical membrane representation of the frequencies.
And then there's been huge amounts of studies to understand how much it affects it to what degree.
What you do is then you take your digital audio and you can imagine doing this yourself if you were -- and if you have a done an audio multitrack system, you know sort of -- all of them, there's Cubase -- whatever pro tools -- take your audio track which would be a constant audio stream -- you can imagine filtering out into all its frequency bands let's say from 20 Hertz to 100 Hertz, 100 Hertz [to] 500 Hertz and so on and so on and then you can imagine sampling them at different rates, so this one might be 8-bit, this one might be 16-bit, this one might be 24-bit and you know by sampling things at different rates you effectively add a bit of noise to it, but you reduce the overall amount of bits you need to represent it.
(Off camera:) So you lower the quality but obviously you're lowering the file size.
Yes but you're lowering the quality in such a way that because of the other sounds are going on you -- you can't perceive it, and if you plotted that out, this would be called a psychoacoustic mask, and that means you can reduce the amount of bits you need to describe something.
But, you can make very small, perceptible differences to the overall sound, and that -- that's one of the core tenants, so it's sort of using the -- the rather oddities of the way our hearing system has evolved -- which is, you know, far from perfect obviously -- to take advantage of that and then reduce the amount of data, and then you can do your normal sort of compression tricks which work for any type of data stream, like, I keep seeing this string of digits come up, so I'm going to put those up in a lookup table and encode it more efficiently than just encoding those bits each time.
No different than, say, morse code does by saying we use certain letters more than you do others, so I'm going to attribute a short key length to those and there's actually a whole technique around that, called "Huffman trees" for anybody who wants to look that up -- fascinating things -- so you get, you know all of the other aspects information coding come into play, but that sort of psychoacoustic bit is the bit that's very audio centric So it's a bit that has quite a lot of relevancy.
So then there's other tricks, like if you've got stereo channels for comparing them in some way or taking information out that way, but that's the sort of basic tenants of compression now that absolutely, then opened up the internet music.
(Off camera:) Since compression is still working the same way now, if you -- somebody is, you know, listening to spotify and streaming audio is it there, or are there any other tricks they use... Well there are lots more tricks... For me, sort of compare this to any sort of innovation, so -- so it's slightly obscure but if you take the -- something like the steam engine revolution, there was major innovations, and then people filled in all the gaps.
In steam engine it was the notion that there was a steam engine, you drive a piston off and then you can pump water out of mine, and then people put wheels on it and turned it into a train and all the other sorts of things, but the -- the fundamentals of it stay the same (hesitation) People have then done significant innovations inside of that, but the notion, there is an understanding of how you hear, that clearly gets better over time so that bit [has] improved, then there's a notion of all of the encoding tricks you can go do on information sources, so this is like encoding it as better Huffman trees, or whatever the modern equivalents thereof, so you get those pieces, but I think the fundamental tenants stayed the same, just the overall increases have got better -- interesting also obviously bandwidth constraint to come down, so the pressure has come off it a little bit as well in terms of an overall need.
Up Next

Generative AI Full Course 2025: Beginners Guide to LLMs & Transformers
@Intellipaat
63.1K views•2025-08-29

Building Real-Time ML Pipelines with Feature Stores and MLOps Frameworks
@ODSCAI
5.1K views•2022-02-20

How CLIP Aligns Images and Text for AI Generation
@Computerphile
330.5K views•2024-04-25

Neural Networks Explained: Math, Layers, and Learning Fundamentals
@3blue1brown
21.9M views•2017-10-05
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Artificial Intelligence


































