Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
FFT.h
- Committer:
- rik
- Date:
- 2017-03-28
- Revision:
- 0:8c128e047ec9
- Child:
- 1:099f1a4c5fc8
File content as of revision 0:8c128e047ec9:
// This file first preprocesses a 512 long data array by:
// - Calculating and substracting the mean
// - Applying a hann window
// It then applies a radix-2 Cooley Tukey FFT
// then it applies an equalizer that multiplies frequencies by different values
// After, it transforms it back
#pragma once
#ifndef _DFT_H_
#define _DFT_H_
#include <string.h> // Only for memcpy
#include "LookupTables.h"
#include "complexmath.h"
// Do the Equalizer as described above
void performEqualizer(float* datain,float* dataout, int datalength);
// Performs a radix-2 cooley tukey FFT on the data array to transform to frequency
void reverseCooleyTukeyRadix2(float* data, complex_num* dataout, int datalength);
//perform the equalize function
void Equalizer(complex_num* data);
//Performs a radix-2 cooley tukey FFT on the data array to transform back to time
void cooleyTukeyBack (float* dataout,complex_num* data, int datalength);
// Calculates and subtracts the signal mean
void subMean(float* data, int datalength);
#endif