FreeverbReverberator example Plugin error

1 次查看(过去 30 天)
Hi
I´m trying to use the FreeverbReverberator as part of a more complex plugin. When I test it through audioTestBench as MatlabCode everything ok, but when I try to validate it for plugin creation, the following error appears:
"Unable to perform assignment because the left and right sides have a different number of elements.
Error in audioexample.FreeverbReverberator/parallelComb (line 261)
in(1:end) = sum(drySignal,2); "
Debugging the FreeverbReverberator code, I could verify that this missmatch in number of elements happens after the 1st cycle. So I have two questions:
1) Why this doesn´t happen when running as .m?
2) Is there any way to fix it for plugin creation porpouse?
If someone can shed light on this, I´d appretiatted.
Thanks
Pablo
PS: Follows the simple code, just in case you want to reproduce the issue described above. Bear in mind the error is refered to FreeverbReverberator code.
classdef Freeverb < audioPlugin
properties
RoomSize=0.6
WetDryMix = 1;
end
properties (Access = private)
preverb
end
properties (Constant)
PluginInterface = audioPluginInterface('PluginName','Ambience Creator','VendorName','Orion',......
audioPluginParameter('RoomSize',...
'DisplayName','',...
'Mapping',{'lin',0,1},...
'Label','m',...
'Style', 'hslider'),...
audioPluginParameter('WetDryMix',...
'DisplayName','',...
'Mapping',{'lin',0,1},...
'Label','m',...
'Style', 'hslider'));
end
methods
function plugin=Freeverb
plugin.preverb=audioexample.FreeverbReverberator;
end
function out = process(plugin, in)
outrev=plugin.preverb(in);
out=outrev;
end
%%
function set.RoomSize(plugin, val)
plugin.RoomSize = val;
calculatesize(plugin)
end
function set.WetDryMix(plugin, val)
plugin.WetDryMix = val;
calculatesize(plugin)
end
function calculatesize(plugin)
plugin.preverb.RoomSize=plugin.RoomSize;
plugin.preverb.WetDryMix=plugin.WetDryMix;
end
%%
function reset(plugin)
reset(plugin.preverb);
end
end
end

采纳的回答

Brian Hemmat
Brian Hemmat 2020-8-15
Hi Pablo,
Audio plugin API requires plugins to support variable-sized input. The audioexample.FreeverbReverberator does not support variable-sized input. The validateAudioPlugin function exercises the plugin by inputting different size inputs, which is how you hit that error.
Consider using the reverberator object instead. You can use it within another audio plugin, or use createAudioPluginClass to convert it to an audio plugin.
  3 个评论
Charlie DeVane
Charlie DeVane 2020-8-24
Hi Pablo,
You might be interested in Warren Koontz's MVPlugin. I don't anything about its relative CPU consumption, though.
hth,
Charlie
Pablo Panitta
Pablo Panitta 2020-8-25
Thanks Charlie! Actually is what I´m using. Its CPU consumption is much much lower than reverberator. However, I find reverberator algorithm better in sound than MV´s one.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by