AudioPlugin GUI & decimal places
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi
The following code position two point , and calculate the attenuation between them based on distance. This is not the code I´m building, but properly ilustrate the questions I have:
1) Is it possible to display an XY plot (running as .vst) where I can show the position of each points?
2) Is it possible to define the decimal places to show for the parameters ? (when running as .vst, 3 decimal places are shown , eg 1.100 mts instead 1.1 mts). Wasn´t possible couple of years ago, but I don´t know if something has changed in latest releases.
Thanks in advance.
Br
Pablo
classdef ExperimentalGUI < audioPlugin
properties
Sx=5;
Sy=3;
Rx=5;
Ry=2;
Sz=1.7;
end
properties (Access = private)
AttDI
end
properties (Constant)
PluginInterface = audioPluginInterface('PluginName','ExperimentalGUI',...
audioPluginParameter('Sx',...
'DisplayName','Source x',...
'DisplayNameLocation','none',...
'Mapping',{'lin',0.5,9.5},...
'Label','mts',...
'Style', 'hslider','Layout', [9,5;9,8]),...
audioPluginParameter('Sy',...
'DisplayName','Source y',...
'Mapping',{'int',1,9},...
'DisplayNameLocation','none',...
'Label','mts',...
'Style', 'vslider','Layout', [3,3;7,4]),...
audioPluginParameter('Rx',...
'DisplayName','Receiver x',...
'DisplayNameLocation','none',...
'Mapping',{'lin',0.5,9.5},...
'Label','mts',...
'Style', 'hslider','Layout', [11,5;11,8]),...
audioPluginParameter('Ry',...
'DisplayName','Receiver y',...
'DisplayNameLocation','none',...
'Mapping',{'lin',0.5,9.5},...
'Label','mts',...
'Style', 'vslider','Layout', [3,1;7,2]),...
audioPluginParameter('Sz',...
'DisplayName','Heigth Source',...
'Mapping',{'lin',0.1,2.9},...
'DisplayNameLocation','none',...
'Label','mts',...
'Style', 'rotaryknob','Layout', [1,1;1,3]),... %[7,10;9,10]
audioPluginGridLayout('RowHeight', [90 10 90 10 90 10 50 10 50 10 50], ...
'ColumnWidth', [70 20 70 20 70 70 70 60],'RowSpacing',1));
end
methods
function plugin=ExperimentalGUI
needtocalculateAttenuation(plugin);
end
function out = process(plugin, in)
out=in*plugin.AttDI;
end
%%
function set.Sx(plugin, val)
plugin.Sx = val;
needtocalculateAttenuation(plugin)
end
function set.Sy(plugin,val)
plugin.Sy=val;
needtocalculateAttenuation(plugin)
end
function set.Rx(plugin, val)
plugin.Rx = val;
needtocalculateAttenuation(plugin)
end
function set.Ry(plugin,val)
plugin.Ry=val;
needtocalculateAttenuation(plugin)
end
function set.Sz(plugin,val)
plugin.Sz=val;
needtocalculateAttenuation(plugin)
end
%-----Direct Path HRTF--------
%%
function needtocalculateAttenuation(plugin) % Attenuation Calculation
LDI=sqrt((plugin.Sx-plugin.Rx)^2+(plugin.Sy-plugin.Ry)^2+(plugin.Sz-1.7)^2);
if LDI<1
plugin.AttDI=1;
else
plugin.AttDI=1/(LDI)^2;
end
end
end
end
댓글 수: 0
채택된 답변
Walter Roberson
2021년 3월 17일
2) The interface has not changed. There is no method provided to customize the display.
https://www.mathworks.com/matlabcentral/answers/489866-units-in-audio-plugin-interface?s_tid=srchtitle
댓글 수: 2
Jimmy Lapierre
2021년 5월 3일
You can customize the look of the GUI, but there is no way to change the number of decimal places or add a plot at this time.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio Plugin Creation and Hosting에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!