In this tutorial, explore key functionality of the Audio Test Bench. The Audio Test Bench app enables you to debug, visualize, and configure audio plugins.
To open the Audio Test Bench, at the MATLAB® command prompt, enter:
audioTestBench
In the Object Under Test box, enter
audiopluginexample.Strobe
and press
Enter. The Audio Test Bench
automatically displays the tunable parameters of the
audiopluginexample.Strobe
audio plugin.
The mapping between the tunable parameters of your object
and the UI widgets on the Audio Test Bench is determined by audioPluginInterface
and audioPluginParameter
in the
class definition of your object.
In the Object Under Test box, enter
audiopluginexample.DampedVolumeController
and press
Enter. The Audio Test Bench
automatically displays the tunable parameters of the
audiopluginexample.DampedVolumeController
audio plugin.
To run the Audio Test Bench for your plugin with default settings,
click . Move the sliders to modify the
Gain and Transition Delay parameters
while streaming.
To stop the audio stream loop, click . The MATLAB command line and objects used by the test bench are now
released.
To reset internal states of your audio plugin and return the sliders to their
initial positions, click .
Click to run the Audio Test Bench
again.
To pause the Audio Test Bench, click .
To open the source file of your audio plugin, click .
You can inspect the source code of your audio plugin, set breakpoints on it, and
modify the code. Set a breakpoint at line 65 and then click on the Audio Test Bench.
The Audio Test Bench runs your plugin until it reaches the breakpoint. To reach the breakpoint, move the Transition Delay slider. To quit debugging, remove the breakpoint. In the MATLAB editor, click Quit Debugging.
To open a time scope to visualize the time-domain input and output for your audio
plugin, click . To open a spectrum analyzer to visualize the
frequency-domain input and output, click
.
To release objects and stop the audio stream loop, click .
The Input list contains these options:
Audio File Reader
–– dsp.AudioFileReader
Audio Device Reader
–– audioDeviceReader
Audio Oscillator
–– audioOscillator
Wavetable Synthesizer
–– wavetableSynthesizer
Chirp Signal
–– dsp.Chirp
Colored Noise
–– dsp.ColoredNoise
Select Audio File Reader
.
Click to open a dialog for
Audio File Reader
configuration.
You can enter any file name included on the MATLAB path. To specify a file that is not on the MATLAB path, specify the full file path.
In the Audio file box, enter:
RockDrums-44p1-stereo-11secs.mp3
Press Enter, and then exit the Audio File
Reader
configuration dialog. To run the audio test bench with your
new input, click .
To release your output object and stop the audio stream loop, click .
The Output list contains these options:
Audio Device Writer
–– audioDeviceWriter
Audio File Writer
–– dsp.AudioFileWriter
Both
–– audioDeviceWriter
and dsp.AudioFileWriter
None
–– The audio signal is not routed to a
file or device. Use this option if you are only interested in using the
visualization and tuning capabilities of the test bench.
Choose to output to device and file by selecting
Both
from the Output
menu.
To open a dialog for Audio Device Writer
and Audio File Writer
configuration, click .
If your audio plugin has a custom visualization method, the button appears on the Audio Test
Bench. In the Object Under Test box, enter
audiopluginexample.VarSlopeBandpassFilter
and press
Enter. To open the custom visualization of
audiopluginexample.VarSlopeBandpassFilter
, click . The custom visualization plots the frequency
response of the filter. Tune the plugin parameters and observe the plot update in
real time.
Custom visualizations are MATLAB-only features. Custom visualizations are not available for generated plugins.
If you have a MIDI device connected to your computer, you can synchronize plugin
properties with MIDI controls. To open a MIDI configuration UI, click . Synchronize the
LowCutoff
and
HighCutoff
properties with MIDI controls you choose. Click
OK.
See configureMIDI
for more
information.
To run your audio plugin, click . Adjust your plugin properties in real time using your
synchronized MIDI controls and sliders. Your processed audio file is saved to the
current folder.
To open the validation and generation dialog box, click .
You can validate only, or validate and generate your MATLAB audio plugin code in VST 2 plugin format. The Generate a
32-bit audio plugin check box is available only on win64 machines.
See validateAudioPlugin
and generateAudioPlugin
for more
information.
To generate a MATLAB script that implements a test bench for your audio plugin, click .
You can modify the code for complete control over the test bench environment, including the ability to create processing chains by placing plugins in cascade.
Audio Test Bench | audioPlugin
| generateAudioPlugin
| validateAudioPlugin