AudioPlugin GUI & decimal places

조회 수: 2 (최근 30일)
Pablo Panitta
Pablo Panitta 2021년 3월 17일
댓글: Jimmy Lapierre 2021년 5월 3일
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

채택된 답변

Walter Roberson
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
Pablo Panitta
Pablo Panitta 2021년 3월 17일
편집: Pablo Panitta 2021년 3월 17일
Thanks. I opened a ticked long time ago (#03890290), and TS agent commited to send an improvement request. Seems didn´t progress.
Jimmy Lapierre
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 CenterFile Exchange에서 Audio Plugin Creation and Hosting에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by