Stereo Convolution Reverb (VST audio plugin)
130 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
Respuestas (1)
jibrahim
el 10 de Dic. de 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
0 comentarios
Ver también
Categorías
Más información sobre Simulation, Tuning, and Visualization 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!