Smoothing audio output of filters applied frame by frame
조회 수: 5 (최근 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
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 Center 및 File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!