didgmo 0.3.2
|
Routines for interaction with fft objects. More...
![]() |
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. |
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);
fft* fft_new | ( | int | i_size | ) |
creates fft object with frequency range from 0 to i_size.
i_size | frequency range. |
void fft_free | ( | fft * | i_fft | ) |
frees fft object.
i_fft | fft object |
wave* fft_wave | ( | fft * | i_fft | ) |
creates wave object with reverse fourier transformation.
i_fft | fft object |
fft* fft_dB | ( | fft * | i_fft | ) |
creates fft object with sound spectra of ground tone and first overblow expressed in dB.
i_fft | fft object |
void fft_save | ( | fft * | i_fft, |
char * | i_path | ||
) |
save fft object to file.
i_fft | fft object |
i_path | file path to save to |
fft* fft_load | ( | char * | i_path, |
int | i_size | ||
) |
load fft object from file.
i_path | path to load from |
i_size | frequency range to load |
peak* fft_peak | ( | fft * | i_fft, |
int | i_id | ||
) |
extract peak information from fft object.
i_fft | fft object |
i_id | extract peaks from impedance spectrum (0), sound spectrum from ground tone (1) or sound spectrum from first overblow (2) |