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 |
- mix :: (C y, C y, C y yv, C u) => R s u y yv -> R s u y yv -> R s u y yv
- mixVolume :: (C y, C y, C y yv, C u) => T u y -> R s u y yv -> R s u y yv -> R s u y yv
- mixMulti :: (C y, C y, C y yv, C u) => [R s u y yv] -> R s u y yv
- mixMultiVolume :: (C y, C y, C y yv, C u) => T u y -> [R s u y yv] -> R s u y yv
- raise :: (C y, C u) => T u y -> T rate (Dimensional u y) (T y) -> T rate (Dimensional u y) (T y)
- raiseVector :: (C y, C y yv, C u) => T u y -> yv -> T rate (Dimensional u y) (T yv) -> T rate (Dimensional u y) (T yv)
- distort :: (C y, C y yv, C u) => (yv -> yv) -> R s u y y -> R s u y yv -> R s u y yv
- map :: Primitive amp => (y0 -> y1) -> T rate amp (T y0) -> T rate amp (T y1)
- mapLinear :: (C y flat, C y, C u) => y -> T u y -> T rate flat (T y) -> T rate (Dimensional u y) (T y)
- mapExponential :: (C y flat, C y, C u) => y -> T u q -> T rate flat (T y) -> T rate (Dimensional u q) (T y)
- mapLinearDimension :: (C y, C y, C u, C v) => T v y -> T (Mul v u) y -> T rate (Dimensional u y) (T y) -> T rate (Dimensional (Mul v u) y) (T y)
- inflateGeneric :: (C y flat, Transform sig y) => amp -> T rate flat (sig y) -> T rate (Numeric amp) (sig y)
- inflate :: amp -> T rate (Flat y) sig -> T rate (Numeric amp) sig
Documentation
mix :: (C y, C y, C y yv, C u) => R s u y yv -> R s u y yv -> R s u y yv Source #
Mix two signals.
In contrast to zipWith
the result has the length of the longer signal.
raise :: (C y, C u) => T u y -> T rate (Dimensional u y) (T y) -> T rate (Dimensional u y) (T y) Source #
Add a number to all of the signal values. This is useful for adjusting the center of a modulation.
raiseVector :: (C y, C y yv, C u) => T u y -> yv -> T rate (Dimensional u y) (T yv) -> T rate (Dimensional u y) (T yv) Source #
distort :: (C y, C y yv, C u) => (yv -> yv) -> R s u y y -> R s u y yv -> R s u y yv Source #
Distort the signal using a flat function.
The first signal gives the scaling of the function.
If the scaling is c and the input sample is y,
then c * f(y/c)
is output.
This way we can use an (efficient) flat function
and have a simple, yet dimension conform, way of controlling the distortion.
E.g. if the distortion function is tanh
then the value c
controls the saturation level.
mapLinear :: (C y flat, C y, C u) => y -> T u y -> T rate flat (T y) -> T rate (Dimensional u y) (T y) Source #
Map a control curve without amplitude unit
by a linear (affine) function with a unit.
This is a combination of raise
and amplify
.
mapExponential :: (C y flat, C y, C u) => y -> T u q -> T rate flat (T y) -> T rate (Dimensional u q) (T y) Source #
inflateGeneric :: (C y flat, Transform sig y) => amp -> T rate flat (sig y) -> T rate (Numeric amp) (sig y) Source #
I suspect that this function will most oftenly not the right choice.
When the amplitude is Flat, better use inflate
.
When the amplitude is Numeric, better use Filter.amplifyScalarDimension
since this will not modify signal values
but only the global amplitude.
This is both more efficient and ensures boundedness of signal values.