Portability | requires multi-parameter type classes |
---|---|
Stability | provisional |
Maintainer | synthesizer@henning-thielemann.de |
- negate :: (C a, Transform sig a) => sig a -> sig a
- amplify :: (C a, Transform sig a) => a -> sig a -> sig a
- amplifyVector :: (C a v, Transform sig v) => a -> sig v -> sig v
- envelope :: (C a, Transform sig a) => sig a -> sig a -> sig a
- envelopeVector :: (C a v, Read sig a, Transform sig v) => sig a -> sig v -> sig v
- fadeInOut :: (C a, Write sig a) => Int -> Int -> Int -> sig a -> sig a
- delay :: (C y, Write sig y) => Int -> sig y -> sig y
- delayPad :: Write sig y => y -> Int -> sig y -> sig y
- delayPos :: (C y, Write sig y) => Int -> sig y -> sig y
- delayNeg :: Transform sig y => Int -> sig y -> sig y
- delayLazySize :: (C y, Write sig y) => LazySize -> Int -> sig y -> sig y
- delayPadLazySize :: Write sig y => LazySize -> y -> Int -> sig y -> sig y
- delayPosLazySize :: (C y, Write sig y) => LazySize -> Int -> sig y -> sig y
- binomialMask :: (C a, Write sig a) => LazySize -> Int -> sig a
- generic :: (C a v, Transform sig a, Write sig v) => sig a -> sig v -> sig v
- binomial :: (C a, C a, C a v, Transform sig v) => a -> a -> sig v -> sig v
- ratioFreqToVariance :: C a => a -> a -> a
- binomial1 :: (C v, Transform sig v) => sig v -> sig v
- sums :: (C v, Transform sig v) => Int -> sig v -> sig v
- sumsDownsample2 :: (C v, Write sig v) => LazySize -> sig v -> sig v
- downsample2 :: Write sig v => LazySize -> sig v -> sig v
- downsample :: Write sig v => LazySize -> Int -> sig v -> sig v
- sumRange :: (C v, Transform sig v) => sig v -> (Int, Int) -> v
- pyramid :: (C v, Write sig v) => Int -> sig v -> ([Int], [sig v])
- sumRangeFromPyramid :: (C v, Transform sig v) => [sig v] -> (Int, Int) -> v
- sumRangeFromPyramidReverse :: (C v, Transform sig v) => [sig v] -> (Int, Int) -> v
- sumRangeFromPyramidFoldr :: (C v, Transform sig v) => [sig v] -> (Int, Int) -> v
- maybeAccumulateRangeFromPyramid :: Transform sig v => (v -> v -> v) -> [sig v] -> (Int, Int) -> Maybe v
- consumeRangeFromPyramid :: Transform sig v => (v -> a -> a) -> a -> [sig v] -> (Int, Int) -> a
- sumsPosModulated :: (C v, Transform sig (Int, Int) v) => sig (Int, Int) -> sig v -> sig v
- accumulatePosModulatedFromPyramid :: (Transform sig (Int, Int), Write sig v) => ([sig v] -> (Int, Int) -> v) -> ([Int], [sig v]) -> sig (Int, Int) -> sig v
- sumsPosModulatedPyramid :: (C v, Transform sig (Int, Int), Write sig v) => Int -> sig (Int, Int) -> sig v -> sig v
- withPaddedInput :: (Transform sig Int (Int, Int), Write sig y) => y -> (sig (Int, Int) -> sig y -> v) -> Int -> sig Int -> sig y -> v
- movingAverageModulatedPyramid :: (C a, C a v, Transform sig Int (Int, Int), Write sig v) => a -> Int -> Int -> sig Int -> sig v -> sig v
- inverseFrequencyModulationFloor :: (Ord t, C t, Write sig v, Read sig t) => LazySize -> sig t -> sig v -> sig v
- differentiate :: (C v, Transform sig v) => sig v -> sig v
- differentiateCenter :: (C v, Transform sig v) => sig v -> sig v
- differentiate2 :: (C v, Transform sig v) => sig v -> sig v
Envelope application
amplifyVector :: (C a v, Transform sig v) => a -> sig v -> sig vSource
Smoothing
delayPadLazySize :: Write sig y => LazySize -> y -> Int -> sig y -> sig ySource
The pad value y
must be defined,
otherwise the chunk size of the padding can be observed.
generic :: (C a v, Transform sig a, Write sig v) => sig a -> sig v -> sig vSource
Unmodulated non-recursive filter
ratioFreqToVariance :: C a => a -> a -> aSource
Compute the variance of the Gaussian
such that its Fourier transform has value ratio
at frequency freq
.
sums :: (C v, Transform sig v) => Int -> sig v -> sig vSource
Moving (uniformly weighted) average in the most trivial form.
This is very slow and needs about n * length x
operations.
sumsDownsample2 :: (C v, Write sig v) => LazySize -> sig v -> sig vSource
downsample2 :: Write sig v => LazySize -> sig v -> sig vSource
downsample :: Write sig v => LazySize -> Int -> sig v -> sig vSource
maybeAccumulateRangeFromPyramid :: Transform sig v => (v -> v -> v) -> [sig v] -> (Int, Int) -> Maybe vSource
consumeRangeFromPyramid :: Transform sig v => (v -> a -> a) -> a -> [sig v] -> (Int, Int) -> aSource
accumulatePosModulatedFromPyramid :: (Transform sig (Int, Int), Write sig v) => ([sig v] -> (Int, Int) -> v) -> ([Int], [sig v]) -> sig (Int, Int) -> sig vSource
Moving average, where window bounds must be always non-negative.
The laziness granularity is 2^height
.
sumsPosModulatedPyramid :: (C v, Transform sig (Int, Int), Write sig v) => Int -> sig (Int, Int) -> sig v -> sig vSource
withPaddedInput :: (Transform sig Int (Int, Int), Write sig y) => y -> (sig (Int, Int) -> sig y -> v) -> Int -> sig Int -> sig y -> vSource
movingAverageModulatedPyramid :: (C a, C a v, Transform sig Int (Int, Int), Write sig v) => a -> Int -> Int -> sig Int -> sig v -> sig vSource
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.
inverseFrequencyModulationFloor :: (Ord t, C t, Write sig v, Read sig t) => LazySize -> sig t -> sig v -> sig vSource
Filter operators from calculus
differentiate :: (C v, Transform sig v) => sig v -> sig vSource
Forward difference quotient.
Shortens the signal by one.
Inverts Synthesizer.Generic.Filter.Recursive.Integration.run
in the sense that
differentiate (zero : integrate x) == x
.
The signal is shifted by a half time unit.
differentiateCenter :: (C v, Transform sig v) => sig v -> sig vSource
Central difference quotient.
Shortens the signal by two elements,
and shifts the signal by one element.
(Which can be fixed by prepending an appropriate value.)
For linear functions this will yield
essentially the same result as differentiate
.
You obtain the result of differentiateCenter
if you smooth the one of differentiate
by averaging pairs of adjacent values.
ToDo: Vector variant
differentiate2 :: (C v, Transform sig v) => sig v -> sig vSource
Second derivative.
It is differentiate2 == differentiate . differentiate
but differentiate2
should be faster.