Smoothing audio output of filters applied frame by frame

3 次查看(过去 30 天)
Hello everyone,
I have a bank of N FIR filters. I want to use ach one of them to filter a each of the N frames of an audio signal. My code is something like this:
for i = 1:N
audioFrame = audioSignal(1 + (I - 1)*frameLength:I*frameLength);
audioOutFrame(:, I) = fftfilt(filterBank(:, I), audioFrame);
end
audioOut = audioOutFrame(:);
In the end, both audioOut and audioSignal are column vectors of the same length (N*frameLength). The problem is that when I playback audioOut (using the sound function, for example), it sounds... "glitchy" (there is a periodic pulsating-like noise).
When I zoomed to look what whats happening with audioOut, I found that the transition of the frames was "too rough".
If anyone coud guide me on how to fix this problem. I would gladly appreciate it. Thanks in advance.
  1 个评论
Mathieu NOE
Mathieu NOE 2020-12-20
hello
I wonder if using filter instead of fftfilt would reduce the transients at start / end of buffers
second, if the problem persists, why not doing a kind of moving average of a few samples where end of previous buffer joins the start of the next buffer
attached a moving average window filter code

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by