synthesizer-core-0.2: Audio signal processing coded in Haskell: Low level partSource codeContentsIndex
Synthesizer.Plain.Signal
Portabilityportable
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de
Contents
Generic routines that are useful for filters
Description
Synopsis
type T a = [a]
type Modifier s ctrl a b = Simple s ctrl a b
modifyStatic :: Modifier s ctrl a b -> ctrl -> T a -> T b
modifyModulated :: Modifier s ctrl a b -> T ctrl -> T a -> T b
type ModifierInit s init ctrl a b = Initialized s init ctrl a b
modifierInitialize :: ModifierInit s init ctrl a b -> init -> Modifier s ctrl a b
modifyStaticInit :: ModifierInit s init ctrl a b -> init -> ctrl -> T a -> T b
modifyModulatedInit :: ModifierInit s init ctrl a b -> init -> T ctrl -> T a -> T b
unfoldR :: (acc -> Maybe (y, acc)) -> acc -> (acc, T y)
reduceL :: (x -> acc -> Maybe acc) -> acc -> T x -> acc
mapAccumL :: (x -> acc -> Maybe (y, acc)) -> acc -> T x -> (acc, T y)
crochetL :: (x -> acc -> Maybe (y, acc)) -> acc -> T x -> T y
fix1 :: y -> (T y -> T y) -> T y
dropMarginRem :: Int -> Int -> T a -> (Int, T a)
dropMargin :: Int -> Int -> T a -> T a
lengthAtLeast :: Int -> T a -> Bool
zipWithTails :: (y0 -> T y1 -> y2) -> T y0 -> T y1 -> T y2
zipWithRest :: (y0 -> y0 -> y1) -> T y0 -> T y0 -> (T y1, (Bool, T y0))
zipWithRest' :: (y0 -> y0 -> y1) -> T y0 -> T y0 -> (T y1, (Bool, T y0))
zipWithAppend :: (y -> y -> y) -> T y -> T y -> T y
Documentation
type T a = [a]Source
Generic routines that are useful for filters
type Modifier s ctrl a b = Simple s ctrl a bSource
modifyStatic :: Modifier s ctrl a b -> ctrl -> T a -> T bSource

modif is a process controlled by values of type c with an internal state of type s, it converts an input value of type a into an output value of type b while turning into a new state

ToDo: Shall finite signals be padded with zeros?

modifyModulated :: Modifier s ctrl a b -> T ctrl -> T a -> T bSource
Here the control may vary over the time.
type ModifierInit s init ctrl a b = Initialized s init ctrl a bSource
modifierInitialize :: ModifierInit s init ctrl a b -> init -> Modifier s ctrl a bSource
modifyStaticInit :: ModifierInit s init ctrl a b -> init -> ctrl -> T a -> T bSource
modifyModulatedInit :: ModifierInit s init ctrl a b -> init -> T ctrl -> T a -> T bSource
Here the control may vary over the time.
unfoldR :: (acc -> Maybe (y, acc)) -> acc -> (acc, T y)Source
reduceL :: (x -> acc -> Maybe acc) -> acc -> T x -> accSource
mapAccumL :: (x -> acc -> Maybe (y, acc)) -> acc -> T x -> (acc, T y)Source
crochetL :: (x -> acc -> Maybe (y, acc)) -> acc -> T x -> T ySource
fix1 :: y -> (T y -> T y) -> T ySource
Feed back signal into signal processor, and apply a delay by one value. fix1 is a kind of Signal.generate.
dropMarginRem :: Int -> Int -> T a -> (Int, T a)Source
dropMarginRem n m xs drops at most the first m elements of xs and ensures that xs still contains n elements. Additionally returns the number of elements that could not be dropped due to the margin constraint. That is dropMarginRem n m xs == (k,ys) implies length xs - m == length ys - k. Requires length xs >= n.
dropMargin :: Int -> Int -> T a -> T aSource
lengthAtLeast :: Int -> T a -> BoolSource
Test whether a list has at least n elements.
zipWithTails :: (y0 -> T y1 -> y2) -> T y0 -> T y1 -> T y2Source
Can be implemented more efficiently than just by zipWith and tails for other data structures.
zipWithRest :: (y0 -> y0 -> y1) -> T y0 -> T y0 -> (T y1, (Bool, T y0))Source
zipWithRest' :: (y0 -> y0 -> y1) -> T y0 -> T y0 -> (T y1, (Bool, T y0))Source
zipWithAppend :: (y -> y -> y) -> T y -> T y -> T ySource
Produced by Haddock version 2.4.2