Copyright | (c) Henning Thielemann 2008-2009 |
---|---|

License | GPL |

Maintainer | synthesizer@henning-thielemann.de |

Stability | provisional |

Portability | requires multi-parameter type classes |

Safe Haskell | None |

Language | Haskell2010 |

## Synopsis

- delay :: (C y, Storable y) => Int -> T y -> T y
- delayPad :: Storable y => y -> Int -> T y -> T y
- delayPos :: (C y, Storable y) => Int -> T y -> T y
- delayNeg :: Storable y => Int -> T y -> T y
- downsample2 :: Storable v => T v -> T v
- sumsDownsample2 :: (C v, Storable v) => T v -> T v
- convolveDownsample2 :: (C a v, Storable a, Storable v) => T a -> T v -> T v
- inverseFrequencyModulationFloor :: (Storable v, Read sig t, C t, Ord t) => ChunkSize -> sig t -> T v -> T v
- sumsPosModulatedPyramid :: (C v, Storable v) => Int -> T (Int, Int) -> T v -> T v
- accumulatePosModulatedPyramid :: Storable v => ([T v] -> (Int, Int) -> v) -> ([Int], [T v]) -> T (Int, Int) -> T v
- accumulateBinPosModulatedPyramid :: Storable v => (v -> v -> v) -> Int -> T (Int, Int) -> T v -> T v
- movingAverageModulatedPyramid :: (C a, C a v, Storable Int, Storable v) => a -> Int -> Int -> T Int -> T v -> T v
- movingAccumulateModulatedPyramid :: Storable v => (v -> v -> v) -> v -> Int -> Int -> T Int -> T v -> T v
- sumsDownsample2Alt :: (C v, Storable v) => T v -> T v
- pyramid :: Storable v => (v -> v -> v) -> Int -> T v -> [T v]

# Documentation

inverseFrequencyModulationFloor :: (Storable v, Read sig t, C t, Ord t) => ChunkSize -> sig t -> T v -> T v Source #

The function is like that of
`inverseFrequencyModulationFloor`

,
but this function preserves in a sense the chunk structure.

The result will have laziness breaks at least at the chunk boundaries that correspond to the breaks in the input signal. However we insert more breaks, such that a maximum chunk size can be warrented. (Since control and input signal are aligned in time, we might as well use the control chunk structure. Currently I do not know what is better. For the above example it doesn't matter. We might implement a variant in Causal.Filter.NonRecursive.)

This function cannot be written using generic functions, since we have to inspect the chunks individually.

accumulatePosModulatedPyramid :: Storable v => ([T v] -> (Int, Int) -> v) -> ([Int], [T v]) -> T (Int, Int) -> T v Source #

Moving average, where window bounds must be always non-negative.

The laziness granularity is `2^height`

.

This function is only slightly more efficient than its counterpart from Generic.Filter, since it generates strict blocks and not one-block chunky signals.

accumulateBinPosModulatedPyramid :: Storable v => (v -> v -> v) -> Int -> T (Int, Int) -> T v -> T v Source #

movingAverageModulatedPyramid :: (C a, C a v, Storable Int, Storable v) => a -> Int -> Int -> T Int -> T v -> T v Source #

The first argument is the amplification. The main reason to introduce it, was to have only a Module constraint instead of Field. This way we can also filter stereo signals.