Changeset d57d1de for src/fft.h


Ignore:
Timestamp:
Nov 7, 2007, 4:51:42 PM (16 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
4368223
Parents:
e00f769 (diff), 038852a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

update fft.py tests, merge from banane

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/fft.h

    re00f769 rd57d1de  
    6767
    6868  \param size length of the FFT
     69  \param channels number of channels
    6970
    7071*/
    71 aubio_fft_t * new_aubio_fft(uint_t size);
     72aubio_fft_t * new_aubio_fft(uint_t size, uint_t channels);
    7273/** delete FFT object
    7374
     
    7677*/
    7778void del_aubio_fft(aubio_fft_t * s);
     79
    7880/** compute forward FFT
    7981
    8082  \param s fft object as returned by new_aubio_fft
    81   \param data input signal
     83  \param input input signal
    8284  \param spectrum output spectrum
    83   \param size length of the input vector
    8485
    8586*/
    86 void aubio_fft_do (const aubio_fft_t *s, const smpl_t * data,
    87     fft_data_t * spectrum, const uint_t size);
     87void aubio_fft_do (aubio_fft_t *s, fvec_t * input, cvec_t * spectrum);
    8888/** compute backward (inverse) FFT
    8989
    9090  \param s fft object as returned by new_aubio_fft
    9191  \param spectrum input spectrum
    92   \param data output signal
    93   \param size length of the input vector
     92  \param output output signal
    9493
    9594*/
    96 void aubio_fft_rdo(const aubio_fft_t *s, const fft_data_t * spectrum,
    97     smpl_t * data, const uint_t size);
    98 /** compute norm vector from input spectrum
     95void aubio_fft_rdo (aubio_fft_t *s, cvec_t * spectrum, fvec_t * output);
    9996
    100   \param norm magnitude vector output
    101   \param spectrum spectral data input
    102   \param size size of the vectors
     97/** compute forward FFT
     98
     99  \param s fft object as returned by new_aubio_fft
     100  \param input real input signal
     101  \param compspec complex output fft real/imag
    103102
    104103*/
    105 void aubio_fft_getnorm(smpl_t * norm, fft_data_t * spectrum, uint_t size);
    106 /** compute phase vector from input spectrum
    107  
    108   \param phase phase vector output
    109   \param spectrum spectral data input
    110   \param size size of the vectors
     104void aubio_fft_do_complex (aubio_fft_t *s, fvec_t * input, fvec_t * compspec);
     105/** compute backward (inverse) FFT from real/imag
     106
     107  \param s fft object as returned by new_aubio_fft
     108  \param compspec real/imag input fft array
     109  \param output real output array
    111110
    112111*/
    113 void aubio_fft_getphas(smpl_t * phase, fft_data_t * spectrum, uint_t size);
     112void aubio_fft_rdo_complex (aubio_fft_t *s, fvec_t * compspec, fvec_t * output);
    114113
    115 /** FFT object (using cvec)
     114/** convert real/imag spectrum to norm/phas spectrum
    116115
    117   This object works similarly as aubio_fft_t, except the spectral data is
    118   stored in a cvec_t as two vectors, magnitude and phase.
     116  \param compspec real/imag input fft array
     117  \param spectrum cvec norm/phas output array
    119118
    120119*/
    121 typedef struct _aubio_mfft_t aubio_mfft_t;
     120void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum);
     121/** convert real/imag spectrum to norm/phas spectrum
    122122
    123 /** create new FFT computation object
    124 
    125   \param winsize length of the FFT
    126   \param channels number of channels
     123  \param compspec real/imag input fft array
     124  \param spectrum cvec norm/phas output array
    127125
    128126*/
    129 aubio_mfft_t * new_aubio_mfft(uint_t winsize, uint_t channels);
    130 /** compute forward FFT
     127void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec);
    131128
    132   \param fft fft object as returned by new_aubio_mfft
    133   \param in input signal
    134   \param fftgrain output spectrum
     129/** compute phas spectrum from real/imag parts
     130
     131  \param compspec real/imag input fft array
     132  \param spectrum cvec norm/phas output array
    135133
    136134*/
    137 void aubio_mfft_do (aubio_mfft_t * fft,fvec_t * in,cvec_t * fftgrain);
    138 /** compute backward (inverse) FFT
     135void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum);
     136/** compute imaginary part from the norm/phas cvec
    139137
    140   \param fft fft object as returned by new_aubio_mfft
    141   \param fftgrain input spectrum (cvec)
    142   \param out output signal
     138  \param spectrum norm/phas input array
     139  \param compspec real/imag output fft array
    143140
    144141*/
    145 void aubio_mfft_rdo(aubio_mfft_t * fft,cvec_t * fftgrain, fvec_t * out);
    146 /** delete FFT object
     142void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec);
    147143
    148   \param fft fft object as returned by new_aubio_mfft
     144/** compute norm component from real/imag parts
     145
     146  \param compspec real/imag input fft array
     147  \param spectrum cvec norm/phas output array
    149148
    150149*/
    151 void del_aubio_mfft(aubio_mfft_t * fft);
     150void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum);
     151/** compute real part from norm/phas components
    152152
     153  \param spectrum norm/phas input array
     154  \param compspec real/imag output fft array
     155
     156*/
     157void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec);
    153158
    154159#ifdef __cplusplus
     
    156161#endif
    157162
    158 #endif
     163#endif // FFT_H_
Note: See TracChangeset for help on using the changeset viewer.