Look at this chart, and look at the description of flat-top windows higher up.
I have also found this freely available paper, with its Appendix D defining many such functions.
Could these have application for my click finding and repairing tools?
It looks like a lot of leakage for low bin numbers, and very little “scallop loss,” and then a steep drop and very little leakage for large numbers. This could be just what I need.
If I want to detect clicks and then fix them with a filter built with eq-band, then scanning the sound with such a windowing function may be best to determine the gain in a band with the least contamination with information from other bands.
I am not using snd-fft, but rather, for each test frequency I convolve the sound with a period of the cosine. That is like doing fft with a rectangular window as long as that period and a skip of 1 but only calculating one coefficient. That means I have leakage as for the rectangular window, with the bin size equal to the frequency, and so with the first zero an octave above my frequency, right?
Perhaps instead I should take a window containing several periods and multiply by a flat top windowing function, then convolve with that. Choose the right number of periods, and I can get a better controlled flat-top leakage for a band of my choosing.
Choose just a few equal sized bands in the logarithmic frequency scale, wide enough to cover the range of interesting frequencies and catch the clicks, and just many enough to separate low bumps and high crackles from the desirable speech frequencies, and (what might be the same thing) also many enough to make the equalization curve applied to the clicky region sufficiently discriminating to pass what it should pass.
I am thinking now this is the way to improve quality of results for calculation time.