Stereo Convolution Reverb (VST audio plugin)

130 views (last 30 days)
Satoshi Suzuki
Satoshi Suzuki on 17 Sep 2018
Answered: jibrahim on 10 Dec 2018
Dear everyone
I am trying to generate vst, simple convolution reverb.
What is wrong?
classdef Stereo_Convolver_Basic < audioPlugin
properties (Constant)
% audioPluginInterface manages the number of input/output channels
% and uses audioPluginParameter to generate plugin UI parameters.
PluginInterface = audioPluginInterface(...
'InputChannels',2,...
'OutputChannels',2,...
'PluginName','Stereo Convolver'...
);
IR = audioread('./IR/st_georges_far.wav');
PartitionSize = 1024;
end
properties(Access = private)
pFIR_L = dsp.FrequencyDomainFIRFilter('Numerator', plugin.IR(:,1).', ...
'PartitionForReducedLatency', true, 'PartitionLength', plugin.PartitionSize);
pFIR_R = dsp.FrequencyDomainFIRFilter('Numerator', plugin.IR(:,2).', ...
'PartitionForReducedLatency', true, 'PartitionLength', plugin.PartitionSize);
end
methods
function y = process(plugin,u)
x = u(:,1)+u(:,2);
x = x * 0.5;
yL = step(plugin.pFIR_L,x);
yR = step(plugin.pFIR_R,x);
y = [yL,yR];
end
end
end
  1 Comment
Satoshi Suzuki
Satoshi Suzuki on 17 Sep 2018
This is the Error Message
Error using audio.ui.AudioTestBenchModel/setupSUT
Input to audioTestBench must be a valid class on the MATLAB path.
Error in audio.ui.AudioTestBenchModel
Error in audioTestBench (line 73)
singleInstance =
audio.ui.AudioTestBenchModel(plugin,inputname(1));

Sign in to comment.

Answers (1)

jibrahim
jibrahim on 10 Dec 2018
Hi Satoshi,
You can't set your FIR filters in the private properties block like that. One way to do this is to set them in an object constructor instead:
classdef Stereo_Convolver_Basic < audioPlugin
properties (Constant)
% audioPluginInterface manages the number of input/output channels
% and uses audioPluginParameter to generate plugin UI parameters.
PluginInterface = audioPluginInterface(...
'InputChannels',2,...
'OutputChannels',2,...
'PluginName','Stereo Convolver'...
);
IR = audioread('./IR/st_georges_far.wav');
PartitionSize = 1024;
end
properties(Access = private)
pFIR_L
pFIR_R
end
methods
function plugin = Stereo_Convolver_Basic
plugin.pFIR_L = dsp.FrequencyDomainFIRFilter('Numerator', plugin.IR(:,1).', ...
'PartitionForReducedLatency', true, 'PartitionLength', plugin.PartitionSize);
plugin.pFIR_R = dsp.FrequencyDomainFIRFilter('Numerator', plugin.IR(:,2).', ...
'PartitionForReducedLatency', true, 'PartitionLength', plugin.PartitionSize);
end
function y = process(plugin,u)
x = u(:,1)+u(:,2);
x = x * 0.5;
yL = step(plugin.pFIR_L,x);
yR = step(plugin.pFIR_R,x);
y = [yL,yR];
end
end
end

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!