FreeverbReverberator example Plugin error

조회 수: 1 (최근 30일)
Pablo Panitta
Pablo Panitta 2020년 8월 5일
댓글: Pablo Panitta 2020년 8월 25일
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