Stereo Convolution Reverb (VST audio plugin)
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
Réponses (1)
jibrahim
le 10 Déc 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 commentaires
Voir également
Catégories
En savoir plus sur Simulation, Tuning, and Visualization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!