%% Power Parameter Mapping
% The following class definition uses power parameter mapping to define the relationship between a property and a parameter. You can use the plugin created from this class to tune the gain of an audio signal in dB.
% classdef pluginWithPowerMapping < audioPlugin
%     properties
%         Gain = 0;
%     end
%     properties (Constant)
%         PluginInterface = audioPluginInterface( ...
%             audioPluginParameter('Gain', ...
%             'Label','dB', ...
%             'Mapping',{'pow', 1/3, -140, 12}, ...
%             'Style','rotary', ...
%             'Layout',[1,1]), ...
%             audioPluginGridLayout);
%     end
%     methods
%         function out = process(plugin,in)
%             dBGain = 10^(plugin.Gain/20);
%             out = in*dBGain;
%         end
%     end
% end
%
% To run the plugin, save the class definition to a local folder and then call the Audio Test Bench.

audioTestBench(pluginWithPowerMapping)

%
%
% Copyright 2012 The MathWorks, Inc.