synthesizer-core-0.8.2: Audio signal processing coded in Haskell: Low level part

Safe HaskellNone
LanguageHaskell2010

Synthesizer.Generic.Analysis

Contents

Synopsis

Notions of volume

volumeMaximum :: (C y, Read sig y) => sig y -> y Source #

Volume based on Manhattan norm.

volumeEuclidean :: (C y, Read sig y) => sig y -> y Source #

Volume based on Energy norm.

volumeEuclideanSqr :: (C y, Read sig y) => sig y -> y Source #

volumeSum :: (C y, C y, Read sig y) => sig y -> y Source #

Volume based on Sum norm.

volumeVectorMaximum :: (C y yv, Ord y, Read sig yv) => sig yv -> y Source #

Volume based on Manhattan norm.

volumeVectorEuclidean :: (C y, C y yv, Read sig yv) => sig yv -> y Source #

Volume based on Energy norm.

volumeVectorEuclideanSqr :: (C y, Sqr y yv, Read sig yv) => sig yv -> y Source #

volumeVectorSum :: (C y yv, C y, Read sig yv) => sig yv -> y Source #

Volume based on Sum norm.

bounds :: (Ord y, Read sig y) => sig y -> (y, y) Source #

Compute minimum and maximum value of the stream the efficient way. Input list must be non-empty and finite.

Miscellaneous

directCurrentOffset :: (C y, Read sig y) => sig y -> y Source #

Requires finite length. This is identical to the arithmetic mean.

scalarProduct :: (C y, Read sig y) => sig y -> sig y -> y Source #

centroid :: (C y, Read sig y) => sig y -> y Source #

directCurrentOffset must be non-zero.

average :: (C y, Read sig y) => sig y -> y Source #

rectify :: (C y, Transform sig y) => sig y -> sig y Source #

zeros :: (Ord y, C y, Transform sig y, Transform sig Bool) => sig y -> sig Bool Source #

Detects zeros (sign changes) in a signal. This can be used as a simple measure of the portion of high frequencies or noise in the signal. It ca be used as voiced/unvoiced detector in a vocoder.

zeros x !! n is True if and only if (x !! n >= 0) /= (x !! (n+1) >= 0). The result will be one value shorter than the input.

flipFlopHysteresis :: (Ord y, Transform sig y, Transform sig BinaryLevel) => (y, y) -> BinaryLevel -> sig y -> sig BinaryLevel Source #

Detect thresholds with a hysteresis.

chirpTransform :: (Write sig y, C y) => LazySize -> y -> sig y -> sig y Source #

Almost naive implementation of the chirp transform, a generalization of the Fourier transform.

More sophisticated algorithms like Rader, Cooley-Tukey, Winograd, Prime-Factor may follow.