VST Code generation issues with element-wise multiplication
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
The following code produces audible discontinuities when compiled to a VST:
gains = [0.5, 0.725];
out = in .* gains;
But this works fine
gains = [0.5, 0.725];
out = [in(:,1) * gains(1), in(:,2) * gains(2)];
Is this a known issue with code generation?
0 Commenti
Risposte (1)
VBBV
il 11 Nov 2022
gains = [0.5, 0.725];
in = rand(8)
out = [in(:,1) * gains(1), in(:,2) * gains(2)]
out = in .* gains % check the matrix multiplication rule
3 Commenti
Jimmy Lapierre
il 11 Nov 2022
I was able to reproduce the issue. I will investigate further.
>> p=loadAudioPlugin('GainTest.dll')
p =
VST plugin 'GainTest' 2 in, 2 out
>> process(p,ones(4,2))
ans =
0.5000 0.7250
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
Please use the workaround in the meantime.
p.s. modifying the input in-place is allowed, so it could look like this:
function x = process(~,x)
gains = [0.5, 0.725];
x(:,1) = gains(1)*x(:,1);
x(:,2) = gains(2)*x(:,2);
end
Vedere anche
Categorie
Scopri di più su Audio Plugin Creation and Hosting in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!