generateAudioPlugin
Generate audio plugin fromMATLABclass
Description
generateAudioPlugin
generates a VST 2 audio plugin from a MATLAB®class specified byclassName
className
. SeeSupported Compilersfor a list of compilers supported bygenerateAudioPlugin
.
例子
Generate Audio Plugin
generateAudioPluginaudiopluginexample.Echo
.......
A VST 2 plugin with file nameEcho
is saved to your current folder. The extension of your plugin depends on your operating system.
Specify Output Folder for Generated Plugin
mkdir(fullfile(pwd,'myPluginFolder')) generateAudioPlugin-outdirmyPluginFolderaudiopluginexample.Echo
.......
A VST 2 plugin with file nameEcho
is saved to your specified folder,myPluginFolder
. The extension of your plugin depends on your operating system.
Specify File Name of Generated Plugin
generateAudioPlugin-outputawesomeEffectaudiopluginexample.Echo
.......
A VST 2 plugin with file nameawesomeEffect
is saved to your current folder. The extension of your plugin depends on your operating system.
Specify Output Folder and File Name of Generated Plugin
mkdir(fullfile(pwd,'myPluginFolder')) generateAudioPlugin-outputcoolEffect-outdirmyPluginFolderaudiopluginexample.Echo
.......
A VST 2 plugin with file namecoolEffect
is saved to your specified folder,myPluginFolder
. The extension of your plugin depends on your operating system.
Generate win32 Plugin from win64 System
generateAudioPlugin-win32audiopluginexample.Echo
.......
A 32-bit VST 2 plugin with file nameEcho.dll
is saved to your current folder.
Generate JUCE-Compatible Zip File
generateAudioPlugin-juceprojectaudiopluginexample.Echo
A zip file containing generated C/C++ code and a JUCER project file suitable for use with JUCE 5.3.2 to 6.0.8 is saved to your current folder.
Generate Standalone Executable
To generate a binary standalone executable, use the-exe
option. The following command savesEcho.exe
to your current folder.
generateAudioPlugin-exeaudiopluginexample.Echo
.......
When you execute the generated code, the UI you defined in your audio plugin opens.
eval('!Echo.exe')
The standalone executable enables you to:
Configure audio input and output from the plugin. Synchronizing parameters with MIDI devices is not currently supported.
Save and load states.
Reset states to default values.
Input Arguments
options
—Options to specify output folder, plugin name, and file type
-au
|-vst
|-exe
|-juceproject
|-win32
|-output文件名
|-outdirfolder
文件名
folder
Options can be specified in any grouping, and in any order.
Option |
Description |
---|---|
-au |
Generates an Audio Unit (AU) v2 audio plugin binary. This syntax is only valid onmacOS. |
-vst |
Generates a VST 2 audio plugin binary. By default,generateAudioPlugin generates a VST 2 plugin. |
-exe |
Generates a standalone executable for your audio plugin. When you evaluate the generated code, the UI you defined in your audio plugin opens. You can control the input to your plugin and the output from your plugin usingOptions. |
-juceproject |
Creates a zip file containing generated C/C++ code and a JUCER project file suitable for use with JUCE 5.3.2 to 6.0.8. You can use the generated zip file to modify the generated plugin or compile it to a format other than VST 2.4. This option requires aMATLAB Coder™license. To use the generated files with JUCE, you must obtain your own appropriately licensed copy of JUCE. |
-win32 |
Creates a 32-bit audio plugin. Valid only on win64. This option does not support the |
-output |
Specifies the file name of the generated plugin or zip file. The appropriate extension is appended to the |
-outdir |
Generates a plugin or zip file to a specific folder. By default, the generated plugin is placed in the current folder. If |
-audioconfig |
Generates a plugin that uses a deep learning network or a code replacement library. See |
Only the-juceproject
option is supported inMATLABOnline.
className
—Name of plugin class to generate
plugin class
Name of the plugin class to generate. The plugin class must be on the MATLAB path. It must derive from either theaudioPlugin
class or theaudioPluginSource
class.
You can specify the plugin class to generate by specifying its class name or file name. For example, the following syntaxes perform equivalent operations:
generateAudioPlugin myPlugin
generateAudioPlugin myPlugin.m
If you want to specify the plugin class by file name, and your plugin class is inside a package, you must specify the package as a file path. For example, the following syntaxes perform equivalent operations:
generateAudioPlugin myPluginPackage.myPlugin
generateAudioPlugin +myPluginPackage/myPlugin.m
Limitations
Build problems can occur when using folder names with spaces. For more information, seeBuild Process Support for Folder Names(Simulink Coder)andWhy is the build process failing for a shipped model in Simulink or for a model run in Accelerator mode?.
More About
Generated VST Plugin File Extension
The extension of your generated VST plugin depends on your operating system.
Operating System |
File Extension |
---|---|
Windows |
|
macOS |
|
See Also
parameterTuner
|Audio Test Bench|弗吉尼亚州lidateAudioPlugin
|loadAudioPlugin
|audioPlugin
|audioPluginSource
|audioPluginConfig
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB命令
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
美洲
- América Latina(Español)
- Canada(English)
- United States(English)
Europe
- Belgium(English)
- Denmark(English)
- Deutschland(Deutsch)
- España(Español)
- Finland(English)
- France(Français)
- Ireland(English)
- Italia(Italiano)
- Luxembourg(English)
- Netherlands(English)
- Norway(English)
- Österreich(Deutsch)
- Portugal(English)
- Sweden(English)
- Switzerland
- United Kingdom(English)