How to make an audio tone control
For the final recipe of this chapter, we'll make a digital tone control that emulates analogue circuits found on portable radios, and so on. Simple analogue tone circuits take the form of an active filter that uses a potentiometer to affect the filter transfer function (that is, emphasizing low/high frequencies—bass/treble—in the audio signal.
Although this recipe illustrates our filter operating in real time, it isn't the most efficient way of filtering digital audio. The audio codec includes its own DSP processing block, and this can be programmed to produce similar results more efficiently. We'll refer to this recipe as codecDemo_c7v3
.
Getting ready
The high- and low-pass FIR filter coefficients that we need for ...
Get ARM® Cortex® M4 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.