Smoothing output in delay plugin

1 回表示 (過去 30 日間)
Pablo Panitta
Pablo Panitta 2021 年 4 月 20 日
編集済み: Pablo Panitta 2021 年 4 月 27 日
Hi
I´m trying to simulate audio room reflection using dsp.VariableIntegerDelay ,where distance parameter dictates the delay amount. The issue I´m experiencing are the glitches and artifacts every time I change the "distance" parameter fast. As I´m thinking in a plugin where the objects can be moved, I need to solve this.
I understand that this can be overcome, smoothing the output (or may be "distance" parameter?), but I don´t find the way of how to implement it here.
I would really appreciate If anybody can give me a hint or propose an alternative solution / method.
Thanks
Pablo
classdef Delay_Test< audioPlugin
properties
distance=1;
end
properties (Access = private)
FractionalDelayDI
delayInSamplesDI
pSR
end
properties (Constant)
PluginInterface = audioPluginInterface('PluginName','Delay_Test',...
'InputChannels',2,'OutputChannels',2, ...
audioPluginParameter('distance',...
'DisplayName','',...
'Mapping',{'lin',0.5,19.5},...
'Label','mts'));
end
methods
function plugin=Delay_Test
plugin.pSR = getSampleRate(plugin);
plugin.FractionalDelayDI = dsp.VariableIntegerDelay('MaximumDelay',65535);
needtocalculateDelay(plugin);
end
function out=process(plugin,in)
echo=plugin.FractionalDelayDI(in,plugin.delayInSamplesDI);
out=in+echo;
end
function set.distance(plugin, val)
plugin.distance = val;
needtocalculateDelay(plugin);
end
function needtocalculateDelay(plugin)
plugin.delayInSamplesDI=(plugin.distance/330)*plugin.pSR;
end
function reset(plugin)
reset(plugin.FractionalDelayDI);
end
end
end

採用された回答

Brian Hemmat
Brian Hemmat 2021 年 4 月 25 日
The example plugin, audiopluginexample.DampedVolumeController, might be helpful for this issue.
  1 件のコメント
Pablo Panitta
Pablo Panitta 2021 年 4 月 27 日
編集済み: Pablo Panitta 2021 年 4 月 27 日
Hi Brian
Seems you´re right. I´ll tryin this way
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio Plugin Creation and Hosting についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by