Overlap–save method: Difference between revisions

Content deleted Content added
mention rotating the h[n] buffer
m add a footnote
Line 45:
|Not to be confused with the [[Overlap-add method]], which preserves separate leading and trailing edge-effects.
}} (and subsequently discarded). In other words, the first output value is a weighted average of the <u>last</u> M-1 samples of the input segment (and the first sample of the segment). The next M-2 outputs are weighted averages of both the beginning and the end of the segment. The M<sup>th</sup> output value is the first one that combines only samples from the beginning of the segment.
**The overlap region can also be shifted to the last M-1 outputs, which is a potential run-time convenience, because the IDFT can be computed in the <math>y[n]</math> buffer, instead of being computed and copied. Then the overlap can be overwritten by the next IDFT. The shift is accomplished by replacing <math>\scriptstyle \text{DFT}_N \displaystyle (h[n])</math> with <math>\scriptstyle \text{DFT}_N \displaystyle (h[n+M-1]) =\ \scriptstyle \text{DFT}_N \displaystyle (h[n+M-1-N]),</math> meaning that the N-length buffer is ''circularly-shifted'' (rotated) by M-1 samples.{{efn-ua
|1=The h(M) element is at n=1. The h(M-1) element is at n=N. h(M-2) is at n=N-1. Etc.}}
 
==Pseudocode==