develop, analyze, and debug plugins in audio test bench
in this tutorial, explore key functionality of the . the audio test bench app enables you to debug, visualize, and configure audio plugins.
choose objects under test
to open the audio test bench, at the matlab® command prompt, enter this command.
audiotestbench
in the add an object under test field, enter
audiopluginexample.varslopebandpassfilter
and press
enter. alternatively, you can click the button to browse for a file containing a plugin
class definition or an external plugin binary. the audio test bench
automatically displays the tunable parameters of the
audiopluginexample.varslopebandpassfilter
audio plugin.
the mapping between the tunable parameters of your object and the ui controls on the audio test bench is determined by and in the class definition of your object.
under objects under test in the test bench
view, click and add the
audiopluginexample.volumecontroller
plugin. the two plugins
are now connected in a cascade where the
audiopluginexample.varslopebandpassfilter
plugin processes
the input signal, and its output is then processed by the
audiopluginexample.volumecontroller
plugin.
right-click the volume controller tab and select the
left/right
configuration under tile
all
to view the tunable parameters of both plugins side by side.
you can change the order of the plugins in the cascade by selecting a plugin from the objects under test and clicking or to move it up or down. you can also remove a plugin by selecting it and clicking .
run audio test bench
to run the audio test bench and stream audio through your plugins, click . use the ui controls to tune the plugin 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 ui controls to their initial positions, select the plugin from the objects under test and click .
click to run the audio test bench again.
debug source code of audio plugin
to pause the audio test bench, click .
to open the source file of your audio plugin, click and select the plugin from the dropdown list. for this example,
select volume controller
.
you can inspect the source code of your audio plugin, set breakpoints on it, and
modify the code. set a breakpoint in the set.transitiontime
function 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 time dial. to stop debugging, remove the breakpoint and click continue in the matlab editor.
open scopes
to open a time scope to visualize the time-domain input and output, click . to open a spectrum analyzer to visualize the frequency-domain input and output, click . the scopes display input to the audio test bench and the output of the last plugin in the cascade.
to release objects and stop the audio stream loop, click .
configure input to audio test bench
the input list contains these options corresponding to system objects:
audio file reader
––audio device reader
––audio oscillator
––wavetable synthesizer
––chirp signal
––colored noise
––
the audio device reader
option is not
supported in .
select
audio file reader
.click to open the settings panel 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
click again to close the settings panel. to run the audio test bench with your new input, click .
to release your output object and stop the audio stream loop, click .
configure output from audio test bench
the output list contains these options corresponding to system objects:
audio device writer
––audio file writer
––both
–– andnone
–– 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.
the audio device writer
and
both
options are not supported in .
choose to output to device and file by selecting
both
from the output menu.to open settings panels for
audio device writer
andaudio file writer
configuration, click .
call custom visualization of audio plugin
if your audio plugin has a custom visualization method, you can view the
visualization in the audio test bench. to open the custom visualization
of audiopluginexample.varslopebandpassfilter
, click and select variable slope
bandpass
. 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 available only in matlab and not in generated plugins.
synchronize plugin property with midi control
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 and select variable slope
bandpass
. synchronize the lowcutoff
and
highcutoff
properties with midi controls you choose. click
ok.
see for more information.
play the audio and save the output file
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 according to the audio file writer
settings you configured for the output.
audio playback is not supported in .
validate and generate audio plugin
to open the validation and generation dialog box, click and select variable slope
bandpass
.
you can validate your matlab audio plugin code and generate audio plugin binaries. in the coder configuration section, you can specify libraries for deep learning and code replacement when generating plugins. see , , and for more information.
plugin generation is not supported in .
generate matlab script
to generate a matlab script that implements a test bench with the current app settings for the cascade of plugins, click .
you can modify the code for complete control over the test bench environment.
see also
| | |