PaulStoffregen / Audio

Teensy Audio Library
http://www.pjrc.com/teensy/td_libs_Audio.html
1.1k stars 408 forks source link

Add implementation of AudioWindowKaiserBessel #485

Open scrain777 opened 1 week ago

scrain777 commented 1 week ago

This PR implements the KaiserBessel window from https://en.wikipedia.org/wiki/Window_function and adds the computed window to the available windows. The Python script used to generate the windows is included alongside the Perl script used to generate other windows.

KaiserBessel has a shape parameter. I selected one specific value (3) because it was excellent for my application. In particular, I was wanting to minimize the width of the leakage at the -60dB level. The Python script can be trivially modified to implement additional variants of KaiserBessel if that is desired.

scrain777 commented 1 week ago

I have not tested this code yet.

scrain777 commented 1 week ago

I have not tested this code yet.

Tested with the FFT example on a Teensy 3.5. Works great, although on the sine example the Hanning window has less leakage....

scrain777 commented 1 week ago

Sorry, I closed the PR by mistake.

scrain777 commented 1 week ago

Also tested in a real application on a Teensy 4.1 with audio shield.