develop, analyze, and debug plugins in audio test bench -凯发k8网页登录

main content

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

screenshot of the audio test bench interface with a field to choose a plugin to load

in the add an object under test field, enter audiopluginexample.varslopebandpassfilter and press enter. alternatively, you can click the folder icon 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.

screenshot of the variable slope bandpass filter plugin interface in the audio test bench

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 the add button 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.

interfaces of both plugins in the audio test bench

you can change the order of the plugins in the cascade by selecting a plugin from the objects under test and clicking the up arrow or the down arrow to move it up or down. you can also remove a plugin by selecting it and clicking the trash icon.

run audio test bench

to run the audio test bench and stream audio through your plugins, click play button. use the ui controls to tune the plugin parameters while streaming.

to stop the audio stream loop, click the stop button. 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 the reset button.

click the play button to run the audio test bench again.

debug source code of audio plugin

to pause the audio test bench, click the pause button.

to open the source file of your audio plugin, click view source 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 the play button on the audio test bench.

screenshot of the set.transitiontime function in the editor with a breakpoint set

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 time scope. to open a spectrum analyzer to visualize the frequency-domain input and output, click spectrum analyzer. 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 the stop button.

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 .

  1. select audio file reader.

  2. click to open the settings panel for audio file reader configuration.

    screenshot of the audio file reader settings

    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.

  3. in the audio file box, enter: rockdrums-44p1-stereo-11secs.mp3

click the gear icon again to close the settings panel. to run the audio test bench with your new input, click the play button.

to release your output object and stop the audio stream loop, click the stop button.

configure output from audio test bench

the output list contains these options corresponding to system objects:

  • audio device writer ––

  • audio file writer ––

  • both –– and

  • 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.

the audio device writer and both options are not supported in .

  1. choose to output to device and file by selecting both from the output menu.

  2. to open settings panels for audio device writer and audio file writer configuration, click .

screenshot of the audio file writer settings

screenshot of the audio device writer settings

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 visualize plugin 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 midi 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 the play button. 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 generate audio plugin and select variable slope bandpass.

screenshot of the audio plugin generator interface

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 generate script.

screenshot of generated code in an untitled script in the editor

you can modify the code for complete control over the test bench environment.

see also

| | |

related topics

网站地图