I'm running analysis on a multichannel audio signal and due to the size have decided to process it in blocks (my computer doesn't have enough memory to process it in one go). Some of the data produced by the analysis needs to be smoothed.
The smoothing function means that each sample was an average of the samples contained within a window and the window being centered around sample n. At the edges this obviously isn't possible so the at the start of the signal the window remains static until such point that sample
n is in the centre of the window, and then the window can slide along the signal - this also means at the end of the signal there will come a point where the window can't move along and will remain static. So essentially there will be a number of identical values at the start, and then at the end of the signal. This happens at the end of each block (as it can't continuously slide in the same way it would if processing the whole signal in one chunk). I know in order avoid discontinuties at the start of each block an overlap add/save method can be used, but I'm not sure how to fix this problem that occurs at the end of a block.
Just to explain further how the smoothing window moves along the signal, if we have a window length of 5 samples, the first 3 averaged values would be identical, at the 3rd sample, our current time step would now be located at the centre of our window, when moving to sample 4 the window would also slide along by one, keeping our current time step at the centre of the window, and now producing a different value. Once we get to the end of our signal the window will remain static for the last 3 samples, again producing identical values. This is fine when processing something in one big block, but produces discontinuties when trying to process in multiple blocks.