🛠 DSP audio temps réel sur le Teensy 4.1 : bibliothèque Audio, I2S/TDM, S/PDIF et MQS

Teensy 4.1 · avance · Schéma : le Teensy 4.1 avec l'Audio Shield empilé sur ses ports I2S ; à droite, le graphe d'un patch de la bibliothèque Audio (entrée ligne → filtre → sortie) dessiné dans l'outil de conception graphique.

Objectives

The audio ecosystem is the Teensy's forte: the 16-bit / 44.1 kHz multi-channel Audio Streams library leverages the DSP instructions of the Cortex-M7 and is programmed graphically using the Audio System Design Tool (drag-and-drop of objects: oscillators, filters, effects, mixers), which generates the corresponding C++ code. The 4.1 pushes this advantage further: 2 I2S/TDM ports (up to 8 I2S channels / 16 TDM channels per port), independent S/PDIF input and output, and MQS output for a small speaker.

Hardware

Key Points

Procedure

  1. Open the Audio Design Tool, place a Waveform object (440 Hz sine wave), an Output object (I2S), connect them, and export.
  2. Paste the generated code into a sketch, select Tools > Board > Teensy 4.1, and upload.
  3. Listen via the Audio Shield (headphone output) or the MQS speaker.
  4. Enhance: biquad filter, delay reverb, multi-object mixing — the tool displays the consumed CPU budget.

Expected Verification

A clean 440 Hz tone comes out of the chosen output, without audible artifacts despite added filters: the CPU budget displayed by the tool remains very low on the 600 MHz M7. By connecting a microphone to the line input, you can chain filter + delay and hear the effect live.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials