synthesizer-0.0.3: Audio signal processing coded in HaskellSource codeContentsIndex
Synthesizer.Plain.Analysis
Contents
Notions of volume
Miscellaneous
Synopsis
volumeMaximum :: C y => T y -> y
volumeEuclidean :: C y => T y -> y
volumeEuclideanSqr :: C y => T y -> y
volumeSum :: (C y, C y) => T y -> y
volumeVectorMaximum :: (C y yv, Ord y) => T yv -> y
volumeVectorEuclidean :: (C y, C y yv) => T yv -> y
volumeVectorEuclideanSqr :: (C y, Sqr y yv) => T yv -> y
volumeVectorSum :: (C y yv, C y) => T yv -> y
bounds :: Ord y => T y -> (y, y)
histogramDiscreteArray :: T Int -> (Int, T Int)
histogramLinearArray :: C y => T y -> (Int, T y)
histogramDiscreteIntMap :: T Int -> (Int, T Int)
histogramLinearIntMap :: C y => T y -> (Int, T y)
histogramIntMap :: C y => y -> T y -> (Int, T Int)
quantize :: C y => y -> T y -> T Int
attachOne :: T i -> T (i, Int)
meanValues :: C y => T y -> [(Int, y)]
spread :: C y => (y, y) -> [(Int, y)]
directCurrentOffset :: C y => T y -> y
scalarProduct :: C y => T y -> T y -> y
centroid :: C y => T y -> y
centroidAlt :: C y => T y -> y
average :: C y => T y -> y
rectify :: C y => T y -> T y
zeros :: (Ord y, C y) => T y -> T Bool
data BinaryLevel
= Low
| High
binaryLevelFromBool :: Bool -> BinaryLevel
binaryLevelToNumber :: C a => BinaryLevel -> a
flipFlopHysteresis :: Ord y => (y, y) -> BinaryLevel -> T y -> T BinaryLevel
chirpTransform :: C y => y -> T y -> T y
binarySign :: C y => T y -> T BinaryLevel
deltaSigmaModulation :: C y => T y -> T BinaryLevel
Notions of volume
volumeMaximum :: C y => T y -> ySource
Volume based on Manhattan norm.
volumeEuclidean :: C y => T y -> ySource
Volume based on Energy norm.
volumeEuclideanSqr :: C y => T y -> ySource
volumeSum :: (C y, C y) => T y -> ySource
Volume based on Sum norm.
volumeVectorMaximum :: (C y yv, Ord y) => T yv -> ySource
Volume based on Manhattan norm.
volumeVectorEuclidean :: (C y, C y yv) => T yv -> ySource
Volume based on Energy norm.
volumeVectorEuclideanSqr :: (C y, Sqr y yv) => T yv -> ySource
volumeVectorSum :: (C y yv, C y) => T yv -> ySource
Volume based on Sum norm.
bounds :: Ord y => T y -> (y, y)Source
Compute minimum and maximum value of the stream the efficient way. Input list must be non-empty and finite.
Miscellaneous
histogramDiscreteArray :: T Int -> (Int, T Int)Source
Input list must be finite. List is scanned twice, but counting may be faster.
histogramLinearArray :: C y => T y -> (Int, T y)Source
Input list must be finite. If the input signal is empty, the offset is undefined. List is scanned twice, but counting may be faster. The sum of all histogram values is one less than the length of the signal.
histogramDiscreteIntMap :: T Int -> (Int, T Int)Source
Input list must be finite. If the input signal is empty, the offset is undefined. List is scanned once, counting may be slower.
histogramLinearIntMap :: C y => T y -> (Int, T y)Source
histogramIntMap :: C y => y -> T y -> (Int, T Int)Source
quantize :: C y => y -> T y -> T IntSource
attachOne :: T i -> T (i, Int)Source
meanValues :: C y => T y -> [(Int, y)]Source
spread :: C y => (y, y) -> [(Int, y)]Source
directCurrentOffset :: C y => T y -> ySource
Requires finite length. This is identical to the arithmetic mean.
scalarProduct :: C y => T y -> T y -> ySource
centroid :: C y => T y -> ySource
directCurrentOffset must be non-zero.
centroidAlt :: C y => T y -> ySource
average :: C y => T y -> ySource
rectify :: C y => T y -> T ySource
zeros :: (Ord y, C y) => T y -> T BoolSource

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.

data BinaryLevel Source
Constructors
Low
High
show/hide Instances
binaryLevelFromBool :: Bool -> BinaryLevelSource
binaryLevelToNumber :: C a => BinaryLevel -> aSource
flipFlopHysteresis :: Ord y => (y, y) -> BinaryLevel -> T y -> T BinaryLevelSource
Detect thresholds with a hysteresis.
chirpTransform :: C y => y -> T y -> T ySource

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.

binarySign :: C y => T y -> T BinaryLevelSource
deltaSigmaModulation :: C y => T y -> T BinaryLevelSource
The output type could be different from the input type but then we would need a conversion from output to input for feedback.
Produced by Haddock version 2.3.0