crossFilt causing Matlab audio plugin pops
Audio plugin splits incoming audio into three bands and applies gain to center band and sums all back together. Debugging by only writing out one band, continuous pop noise still occurs. Is this because the crossover filter should be done with a different method in the App?
When I do this process offline in a normal m file there is no distortion.
classdef test_process < audioPlugin
properties
LowBand = 500;
HighBand = 5000;
fs = 48000;
gain = 0;
end
properties (Constant)
PluginInterface = audioPluginInterface( …
audioPluginParameter(‘LowBand’,’Label’,’Hz’,’Mapping’,{‘lin’,70,1000}),…
audioPluginParameter(‘HighBand’,’Label’,’Hz’,’Mapping’,{‘lin’,2000,10000}),…
audioPluginParameter(‘gain’,’Label’,’dB’,’Mapping’,{‘lin’,0,20}));
end
methods
function out = process(plugin,in)
%set up crossover filter
crossFilt = crossoverFilter( …
NumCrossovers=2, …
CrossoverFrequencies=[plugin.LowBand,plugin.HighBand], …
CrossoverSlopes=12, …
SampleRate=plugin.fs);
[m1,m2,m3] = crossFilt(in); % split into three bands
%normal operation commented out for debug
% midGain = m2*(db2mag(plugin.gain)); % apply gain to mid band
% out = m1+midGain+m3; % sum three bands
%Test without any sum
out = m2; % test just mid band
end
end
endAudio plugin splits incoming audio into three bands and applies gain to center band and sums all back together. Debugging by only writing out one band, continuous pop noise still occurs. Is this because the crossover filter should be done with a different method in the App?
When I do this process offline in a normal m file there is no distortion.
classdef test_process < audioPlugin
properties
LowBand = 500;
HighBand = 5000;
fs = 48000;
gain = 0;
end
properties (Constant)
PluginInterface = audioPluginInterface( …
audioPluginParameter(‘LowBand’,’Label’,’Hz’,’Mapping’,{‘lin’,70,1000}),…
audioPluginParameter(‘HighBand’,’Label’,’Hz’,’Mapping’,{‘lin’,2000,10000}),…
audioPluginParameter(‘gain’,’Label’,’dB’,’Mapping’,{‘lin’,0,20}));
end
methods
function out = process(plugin,in)
%set up crossover filter
crossFilt = crossoverFilter( …
NumCrossovers=2, …
CrossoverFrequencies=[plugin.LowBand,plugin.HighBand], …
CrossoverSlopes=12, …
SampleRate=plugin.fs);
[m1,m2,m3] = crossFilt(in); % split into three bands
%normal operation commented out for debug
% midGain = m2*(db2mag(plugin.gain)); % apply gain to mid band
% out = m1+midGain+m3; % sum three bands
%Test without any sum
out = m2; % test just mid band
end
end
end Audio plugin splits incoming audio into three bands and applies gain to center band and sums all back together. Debugging by only writing out one band, continuous pop noise still occurs. Is this because the crossover filter should be done with a different method in the App?
When I do this process offline in a normal m file there is no distortion.
classdef test_process < audioPlugin
properties
LowBand = 500;
HighBand = 5000;
fs = 48000;
gain = 0;
end
properties (Constant)
PluginInterface = audioPluginInterface( …
audioPluginParameter(‘LowBand’,’Label’,’Hz’,’Mapping’,{‘lin’,70,1000}),…
audioPluginParameter(‘HighBand’,’Label’,’Hz’,’Mapping’,{‘lin’,2000,10000}),…
audioPluginParameter(‘gain’,’Label’,’dB’,’Mapping’,{‘lin’,0,20}));
end
methods
function out = process(plugin,in)
%set up crossover filter
crossFilt = crossoverFilter( …
NumCrossovers=2, …
CrossoverFrequencies=[plugin.LowBand,plugin.HighBand], …
CrossoverSlopes=12, …
SampleRate=plugin.fs);
[m1,m2,m3] = crossFilt(in); % split into three bands
%normal operation commented out for debug
% midGain = m2*(db2mag(plugin.gain)); % apply gain to mid band
% out = m1+midGain+m3; % sum three bands
%Test without any sum
out = m2; % test just mid band
end
end
end audio plugin MATLAB Answers — New Questions