Loading...
Searching...
No Matches
fft.h File Reference

Fast Fourier Transform. More...

Go to the source code of this file.

## Typedefs

typedef struct _aubio_fft_t | aubio_fft_t
| FFT object.

## Functions

aubio_fft_t * | new_aubio_fft (uint_t size)
| create new FFT computation object
void | del_aubio_fft (aubio_fft_t *s)
| delete FFT object
void | aubio_fft_do (aubio_fft_t *s, const fvec_t *input, cvec_t *spectrum)
| compute forward FFT
void | aubio_fft_rdo (aubio_fft_t *s, const cvec_t *spectrum, fvec_t *output)
| compute backward (inverse) FFT
void | aubio_fft_do_complex (aubio_fft_t *s, const fvec_t *input, fvec_t *compspec)
| compute forward FFT
void | aubio_fft_rdo_complex (aubio_fft_t *s, const fvec_t *compspec, fvec_t *output)
| compute backward (inverse) FFT from real/imag
void | aubio_fft_get_spectrum (const fvec_t *compspec, cvec_t *spectrum)
| convert real/imag spectrum to norm/phas spectrum
void | aubio_fft_get_realimag (const cvec_t *spectrum, fvec_t *compspec)
| convert real/imag spectrum to norm/phas spectrum
void | aubio_fft_get_phas (const fvec_t *compspec, cvec_t *spectrum)
| compute phas spectrum from real/imag parts
void | aubio_fft_get_imag (const cvec_t *spectrum, fvec_t *compspec)
| compute imaginary part from the norm/phas cvec
void | aubio_fft_get_norm (const fvec_t *compspec, cvec_t *spectrum)
| compute norm component from real/imag parts
void | aubio_fft_get_real (const cvec_t *spectrum, fvec_t *compspec)
| compute real part from norm/phas components

## Detailed Description

Fast Fourier Transform.

Depending on how aubio was compiled, FFT are computed using one of:

- Ooura
- FFTW3
- vDSP

Definition in file fft.h.

## Typedef Documentation

## aubio_fft_t

typedef struct _aubio_fft_t aubio_fft_t

FFT object.

This object computes forward and backward FFTs.

Examples
  spectral/test-fft.c.

Definition at line 46 of file fft.h.

## Function Documentation

## aubio_fft_do()

void aubio_fft_do | ( | aubio_fft_t * | s,
|  | const fvec_t * | input,
|  | cvec_t * | spectrum )

compute forward FFT

Parameters

  s | fft object as returned by new_aubio_fft
  input | input signal
  spectrum | output spectrum

Examples
  spectral/test-fft.c.

## aubio_fft_do_complex()

void aubio_fft_do_complex | ( | aubio_fft_t * | s,
|  | const fvec_t * | input,
|  | fvec_t * | compspec )

compute forward FFT

Parameters

  s | fft object as returned by new_aubio_fft
  input | real input signal
  compspec | complex output fft real/imag

## aubio_fft_get_imag()

void aubio_fft_get_imag | ( | const cvec_t * | spectrum,
|  | fvec_t * | compspec )

compute imaginary part from the norm/phas cvec

Parameters

  spectrum | norm/phas input array
  compspec | real/imag output fft array

## aubio_fft_get_norm()

void aubio_fft_get_norm | ( | const fvec_t * | compspec,
|  | cvec_t * | spectrum )

compute norm component from real/imag parts

Parameters

  compspec | real/imag input fft array
  spectrum | cvec norm/phas output array

## aubio_fft_get_phas()

void aubio_fft_get_phas | ( | const fvec_t * | compspec,
|  | cvec_t * | spectrum )

compute phas spectrum from real/imag parts

Parameters

  compspec | real/imag input fft array
  spectrum | cvec norm/phas output array

## aubio_fft_get_real()

void aubio_fft_get_real | ( | const cvec_t * | spectrum,
|  | fvec_t * | compspec )

compute real part from norm/phas components

Parameters

  spectrum | norm/phas input array
  compspec | real/imag output fft array

## aubio_fft_get_realimag()

void aubio_fft_get_realimag | ( | const cvec_t * | spectrum,
|  | fvec_t * | compspec )

convert real/imag spectrum to norm/phas spectrum

Parameters

  compspec | real/imag input fft array
  spectrum | cvec norm/phas output array

## aubio_fft_get_spectrum()

void aubio_fft_get_spectrum | ( | const fvec_t * | compspec,
|  | cvec_t * | spectrum )

convert real/imag spectrum to norm/phas spectrum

Parameters

  compspec | real/imag input fft array
  spectrum | cvec norm/phas output array

## aubio_fft_rdo()

void aubio_fft_rdo | ( | aubio_fft_t * | s,
|  | const cvec_t * | spectrum,
|  | fvec_t * | output )

compute backward (inverse) FFT

Parameters

  s | fft object as returned by new_aubio_fft
  spectrum | input spectrum
  output | output signal

Examples
  spectral/test-fft.c.

## aubio_fft_rdo_complex()

void aubio_fft_rdo_complex | ( | aubio_fft_t * | s,
|  | const fvec_t * | compspec,
|  | fvec_t * | output )

compute backward (inverse) FFT from real/imag

Parameters

  s | fft object as returned by new_aubio_fft
  compspec | real/imag input fft array
  output | real output array

## del_aubio_fft()

void del_aubio_fft | ( | aubio_fft_t * | s | ) |

delete FFT object

Parameters

  s | fft object as returned by new_aubio_fft

Examples
  spectral/test-fft.c.

## new_aubio_fft()

aubio_fft_t * new_aubio_fft | ( | uint_t | size | ) |

create new FFT computation object

Parameters

  size | length of the FFT

Examples
  spectral/test-fft.c.