Smoothing audio output of filters applied frame by frame

2 views (last 30 days)
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 Comment
Mathieu NOE
Mathieu NOE on 20 Dec 2020
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

Sign in to comment.

Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!