|
Synthesizer.SampleRateContext.Control | Portability | requires multi-parameter type classes | Stability | provisional | Maintainer | synthesizer@henning-thielemann.de |
|
|
|
|
|
Description |
Control curves which can be used
as envelopes, for controlling filter parameters and so on.
|
|
Synopsis |
|
constant :: (C y', C y', C y y') => y' -> T t t' -> T y y' y | | constantVector :: y' -> yv -> T t t' -> T y y' yv | | linear :: (C q, C q', C q', C q q') => q' -> q' -> T q q' -> T q q' q | | line :: (C q, C q', C q', C q q') => q' -> (q', q') -> T q q' -> T q q' q | | exponential :: (C q, C q', C q', C q q') => q' -> q' -> T q q' -> T q q' q | | exponential2 :: (C q, C q', C q', C q q') => q' -> q' -> T q q' -> T q q' q | | piecewise :: (C q, C q, C q', C q', C q q') => [ControlPiece q'] -> T q q' -> T q q' q | | piecewiseVolume :: (C q, C q, C q', C q', C q q') => [ControlPiece q'] -> q' -> T q q' -> T q q' q | | | | data ControlPiece y = ControlPiece {} | | (-|#) :: y -> (ControlDist y, [ControlPiece y]) -> (PieceRightSingle y, [ControlPiece y]) | | (#|-) :: (y, Control y) -> (PieceRightSingle y, [ControlPiece y]) -> (ControlDist y, [ControlPiece y]) | | (=|#) :: (y, y) -> (ControlDist y, [ControlPiece y]) -> (PieceRightDouble y, [ControlPiece y]) | | (#|=) :: (y, Control y) -> (PieceRightDouble y, [ControlPiece y]) -> (ControlDist y, [ControlPiece y]) | | (|#) :: y -> (ControlDist y, [ControlPiece y]) -> [ControlPiece y] | | (#|) :: (y, Control y) -> y -> (ControlDist y, [ControlPiece y]) | | mapLinear :: (C y, C y', C y', C y y') => y' -> y' -> T t t' -> T y y' y -> T y y' y | | mapExponential :: (C y', C y, C y y') => y -> y' -> T t t' -> T y y y -> T y y' y |
|
|
|
Primitives
|
|
|
:: (C y', C y', C y y') | | => y' | value
| -> T t t' | | -> T y y' y | |
|
|
|
:: | | => y' | amplitude
| -> yv | value
| -> T t t' | | -> T y y' yv | | The amplitude must be positive!
This is not checked.
|
|
|
|
:: (C q, C q', C q', C q q') | | => q' | slope of the curve
| -> q' | initial value
| -> T q q' | | -> T q q' q | | Caution: This control curve can contain samples
with an absolute value greater than 1.
Linear curves starting with zero are impossible.
Maybe you prefer using line.
|
|
|
|
:: (C q, C q', C q', C q q') | | => q' | duration of the ramp
| -> (q', q') | initial and final value
| -> T q q' | | -> T q q' q | | Generates a finite ramp.
|
|
|
|
:: (C q, C q', C q', C q q') | | => q' | time where the function reaches 1/e of the initial value
| -> q' | initial value
| -> T q q' | | -> T q q' q | |
|
|
|
:: (C q, C q', C q', C q q') | | => q' | half life, time where the function reaches 1/2 of the initial value
| -> q' | initial value
| -> T q q' | | -> T q q' q | |
|
|
Piecewise
|
|
|
Since this function looks for the maximum node value,
and since the signal parameter inference phase must be completed before signal processing,
infinite descriptions cannot be used here.
|
|
|
|
|
The curve type of a piece of a piecewise defined control curve.
| Constructors | CtrlStep | | CtrlLin | | CtrlExp | | | CtrlCos | | CtrlCubic | | ctrlCubicGradient0 :: y | | ctrlCubicGradient1 :: y | |
|
| Instances | |
|
|
|
The full description of a control curve piece.
| Constructors | ControlPiece | | pieceType :: Control y | | pieceY0 :: y | | pieceY1 :: y | | pieceDur :: y | |
|
| Instances | |
|
|
|
|
|
The 6 operators simplify constructing a list of ControlPiece a.
The description consists of nodes (namely the curve values at nodes)
and the connecting curve types.
The naming scheme is as follows:
In the middle there is a bar |.
With respect to the bar,
the pad symbol # is at the side of the curve type,
at the other side there is nothing, a minus sign -, or an equality sign =.
- Nothing means that here is the start or the end node of a curve.
- Minus means that here is a node where left and right curve meet at the same value.
The node description is thus one value.
- Equality sign means that here is a split node,
where left and right curve might have different ending and beginning values, respectively.
The node description consists of a pair of values.
|
|
|
|
|
|
|
|
|
|
Preparation
|
|
|
:: (C y, C y', C y', C y y') | | => y' | range: one is mapped to center+range
| -> y' | center: zero is mapped to center
| -> T t t' | | -> T y y' y | | -> T y y' y | | Map a control curve without amplitude unit
by a linear (affine) function with a unit.
|
|
|
|
:: (C y', C y, C y y') | | => y | range: one is mapped to center*range, must be positive
| -> y' | center: zero is mapped to center
| -> T t t' | | -> T y y y | | -> T y y' y | | Map a control curve without amplitude unit
exponentially to one with a unit.
|
|
|
Produced by Haddock version 2.4.2 |