audioPluginConfig
Specify coder configuration of audio plugin
Description
The audioPluginConfig
object enables you to validate and generate audio
plugins that use deep learning pretrained networks. This object also allows you to pass code
replacement libraries to the generateAudioPlugin
function.
Creation
Description
creates an object that describes the coder configuration for your audio plugin. Use
name-value arguments to specify the properties of the object.obj
= audioPluginConfig(Name,Value
)
This object generates a constant property called PluginConfig
for
audio plugin classes. Use the audioPluginConfig
object if your plugin uses deep
learning networks or a code replacement library.
Properties
DeepLearningConfig
— Deep learning library configuration
[]
(default) | coder.DeepLearningConfig('none')
| coder.DeepLearningConfig('mkldnn')
Deep learning library configuration, specified as an empty array
([]
), coder.DeepLearningConfig('none')
, or
coder.DeepLearningConfig('mkldnn')
.
[]
— Do not use a deep learning library.coder.DeepLearningConfig('none')
— Generate code that does not use any third-party library.coder.DeepLearningConfig('mkldnn')
— Generate code that uses the Intel® Math Kernel Library for Deep Neural Networks (Intel MKL-DNN). This option does not work on ARM®-based Macintosh platforms. This option is not supported with the-win32
option of thegenerateAudioPlugin
function.On Intel Macintosh platforms,
generateAudioPlugin
packages the required libraries (libdnnl.1.4.dylib
,libdnnl.1.dylib
,libdnnl.dylib
, andlibomp.dylib
) within the generated plugin bundle. The path to required the libraries is set to theINTEL_MKLDNN
environment variable. You must install the libraries. To distribute the generated plugin, you must have licenses to distribute the Intel MKL-DNN and OpenMP libraries.On Microsoft® Windows® platforms,
generateAudioPlugin
creates upon compilation a folder named
in the build directory. The folder contains the network weight files that are read by the generated plugin. When you add the generated plugin to a third-party DAW, you must copy the generated folder along with the plugin binary to your DAW's plugin location. The generated plugin will work in a DAW only if the required library MKL-DNN is visible to the DAW. To make the MKL-DNN library visible to a DAW, you must add the path to the MKL-DNN library to the Windows environment variablepluginName
_juceproject_NetworkWeightsPATH
.On Linux® platforms,
generateAudioPlugin
creates upon compilation a folder named.MWPluginData/
in your home directory. The folder contains the network weight files that are read by the generated plugin. The generated plugin will work in a DAW only if the required library MKL-DNN is visible to the DAW. To make the MKL-DNN library visible to a DAW, you must keep the MKL-DNN library in thepluginName
_juceproject_NetworkWeights/usr/lib
directory or in the/usr/local/lib
directory.
You must have MATLAB® Coder™ Interface for Deep Learning Libraries installed to use this property unless you choose the []
option. For more information, see coder.DeepLearningConfig
(MATLAB Coder). For more information about installing the
MKL-DNN library and setting the related environment variables, see Prerequisites for Deep Learning with MATLAB Coder (MATLAB Coder).
CodeReplacementLibrary
— Code replacement library configuration
''
(default) | 'none'
| 'Intel AVX (Windows)'
| 'DSP Intel AVX2-FMA (Windows)'
| 'DSP Intel AVX2-FMA (Linux)'
| 'DSP Intel AVX2-FMA (Mac)'
Code replacement library configuration, specified as an empty character vector
(''
), 'none'
, 'Intel AVX
(Windows)'
, 'DSP Intel AVX2-FMA (Windows)'
, 'DSP
Intel AVX2-FMA (Linux)'
, or 'DSP Intel AVX2-FMA (Mac)'
.
''
— Do not use a code replacement library.'none'
is equivalent to''
.'Intel AVX (Windows)'
— Generate code that uses the Intel AVX code replacement library. This option works only on Windows platforms. This option is not supported with the-win32
option of thegenerateAudioPlugin
function.'DSP Intel AVX2-FMA (Windows)'
— Generate code that uses the Intel DSP AVX2-FMA code replacement library. This option works only on Windows platforms. This option is not supported with the-win32
option of thegenerateAudioPlugin
function.'DSP Intel AVX2-FMA (Linux)'
— Generate a JUCE project that uses the Intel DSP AVX2-FMA code replacement library for Linux platforms. This option works only with the-juceproject
option of thegenerateAudioPlugin
function.'DSP Intel AVX2-FMA (Mac)'
— Generate code that uses the Intel DSP AVX2-FMA code replacement library. This option works only on Intel Macintosh platforms.
You must have Embedded Coder® installed to use this property.
Examples
Audio Configuration Information for Plugin Class Definition
Create the source file for a plugin class,
MyAudioPlugin
, that uses the Intel AVX code replacement library for Windows. Add a processing function to the class.
classdef MyAudioPlugin < audioPlugin properties (Constant) PluginConfig = audioPluginConfig( ... 'DeepLearningConfig',coder.DeepLearningConfig('none'), ... 'CodeReplacementLibrary','Intel AVX (Windows)'); end methods function out = process(~,in) out = in; end end end
To validate the plugin, use the validateAudioPlugin
function. To generate the plugin, use the generateAudioPlugin
function.
Audio Configuration Information on the Command Line
Create a DeepLearningConfigBase
configuration object
that generates code that does not use any third-party library. Use the
audioPluginConfig
object to specify a plugin that incorporates the previous
property and uses the Intel AVX code replacement library for Windows. Generate the audio plugin.
dlcfg = coder.DeepLearningConfig('none'); cfg = audioPluginConfig( ... 'DeepLearningConfig',dlcfg, ... 'CodeReplacementLibrary','Intel AVX (Windows)'); generateAudioPlugin -audioconfig cfg MyAudioPlugin
Version History
See Also
Functions
Objects
audioPlugin
|audioPluginInterface
|audioPluginParameter
|audioPluginSource
|coder.DeepLearningConfig
(MATLAB Coder)
Apps
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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.
Americas
- 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)