<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Audio DSP on MCUs on Embedded Systems Development</title><link>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/</link><description>Recent content in Audio DSP on MCUs on Embedded Systems Development</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/index.xml" rel="self" type="application/rss+xml"/><item><title>Fixed-Point Audio Arithmetic</title><link>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/fixed-point-audio-arithmetic/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/fixed-point-audio-arithmetic/</guid><description>&lt;h1 id="fixed-point-audio-arithmetic"&gt;Fixed-Point Audio Arithmetic&lt;a class="anchor" href="#fixed-point-audio-arithmetic"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Most MCUs used for audio — Cortex-M4, Cortex-M7, ESP32 — have hardware integer multipliers but no floating-point unit fast enough for real-time audio DSP (Cortex-M4F has single-precision FPU, but Q15/Q31 fixed-point on the DSP extensions is still faster for multiply-accumulate-heavy workloads). Fixed-point arithmetic represents fractional values as scaled integers, trading dynamic range for deterministic execution time and efficient use of the DSP instruction set. A 16-bit audio sample is already a fixed-point number — Q15 format, where the full-scale range [-1.0, +1.0) maps to [-32768, +32767]. Understanding Q-format arithmetic is not optional for embedded audio DSP; it is the foundation every filter, mixer, and dynamics processor is built on.&lt;/p&gt;</description></item><item><title>FIR &amp; IIR Filters for Audio</title><link>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/fir-iir-audio-filters/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/fir-iir-audio-filters/</guid><description>&lt;h1 id="fir--iir-filters-for-audio"&gt;FIR &amp;amp; IIR Filters for Audio&lt;a class="anchor" href="#fir--iir-filters-for-audio"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Audio filtering on an MCU is dominated by two filter types: FIR (Finite Impulse Response) and IIR (Infinite Impulse Response). FIR filters offer linear phase and unconditional stability but require many taps for sharp cutoffs — a 48 kHz low-pass filter with a narrow transition band may need 200+ taps, each costing one multiply-accumulate per sample. IIR filters achieve equivalent frequency shaping with 5 coefficients (a single biquad section), but introduce phase distortion and can become unstable with quantized fixed-point coefficients. In embedded audio, IIR biquads handle the bulk of the work — EQ, crossovers, high-pass DC removal — while FIR filters appear in sample rate conversion, linear-phase requirements, and anti-aliasing.&lt;/p&gt;</description></item><item><title>FFT &amp; Spectral Analysis</title><link>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/fft-spectral-analysis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/fft-spectral-analysis/</guid><description>&lt;h1 id="fft--spectral-analysis"&gt;FFT &amp;amp; Spectral Analysis&lt;a class="anchor" href="#fft--spectral-analysis"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The Fast Fourier Transform converts a block of time-domain audio samples into a frequency-domain representation — a set of complex values (or magnitude/phase pairs) at discrete frequency bins. On an MCU, spectral analysis is used for audio visualization (LED spectrum displays, VU meters), pitch detection, feedback suppression, and as a preprocessor for more complex algorithms. The FFT itself is computationally tractable on Cortex-M4 and ESP32 (a 1024-point Q15 FFT takes roughly 70,000 cycles on Cortex-M4 using CMSIS-DSP), but the choices surrounding it — block size, window function, overlap, and magnitude calculation — determine whether the result is musically useful or misleading.&lt;/p&gt;</description></item><item><title>Dynamics Processing</title><link>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/dynamics-processing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/dynamics-processing/</guid><description>&lt;h1 id="dynamics-processing"&gt;Dynamics Processing&lt;a class="anchor" href="#dynamics-processing"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Dynamics processors — compressors, limiters, gates, and expanders — control the volume envelope of an audio signal in real time. A compressor reduces the level of loud passages to prevent clipping and even out volume. A limiter is a compressor with a very high ratio, acting as a hard ceiling. A gate silences signals below a threshold to suppress background noise. These are not exotic effects; they are essential building blocks for any audio system that must handle variable input levels, from a conference microphone that switches between soft and loud speakers to a music player that must not overdrive a small speaker amplifier.&lt;/p&gt;</description></item><item><title>Audio Effects &amp; Mixing</title><link>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/audio-effects-mixing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/audio-projects/audio-dsp/audio-effects-mixing/</guid><description>&lt;h1 id="audio-effects--mixing"&gt;Audio Effects &amp;amp; Mixing&lt;a class="anchor" href="#audio-effects--mixing"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Time-domain audio effects — delay, echo, reverb, chorus — all depend on storing audio samples and playing them back later, mixed with the current input. The fundamental data structure is the circular buffer (ring buffer), and the primary constraint is memory: a one-second delay at 48 kHz / 16-bit mono requires 96 KB of RAM. On Cortex-M4 devices with 128–256 KB of SRAM, this leaves little room for anything else. ESP32 and ESP32-S3 with external PSRAM (2–8 MB) open up long delays and reverb networks that are impractical on SRAM-only MCUs.&lt;/p&gt;</description></item></channel></rss>