Overlap Add Calculator
Size FFT windows, hop samples, overlap percentage, COLA safety, frame count, latency, transform rate, and working buffers for STFT and block DSP.
🎛DSP Presets
📐Block Settings
📊Window and COLA Reference
| Window | Common COLA hops | Best use | Watch point |
|---|---|---|---|
| Rectangular | 0% overlap or block sum | Raw block convolution, simple buffering | Hard frame edges cause leakage |
| Hann | 50%, 75%, 87.5% overlap | General STFT analysis and resynthesis | Use periodic implementation for exact sums |
| Sqrt Hann WOLA | 50%, 75%, 87.5% overlap | Analysis and synthesis window pairs | COLA applies to squared window pair |
| Hamming | 50% overlap after gain correction | Speech and metering with lower sidelobes | Window sum is constant but not unity |
| Blackman | About 66.7% or 75% | Higher sidelobe rejection | Needs more overlap than Hann |
| Flat top | 75% to 87.5% | Amplitude measurement and analyzers | Wide main lobe and higher CPU load |
⏱Common Project Sizes
| Scenario | Sample rate | N / H | Typical result |
|---|---|---|---|
| Low-delay vocal cleanup | 48 kHz | 512 / 128 | 2.67 ms hop, 75% overlap |
| Music spectral processing | 44.1 kHz | 2048 / 512 | 11.61 ms hop, 75% overlap |
| Mastering analyzer | 96 kHz | 8192 / 1024 | 11.72 Hz bin spacing |
| Partitioned convolution | 48 kHz | 4096 / 1024 | 21.33 ms partition hop |
| Offline restoration | 96 kHz | 16384 / 2048 | 5.86 Hz bins, heavy overlap |
🧮Formula Reference
| Quantity | Formula | Meaning | DSP note |
|---|---|---|---|
| Overlap percent | 100 x (1 - H / N) | Shared samples between frames | Higher overlap smooths modulation but raises work |
| Frame count | ceil((L - N) / H) + 1 | Analysis frames over a signal | Clamp to one frame when L is shorter than N |
| Padded output | (frames - 1)H + N | Samples covered by final frame | Centered windows add leading and trailing zeros |
| Transform rate | (Fs / H) x FFTs per frame | FFT/IFFT calls per second | STFT resynthesis normally needs one FFT and one IFFT |
| Bin spacing | Fs / N | Frequency distance per FFT bin | Musical pitch detail improves as N grows |
This calculator estimates engineering quantities for block DSP design. Final real-time performance also depends on FFT library speed, cache behavior, vectorization, plug-in host buffers, and denormal handling.
When building a spectral effect or high-end reverb, clicking sounds in the audio can be problematic. These clicking sounds result from not correctly stitch the processed audio frames together. This is a problem that is common with the overlap add method.
The overlap add method is use to bridge the gap between frequency bin. If the overlap add method does not create a perfectly flat signal, then the clicking sounds will be heard in the audio. The use of FFT create a snapshot of the signal.
How to prevent clicking sounds in audio processing
However, signals dont exist in box. Instead, you must slide the window in small step along the audio file. These small steps are the hop size for the window.
If the hop size is too large, gap will be left in the audio file. If the size of the hop is not large enough to ensure sufficient overlap within the signal, then the tapered edge of the analysis window will cause the audio volume to dip and swell. These dips and swells in the audio will be heard as clicking sounds.
The choice of window length is a primary decision in the DSP world. The choice of window length involve a tradeoff between the desired frequency resolution and the latency of the signal. A large window length will yield high frequency resolution but will introduce a large amount of latency into the signal.
A large amount of latency is problematic for live guitar effect because it will introduce a delay in the audio signal heard by the performer. After the choice of window length, the second major decision is the amount of overlap to use. Many use a 75 percent overlap to ensure a safety net for reconstructing the audio signal.
The Constant Overlap Add constraint, or COLA constraint, must be follow. The COLA constraint states that the sum of all overlapping window must equal a constant value along the audios timeline. If the sum of the windows fluctuate, then amplitude modulation will be unintentionally applied to the audio signal.
Another important factor to consider is the relationship between the hop size and the CPU load of the computer performing the FFT calculations. If you decrease the hop size to attain a smoother signal, the number of FFT calculations the computer must perform per second will increase. An increased number of calculation will result in an increased CPU load.
Should the overlap be increased too much within a multi-channel project, the CPU load will spike. Thus, using a small hop size will result in a smooth signal but with a high CPU load. In many cases, the first and last frame of the signal will hang off the end of the audio file.
This problem can be fixed by centering the windows on the audio signal with zero padding. This will add more look-ahead to the signals latency. However, this is the standard way to deal with the edge of the signal.
This is important for aligning the processed signal with the dry signal in a phase-sensitive environment. Another important decision involve the shape of the window to use in the processing. The Hann window is a common choice.
An alternative is the Flat Top window for situations where aggressive amplitude measurement are required of the audio signal. The Flat Top window require more processing power than a Hann window. Depending on the goal of the project, one window shape can be chosen over the other.
When creating the buffer for audio processing, one must remember that the calculation are estimates. The performance of the audio will be determined by the specific library used for processing the audio data. To prevent a buffer overflow, creating a map of the frame counts will allow the processing library to be created with precision.
This will prevent a buffer overflow and ensure that the signal processing library create a smooth and seamless audio signal.
