Most algorithms are available as MATLAB System objects™ or Simulink blocks, and their behavior can be customized by modifying the values of their properties, including during simulations for live tuning. Some algorithms, such as compressor or multibandParametricEQ, also include a visualization method to monitor the dynamic behavior of the algorithm while its parameters are tuned. Algorithms shipping with Audio System Toolbox are optimized for execution performance. They can be used in single-precision and double-precision floating-point mode, and they support C-code generation. Most of the algorithms can also be automatically converted into audioPlugin modules using the createAudioPluginClass function. The audioPlugin interface enables the automatic generation of VST plugins, rapid real-time prototyping via the audioTestBench app, and the automated association of MIDI controls to tunable parameters.

Examples of shipping algorithms and built-in visualizations. These include the system toolbox’s filters library for Simulink (top left), the overlapped response of a bank of ten adjacent full-octave filters (bottom left), the magnitude frequency response of a two-point crossover filter with different slope values at different crossover points (top right), and the live visualization of a multiband parametric equalizer (bottom right).

Low-Latency Audio Streaming

Audio System Toolbox provides streaming interfaces to audio hardware and audio files. It enables low-latency connectivity to audio cards via all common desktop audio drivers (such as ASIO, CoreAudio, ALSA, and Windows DirectSound). The system toolbox supports all main audio file formats, such as wav, mp3, flac, ogg, and aiff.

Input and output audio interfaces are available as MATLAB System objects and Simulink blocks, enabling you to test your audio processing algorithms in frame-based processing mode without moving to a different environment or integrating external libraries for audio connectivity.

To facilitate interaction with individual computer configurations, objects and blocks sense which audio devices are available and present you with a list corresponding to your current configuration.

In MATLAB, you can stream real-time multichannel audio using elementary language constructs such as for or while loops, adjust latency via the frame length to handle running on non-real-time operating systems, and live-tune algorithm parameters during simulations. With multichannel audio devices, channel mapping enables you to route signals to arbitrary channel selections.

With the audioTestBench app, authors of MATLAB audioPlugin modules can test their algorithm in real time without having to write any additional code.

All audio device interfaces in both MATLAB and Simulink support C-code generation for acceleration and desktop prototyping. For example, you can generate libraries or standalone applications that process audio in real time on the desktop.

When targeting Raspberry Pi™ and STM Discovery boards from Simulink models, Audio System Toolbox enables you to use multichannel input and output audio signals.

Configuration of the Driver and Device properties of an audioDeviceReader object for streaming audio from a desired audio device, with the Tab key used to display the available options (left). The acquired audio signals can be visualized in real time using one of the streaming scopes provided by DSP System Toolbox™, such as dsp.TimeScope (right) or dsp.SpectrumAnalyzer.

Real-Time Tuning via User Interfaces and MIDI Controls

The system toolbox provides MATLAB functions and a Simulink block to receive MIDI messages in both environments, as well as the ability to synchronize controller positions and algorithm parameters at the beginning of simulations. In MATLAB, your code can either query a control position directly, or be executed when a control is moved. Authors of MATLAB audioPlugin modules can link MIDI controls to module parameters automatically using the configureMIDI user interface.

The audioTestBench app can automatically create interactive controls for tuning the parameters of an audioPlugin module in real time directly in MATLAB. It also provides a fully interactive workflow to synchronize its own user interface with external MIDI controls.

An external MIDI control surface used to dynamically tune a Simulink simulation through the MIDI Controls block. In this example, the output of the block is used to control a panning amount within a simple Simulink subsystem.

Generation and Hosting of VST and AU Plugins

Plugin generation enables MATLAB developers to run audio processing algorithms on digital audio workstations (DAW) for testing, validation, and early prototyping, without requiring any knowledge of C++. Creating VST plugins with Audio System Toolbox does not require you to design user interfaces. Interactive controls for the tunable parameters are automatically rendered by the host DAW. The generated plugins execute natively on the host system. For interactive analysis and visualization, MATLAB users can exchange live data with the generated plugins via UDP. Developers of audio processing algorithms can leverage MATLAB classes to package audio processing modules using the audioPlugin interface. Most built-in audio processing algorithms can be automatically converted into audioPlugin modules and VST plugins. The system toolbox also provides a gallery of open audioPlugin examples to use as a reference, or as starting point when authoring new modules.

Plugin hosting allows external VST and AU plugins to create or process MATLAB signals by running the plugins programmatically like regular MATLAB objects. For example, DSP algorithm developers can use MATLAB to analyze and verify their VST or AU plugin prototypes, or to benchmark their MATLAB code against established third-party industry solutions.

A three-band parametric equalizer packaged as a MATLAB audioPlugin module (left), and the VST plugin automatically generated from it, seen from within a host DAW (right). The names and variation ranges of the nine tunable parameters in the VST interface are automatically generated based on the audioPluginInterface specification visible in the MATLAB code.

Support for C Code Generation

The algorithms shipping with Audio System Toolbox support C-code generation when used with any add-on C-code generation product. You can accelerate MATLAB code that uses built-in modules by generating MEX files, or turn it into source C or C++ code to share with others for use in external environments or to run on an embedded processor or DSP.

On the desktop, you can generate libraries or standalone applications that include audio I/O connectivity. With MATLAB, you can exchange live data with the libraries or executables via UDP. You can execute audio processing and I/O natively in an external application, while still using MATLAB for tuning, control, analysis, or visualization.

Detail of the source C code (right) generated with MATLAB Coder™ from a MATLAB function (left) that uses an instance of the multibandParametricEQ object from Audio System Toolbox. The generated code can be used on any platform or environment equipped with a C compiler.

Select Your Location

Choose your location to get translated content where available and see local events and
offers. Based on
your location, we recommend that you select: .