Unexpected output of octaveFilter
1 回表示 (過去 30 日間)
古いコメントを表示
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):

After Filtering (filtered_audio_data):

Expected Result:

0 件のコメント
採用された回答
jibrahim
2022 年 8 月 12 日
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 件のコメント
jibrahim
2022 年 8 月 15 日
編集済み: jibrahim
2022 年 8 月 15 日
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
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Measurements and Spatial Audio についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!