audioPluginInterface
Specify audio plugin interface
Syntax
Description
PluginInterface = audioPluginInterface
returns an object,
PluginInterface
, that specifies the interface of an audio
plugin in a digital audio workstation (DAW) environment. It also specifies interface
attributes, such as naming.
PluginInterface = audioPluginInterface(
specifies audio plugin parameters, which are user-facing values associated with
audio plugin properties. See pluginParameters
)audioPluginParameter
for more
details.
PluginInterface = audioPluginInterface(
specifies a grid layout for audio plugin parameter UI controls.pluginParameters
,gridLayout
)
PluginInterface = audioPluginInterface(___,
specifies Name,Value
)audioPluginInterface
properties using one or more
Name,Value
pair arguments.
Examples
Specify Default Audio Plugin Interface
Create a basic audio plugin class definition file.
classdef myAudioPlugin < audioPlugin methods function out = process(~,in) out = in; end end end
Add a constant property, PluginInterface
,
which is specified as an audioPluginInterface
object.
classdef myAudioPlugin < audioPlugin properties (Constant) PluginInterface = audioPluginInterface; end methods function out = process(~,in) out = in; end end end
Associate Property with Parameter
Create a basic audio plugin class definition file. Specify
a property, Gain
, and a processing function that
multiplies input by Gain
.
classdef myAudioPlugin < audioPlugin properties Gain = 1; end methods function out = process(plugin,in) out = in*plugin.Gain; end end end
Add a constant property, PluginInterface
,
which is specified as an audioPluginInterface
object.
classdef myAudioPlugin < audioPlugin properties Gain = 1; end properties (Constant) PluginInterface = audioPluginInterface; end methods function out = process(plugin,in) out = in*plugin.Gain; end end end
Pass audioPluginParameter
to audioPluginInterface
.
To associate the plugin property, Gain
, to a plugin
parameter, specify the first argument of audioPluginParameter
as
the property name, 'Gain'
.
classdef myAudioPlugin < audioPlugin properties Gain = 1; end properties (Constant) PluginInterface = audioPluginInterface(... audioPluginParameter('Gain')); end methods function out = process(plugin,in) out = in*plugin.Gain; end end end
If you generate and deploy myAudioPlugin
to
a digital audio workstation (DAW) environment, the plugin property, Gain
,
synchronizes with a user-facing plugin parameter.
Specify Interface Properties
Create a basic audio plugin class definition file. Specify the plugin name, vendor name, vendor version, unique identification, number of input channels, number of output channels, and a yellow background.
classdef monoGain < audioPlugin properties Gain = 1; end properties (Constant) PluginInterface = audioPluginInterface( ... audioPluginParameter('Gain'), ... 'PluginName','Simple Gain', ... 'VendorName','Cool Company', ... 'VendorVersion','1.0.0', ... 'UniqueId','1a1Z', ... 'InputChannels',1, ... 'OutputChannels',1, ... 'BackgroundColor','y'); end methods function out = process(plugin,in) out = in*plugin.Gain; end end end
Input Arguments
pluginParameters
— Audio plugin parameters
none (default) | one or more audioPluginParameter
objects
Audio plugin parameters, specified as one or more audioPluginParameter
objects.
To create an audio plugin parameter, use the audioPluginParameter
function. In a digital audio workstation (DAW) environment, audio plugin
parameters synchronize plugin class properties with user-facing
parameters.
gridLayout
— Layout for plugin UI
none (default) | audioPluginGridLayout
object
Audio plugin grid layout, specified as an audioPluginGridLayout
object.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'PluginName','cool effect','VendorVersion','1.0.2'
specifies
the name of the generated audio plugin as 'cool effect'
and
the vendor version as '1.0.2'
.
PluginName
— Name of generated plugin
name of plugin class (default) | character vector | string
Name of your generated plugin, as seen by a host audio application, specified as a
comma-separated pair consisting of 'PluginName'
and a
character vector or string of up to 127 characters. If
'PluginName'
is not specified, the generated
plugin is given the name of the audio plugin class it is generated
from.
Note
A plugin name cannot contain any of the following:
The special characters
<
,>
,:
,"
,/
,\
,|
,?
, or*
A trailing period (for example,
"MyPlugin."
)A trailing space (for example,
"MyPlugin "
)Control characters, such as the newline character
Additionally, the plugin name cannot be a system reserved filename
(with or without a file extension), such as COM1 on Windows®. For example, "COM1"
and
"COM1.plugin"
are not valid plugin
names.
VendorName
— Vendor name of plugin creator
' ' (default) | character vector
Vendor name of the plugin creator, specified as the comma-separated
pair 'VendorName'
and a character vector of up to 127
characters.
VendorVersion
— Vendor version
'1.0.0'
(default) | dot-separated character vector or string
Vendor version used to track plugin releases, specified as a comma-separated pair consisting
of 'VendorVersion'
and a dot-separated character
vector or string of 1–3 integers in the range 0 to 9.
Example: '1'
Example: '1.4'
Example: '1.3.5'
UniqueId
— Unique identifier of plugin
'MWap'
(default) | four-element character vector or string
Unique identifier for your plugin, specified as a comma-separated pair consisting of
'UniqueID'
and a four-element character vector or
string, used for recognition in certain digital audio workstation (DAW)
environments.
InputChannels
— Input channels
2
(default) | integer | vector of integers
Input channels, specified as a comma-separated pair consisting
of 'InputChannels'
and an integer or vector of
integers. The input channels are the number
of input data arguments and associated channels (columns) passed to
the processing function of your audio plugin.
Example: 'InputChannels',3
calls the processing
function with one data argument containing 3 channels.
Example: 'InputChannels',[2,4,1,5]
calls the processing function with
4
data arguments. The first argument contains 2
channels, the second contains 4 channels, the third contains 1 channel,
and the fourth contains 5 channels.
Note
This property is not applicable for audio source plugins, and must be omitted.
OutputChannels
— Output channels
2
(default) | integer | vector of integers
Output channels, specified a comma-separated pair consisting
of 'OutputChannels'
and an integer or vector of
integers. The output channels are the number
of input data arguments and associated channels (columns) passed from
the processing function of your audio plugin.
Example: 'OutputChannels',3
specifies the
processing function to output one data argument containing 3 channels.
Example: 'OutputChannels',[2,4,1,5]
specifies the processing function to
output 4 data arguments. The first argument contains 2 channels, the
second contains 4 channels, the third contains 1 channel, and the fourth
contains 5 channels.
BackgroundColor
— Color used for GUI background
RGB triplet | short name | long name
Color used for GUI background, specified as short or long color name string, or an RGB triplet
Example: 'BackgroundColor',[1 1 0]
specifies the GUI
background to be yellow.
Example: 'BackgroundColor','y'
specifies the GUI
background to be yellow.
Example: 'BackgroundColor','yellow'
specifies the
GUI background to be yellow.
Color Name | Short Name | RGB Triplet | Hexadecimal Color Code | Appearance |
---|---|---|---|---|
"red" | "r" | [1 0 0] | "#FF0000" | |
"green" | "g" | [0 1 0] | "#00FF00" | |
"blue" | "b" | [0 0 1] | "#0000FF" | |
"cyan"
| "c" | [0 1 1] | "#00FFFF" | |
"magenta" | "m" | [1 0 1] | "#FF00FF" | |
"yellow" | "y" | [1 1 0] | "#FFFF00" | |
"black" | "k" | [0 0 0] | "#000000" | |
"white" | "w" | [1 1 1] | "#FFFFFF" |
Here are the RGB triplets and hexadecimal color codes for the default colors MATLAB® uses in many types of plots.
RGB Triplet | Hexadecimal Color Code | Appearance |
---|---|---|
[0 0.4470 0.7410] | "#0072BD" | |
[0.8500 0.3250 0.0980] | "#D95319" | |
[0.9290 0.6940 0.1250] | "#EDB120" | |
[0.4940 0.1840 0.5560] | "#7E2F8E" | |
[0.4660 0.6740 0.1880] | "#77AC30" | |
[0.3010 0.7450 0.9330] | "#4DBEEE" | |
[0.6350 0.0780 0.1840] | "#A2142F" |
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| char
| string
BackgroundImage
— Image used for GUI background
char | string
Image used for GUI background, specified by its file name using either a character vector or string. If the file is not on path, you must specify the full file path. Supported file types are PNG, GIF, and JPG.
The background image may include transparencies, in which case the
BackgroundColor
is used.
Example: 'BackgroundImage','Sunrise.png'
specifies
the GUI background image to be the 'Sunrise'
image.
Example: 'BackgroundImage',fullfile(matlabroot,"mySkins","Sunset.jpg")
specifies the GUI background to be the 'Sunset'
image.
Data Types: char
| string
Version History
Introduced in R2016a
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)