Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

audioPluginInterface

Specify audio plugin interface

Syntax

PluginInterface = audioPluginInterface
PluginInterface = audioPluginInterface(pluginParameters)
PluginInterface = audioPluginInterface(Name,Value)

Description

example

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 for identification.

example

PluginInterface = audioPluginInterface(pluginParameters) specifies audio plugin parameters, which are user-facing variables associated with audio plugin properties. See audioPluginParameter for more details.

example

PluginInterface = audioPluginInterface(Name,Value) specifies audioPluginInterface properties using one or more Name,Value pair arguments.

Examples

collapse all

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

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.

Create a basic audio plugin class definition file. Specify the plugin name, vendor name, vendor version, unique identification, number of input channels, and number of output channels.

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);
    end
    methods
        function out = process(plugin,in)
            out = in*plugin.Gain;
        end
    end
end

Input Arguments

collapse all

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, they synchronize plugin class properties with user-facing parameters.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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

collapse all

Name of your generated plugin, as seen by a host audio application, specified as a comma-separated pair consisting of 'PluginName' and a 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.

Vendor name of the plugin creator, specified as the comma-separated pair 'VendorName' and a string of up to 127 characters.

Vendor version used to track plugin releases, specified as a comma-separated pair consisting of 'VendorVersion' and a dot-separated string of 1–3 integers in the range 0 to 9.

Example: '1'

Example: '1.4'

Example: '1.3.5'

Unique identifier for your plugin, specified as a comma-separated pair consisting of 'UniqueID' and a four-character string, used for recognition in certain digital audio workstation (DAW) environments.

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.

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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2016a

Was this topic helpful?