Unexpected output of octaveFilter
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Leonard
el 10 de Ag. de 2022
Hey Guys,
I have a problem with the OcataveFilter or do not understand the specific output yet. Maybe you could help me.
So first I create an octaveFilter object.
centerFreq = 800;
bw = '1/3 octave';
Fs = 16000;
octFilt = octaveFilter(centerFreq,bw,'SampleRate',Fs);
My audio data is available as a vector (audio_data). I pass this vector to the system object. Here I keep to the appropriate documentation
filtered_audio_data = octfilt(audio_data);
Now I have presented the data here: I do not understand this behavior. Why is the course between filtered and undfiltered exactly identical ? My expected result is shown at the very bottom. What am I doing wrong in the calculation and what do I have to do to get the expected result ?
Thanks fpr your advice and help
Before Filtering (audio_data):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1093020/image.png)
After Filtering (filtered_audio_data):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1093025/image.png)
Expected Result:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1093030/image.png)
0 comentarios
Respuesta aceptada
jibrahim
el 12 de Ag. de 2022
Hi Leonard,
The first thing to check is that your input is a column vector. octaveFilter treats each column of data as an independent channel. Second, keep in mind the filter has memory, so there will be transient behavior. If you call the object with a short input, you might be still in the transient region. You need to either call it with more data, or call it more times with more data
2 comentarios
jibrahim
el 15 de Ag. de 2022
Editada: jibrahim
el 15 de Ag. de 2022
Hi Leonard,
Maybe this code helps if you compare with yours. Not sure what's the problem, but this snippet shows the same filter actually modifying a simple test signal:
centerFreq = 800;
bw = '1/3 octave';
Fs = 16000;
octFilt = octaveFilter(centerFreq,bw,'SampleRate',Fs);
octFilt.visualize % see the theoretical response
% Hopefully the filter will attenuate one sine and pass the other one:
osc = audioOscillator(NumTones=2, Frequency=[800 2000],SampleRate=Fs);
scope = timescope(SampleRate=Fs);
for index=1:100
x = osc();
y = octFilt(x);
scope([x,y]) % compare before and after
end
Más respuestas (0)
Ver también
Categorías
Más información sobre Measurements and Spatial Audio en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!