Include an Audio Plugin in Simulink
This example shows how to use the Audio Plugin block to include an audio plugin in a Simulink® model.
Generate Block from Plugin
Place the Audio Plugin block in a Simulink model. You can find the block in the Audio Toolbox / User-Defined Functions library.
Double-click the block to open the dialog box. In the Audio
plugin field, enter the plugin
audiopluginexample.Echo
. To inspect the source code for
this plugin, enter edit audiopluginexample.Echo
in the
command line. Optionally, specify the name and location of the generated
System object™ class file using the Generated file name
field.
Click OK to generate a block with the same functionality as the plugin. This also generates the System object class file and places it in the current directory by default. The file must be on the MATLAB® path for the generated block to work.
Double-clicking the new block opens the parameter dialog box, where you can view and edit the plugin parameters. You can also choose to specify the tunable parameters through additional input ports on the block.
Use Generated Audio Plugin Block in Model
Use the plugin in a model to process an audio signal and listen to the results. Add a Slider (Simulink) block to the model to tune the gain parameter of the plugin during simulation.