Path: EDN Asia >> Design Centre >> Consumer Electronics >> Understanding audio compression
Consumer Electronics Share print

Understanding audio compression

20 Oct 2014  | David Finch

Share this page with your friends


Amplitude masking
Amplitude masking, for example, occurs when two tones of different amplitude are presented simultaneously within a particular frequency band. The threshold at which sound is perceived can be forced upwards with a given stimulus. When two or more tones appear in the same critical band at the same time, the loudest tone will shift the threshold of perception higher, and tones of lesser amplitude may be masked as a consequence.

Furthermore, the greater the dominant tone's amplitude, the lesser the slope of its masking curve with respect to higher frequencies. In other words, a very loud tone will carry increased masking influence over tones of higher frequencies, even those outside its critical band. A very loud 1kHz tone, for instance, can bury a 5kHz tone generated 45 dB below it.

Masking effects are not limited to simultaneous acoustic events. For a given pair of tones sounded within milliseconds of each other, one may dominate perception regardless of which tone occurred first; this is a function of amplitude and temporal proximity, rather than acoustic sequence.

A data-reduction system that can exploit these phenomena offers significant advantages; by modelling the basics of the human auditory system, we can determine within a given band which tones – noise or otherwise – will be masked. Bands with strong masking components from the desired audio signal will be coded with precious bits; weaker signal components swamped by noise will not. The resultant waveform, theoretically and depending upon the specified data rate, is the original audio signal re-quantised at a lower data rate.

Normally, truncating a digital audio word results in quantisation error, which is manifest acoustically as noise. But a perceptual coder can identify where within the audio signal this noise can be hidden, and codes the signal accordingly – though not perfectly.


Lossless error coding
HD audio is gaining traction in part because it relies not on lossy, proprietary data-reduction techniques, but on data compression that is both fully open-source and lossless. As the name suggests, Free Lossless Audio Codec (FLAC) is an example of a free, open-source, lossless codec. The file sizes are larger than MP3 and other formats, but still compressed from their original formats. But the goal with FLAC isn't purely a smaller file size, it's compression without compromising fidelity.

FLAC is based on fixed polynomial prediction or linear predictive coding. A FLAC coder subtracts a calculated approximation of the signal from the actual signal, and codes the error. Coding the result requires fewer bits than coding the original signal. On the decode side, the audio waveform is restored with great fidelity because its content was not fundamentally altered.


A happy marriage
Music coded in high definition is now commercially available to consumers, thanks to technologies like FLAC and other open-source initiatives. And it seems these days that virtually anyone can build just about any cool thing, provided they have the right single-board computer and accessories. Available to the Raspberry Pi community, for example, is a two-channel HD Audio card featuring analogue and digital I/O, and driven by a codec from Wolfson Microelectronics. Accessories such as these enable makers to make, students to explore, and everyone else to simply listen.

With a thriving global community of developers, online retailers supplying HD music and now the availability of HD-ready SBC expansion cards, the time has never been better to upgrade audio designs to HD.


About the author
David Finch is the Technical Marketing Manager for Newark element14, a global electronics distributor and online community of 250,000+ design engineers.


To download the PDF version of this article, click here.


 First Page Previous Page 1 • 2


Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.


Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming


News | Products | Design Features | Regional Roundup | Tech Impact