package mm

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Simple implementation of the FFT algorithm. For fastest implementations optimized libraries such as fftw are recommended.

type t

Internal data for computing FFT.

val init : int -> t

Initialize FFT for an analysis of 2^n samples.

val length : t -> int

Length of the FFT buffer analysis in samples.

val complex_create : buffer -> Complex.t array

complex_create buf create a array of complex numbers by copying data from buf (the imaginary part is null).

val fft : t -> Complex.t array -> unit

Perform an FFT analysis.

val band_freq : int -> t -> int -> float

Frequency associated to the k-th coefficient of an FFT.

module Window : sig ... end

Windowing functions. Thses can be used to on complex buffers in order to improve the quality of the FFT, see http://en.wikipedia.org/wiki/Windowing_functions.

val notes : int -> t -> ?note_min:int -> ?note_max:int -> ?volume_min:float -> ?filter_harmonics:bool -> buffer -> (Note.t * float) list
val loudest_note : (Note.t * float) list -> (Note.t * float) option
OCaml

Innovation. Community. Security.