matlab-process-streaming-audio

Implement real-time audio processing chains in MATLAB using Audio Toolbox streaming objects.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-process-streaming-audio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-process-streaming-audio
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/signal-processing/matlab-process-streaming-audio
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-process-streaming-audio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building real-time audio processing in MATLAB often leads to hand-rolled buffering, manual filter coefficient math, and custom tuning UIs that are error-prone and not streaming-safe. This Skill provides the correct Audio Toolbox streaming objects, patterns, and conventions for frame-based audio processing in MATLAB and Simulink.

Core Features & Use Cases

  • Streaming Filter and Dynamics Chains: Use crossoverFilter, compressor, limiter, multibandParametricEQ, and graphicEQ objects that maintain state across frames and support live tuning.
  • Metering and Analysis: Measure levels with audioLevelMeter, loudnessMeter (EBU R128), splMeter, and octaveSpectrumEstimator with built-in visualization.
  • Spectral and Frequency-Domain Processing: Apply dsp.STFT/dsp.ISTFT for per-bin manipulation and dsp.FrequencyDomainFIRFilter for long impulse responses such as convolution reverb.
  • Interactive Tuning and MIDI Control: Use visualize and parameterTuner for one-line response plots and slider UIs, plus MIDI functions for hardware control.
  • Use Case: Build a three-band multiband compressor by splitting audio with crossoverFilter, compressing each band, and summing the output, with parameterTuner open for live adjustment.

Quick Start

Ask the agent to build a real-time audio processing chain in MATLAB that reads a WAV file, applies a parametric EQ and compressor, and shows live metering with tunable parameters.

Frequently Asked Questions about matlab-process-streaming-audio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process audio in real time frame-by-frame in MATLAB?

Use Audio Toolbox streaming objects such as crossoverFilter, compressor, and multibandParametricEQ inside a loop driven by dsp.AudioFileReader and isDone. These objects maintain internal state across frames, and you call release on all objects after the loop completes.

What MATLAB object should I use for an audio level or loudness meter?

Use audioLevelMeter for sample-peak or true-peak levels in dBFS/dBTP, loudnessMeter for EBU R128 loudness in LUFS, splMeter for per-band sound pressure levels, and octaveSpectrumEstimator for weighted octave-band spectra. All except splMeter support the visualize method for built-in real-time displays.

How do I tune audio filter parameters interactively while streaming?

Call parameterTuner(obj) on any Audio Toolbox streaming object to open a slider UI for all tunable properties, and visualize(obj) for a live response plot. Include drawnow limitrate inside the processing loop so UI events are flushed and tuning changes take effect.

Should I use dsp.STFT or dsp.FrequencyDomainFIRFilter for spectral audio processing?

Use dsp.STFT with dsp.ISTFT when you need per-bin spectral manipulation such as gating or subtraction, since they handle windowing, overlap, and perfect reconstruction. Use dsp.FrequencyDomainFIRFilter only for convolving with a fixed long impulse response, such as room IRs or convolution reverb.

Why do my parameterTuner changes not take effect during the audio loop?

MATLAB does not process UI events inside a tight processing loop, so slider changes are ignored. Add drawnow limitrate inside the loop, and set PlayCount=Inf on dsp.AudioFileReader so the file does not end before you finish tuning.

When should I not use streaming audio objects in MATLAB?

Avoid this approach for audio device I/O setup, audio plugin generation with createAudioPluginClass, deep learning audio inference, and offline batch processing of entire files. Those workflows use different tools such as audiostreamer or one-shot functions like audioresample.