AudioPlugin GUI & decimal places
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Pablo Panitta
el 17 de Mzo. de 2021
Comentada: Jimmy Lapierre
el 3 de Mayo de 2021
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 comentarios
Respuesta aceptada
Walter Roberson
el 17 de Mzo. de 2021
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 comentarios
Jimmy Lapierre
el 3 de Mayo de 2021
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio Plugin Creation and Hosting en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!