Skip to content

Fix Blackman-Harris window cosine period#346

Open
headdirt wants to merge 1 commit into
alexkay:masterfrom
headdirt:fix-blackman-harris-window-period
Open

Fix Blackman-Harris window cosine period#346
headdirt wants to merge 1 commit into
alexkay:masterfrom
headdirt:fix-blackman-harris-window-period

Conversation

@headdirt
Copy link
Copy Markdown

@headdirt headdirt commented May 8, 2026

Summary

Fixes the Blackman-Harris window formula used in the spectrogram pipeline by using N - 1 as the cosine period denominator instead of N.

Details

The Blackman-Harris window is defined over a symmetric interval where the cosine terms use 2*pi*n/(N - 1). Using N slightly distorts the window coefficients, especially near the endpoints, and makes the implementation diverge from the standard definition.

This change updates the period calculation while leaving the rest of the windowing logic unchanged.

Testing

Built/tested locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant