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

Copyright(c) Henning Thielemann 2008-2009
Portabilityrequires multi-parameter type classes
Safe HaskellNone





delay :: (C y, Storable y) => Int -> T y -> T y Source #

delayPad :: Storable y => y -> Int -> T y -> T y Source #

delayPos :: (C y, Storable y) => Int -> T y -> T y Source #

delayNeg :: Storable y => Int -> T y -> T y Source #

downsample2 :: Storable v => T v -> T v Source #

sumsDownsample2 :: (C v, Storable v) => T v -> T v Source #

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

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.

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

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.

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

sumsDownsample2Alt :: (C v, Storable v) => T v -> T v Source #

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