I'm trying to create a basic digital signal processing pipeline, to manipulate a WAV file. Nothing fancy, I'm just looking to apply some filtering.
My first attempt was to divide the input signal to N rectangular windows (which do not overlap), convert each window to the frequency domain, apply the filtering of my choice to the spectrum, convert it back to the time domain and insert the resulting window in place of the original one.
(By rectangular window, I mean rectangular in the time domain.)
This worked, however, the only downside was that there was a discontinuity at the edges of each window, severe enough to distort the overall signal and introduce harmonics of significant amplitude.
My attempt to resolve this was to replace the rectangular windows with Hann windows, and apply the same process. With non-overlapping windows, the obvious result was that the output signal became a set of Hann "pulses", which is as bad as the discontinuities.
I seem to be missing a very basic part of digital signal processing.
I understand the windows should overlap, but how exactly? Should the overlapping portions be averaged? How do we ensure that the amplitude of the resulting signal is unchanged despite Hann window overlapping/averaging?