didgmo 0.3.2
Functions
fft
didgmo

Routines for interaction with fft objects. More...

Collaboration diagram for fft:

Functions

fft * fft_new (int i_size)
 creates fft object with frequency range from 0 to i_size.
void fft_free (fft *i_fft)
 frees fft object.
wave * fft_wave (fft *i_fft)
 creates wave object with reverse fourier transformation.
fft * fft_dB (fft *i_fft)
 creates fft object with sound spectra of ground tone and first overblow expressed in dB.
void fft_save (fft *i_fft, char *i_path)
 save fft object to file.
fft * fft_load (char *i_path, int i_size)
 load fft object from file.
peak * fft_peak (fft *i_fft, int i_id)
 extract peak information from fft object.

Detailed Description

Routines for interaction with fft objects.

create initial fft object for a range of 800Hz

const int fft_size = 800;
fft *fft_obj = fft_new (fft_size);

save your fft object

const char *fft_path = "my_obj.fft";
fft_save (fft_obj, fft_path)

free your fft object, when you don't need it anymore

fft_free (fft_obj);

load an fft object from a file

fft_obj = fft_load (path);

convert the amplitudes to dB

fft *fft_obj_dB = fft_dB (fft_obj);
fft_free (fft_obj_dB);

convert fft object to wave object via inverse fast fourier transformation

wave *wave_obj = fft_wave (fft_obj);
wave_free (wave_obj);

extract peaks of impedance (0), base (1) and overblow (2) sound spectra from fft object

peak *peak_obj_imp = fft_peak (fft_obj, 0);
peak *peak_obj_bas = fft_peak (fft_obj, 1);
peak *peak_obj_ovr = fft_peak (fft_obj, 2);
peak_free (peak_obj_imp);
peak_free (peak_obj_bas);
peak_free (peak_obj_ovr);

free your fft object, when you don't need it anymore

fft_free (fft_obj);

Function Documentation

fft* fft_new ( int  i_size)

creates fft object with frequency range from 0 to i_size.

Parameters:
i_sizefrequency range.
Returns:
fft object (free it with fft_free)
void fft_free ( fft *  i_fft)

frees fft object.

Parameters:
i_fftfft object
wave* fft_wave ( fft *  i_fft)

creates wave object with reverse fourier transformation.

Parameters:
i_fftfft object
Returns:
wave object (free it with wave_free)
fft* fft_dB ( fft *  i_fft)

creates fft object with sound spectra of ground tone and first overblow expressed in dB.

Parameters:
i_fftfft object
Returns:
fft object (free it with fft_free);
void fft_save ( fft *  i_fft,
char *  i_path 
)

save fft object to file.

Parameters:
i_fftfft object
i_pathfile path to save to
fft* fft_load ( char *  i_path,
int  i_size 
)

load fft object from file.

Parameters:
i_pathpath to load from
i_sizefrequency range to load
Returns:
fft object (free it with fft_free)
peak* fft_peak ( fft *  i_fft,
int  i_id 
)

extract peak information from fft object.

Parameters:
i_fftfft object
i_idextract peaks from impedance spectrum (0), sound spectrum from ground tone (1) or sound spectrum from first overblow (2)
Returns:
peak object (free it with peak_free)