Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add windowing functions to DSP library #217

Closed
escherstair opened this issue Jul 20, 2017 · 4 comments
Closed

Add windowing functions to DSP library #217

escherstair opened this issue Jul 20, 2017 · 4 comments
Assignees

Comments

@escherstair
Copy link

CMSIS-DSP offers some functions to perform FFT (Fast Fourier Transform).

An usual approach, before a FFT, is to apply a window, for example to reduce leakage effect.

A lot of different window have been developed and tested in DSP, but common choice is between Hanning, Hamming, Blackman and Flat-Top (even if many others are available).

I suggest the developers to add to CMSIS-DSP some functions to apply (at least) these common windows (f32, q15 and q31 data formats).

@JonatanAntoni
Copy link
Member

Hi @escherstair,

thank you for sharing your enhancement ideas.

Would you be able to contribute in this area? Any input is highly appreciated.

Cheers,
Jonatan

@escherstair
Copy link
Author

Hi @JonatanAntoni,

I can share my experience if needed

@jonnor
Copy link

jonnor commented Mar 1, 2019

I was in need of this now for some machine learning. So I added a small Python tool generate C code for a window function table to the emlearn library. After generating the table one can multiply it with input signal to apply the window.
https://github.com/jonnor/emlearn/tree/master/examples/window-function.py

pip install emlearn scipy
emlearn-window-function --window hann --length 512 --name my_fft_window --out fft_window.h
#include "fft_window.h"
...
arm_mult_f32(input, (float32_t *)my_fft_window, input, INPUT_LENGTH);
...

@christophe0606
Copy link
Contributor

I close the ticket since, as explained in previous comment, arm_mult can be used to multiply the signal with a given window and it is not the goal of the CMSIS-DSP to provide tables for all kind of windows and window length.

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

No branches or pull requests

4 participants