Copyright | (c) Henning Thielemann 2008-2010 |
---|---|
License | GPL |
Maintainer | synthesizer@henning-thielemann.de |
Stability | provisional |
Portability | requires multi-parameter type classes |
Safe Haskell | None |
Language | Haskell2010 |
- newtype Parameter a = Parameter {
- getParameter :: a
- type State v = (v, v)
- cascade :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T v
- cascadeCausal :: (C a, C a v) => Int -> T (Parameter a, v) v
- cascadeModifier :: (C a, C a v) => Int -> Simple [v] (Parameter a) v v
- cascadeParameter :: C a => Int -> a -> a -> Parameter a
- cascadeStep :: (C a, C a v) => Parameter a -> v -> State [v] v
- cascadeDiverseStep :: (C a, C a v) => [Parameter a] -> v -> State [v] v
- firstOrder :: (C a, C a v) => T (Parameter a) -> T v -> T v
- firstOrderCausal :: (C a, C a v) => T (Parameter a, v) v
- firstOrderModifier :: (C a, C a v) => Simple (State v) (Parameter a) v v
- firstOrderStep :: (C a, C a v) => Parameter a -> v -> State (State v) v
- flangerParameter :: C a => Int -> a -> Parameter a
- flangerPhase :: C a => a
- makePhase :: (C a, C a) => Parameter a -> a -> a
- parameter :: C a => a -> a -> Parameter a
- parameterApprox :: C a => a -> a -> Parameter a
- parameterAlt :: C a => a -> a -> Parameter a
- cascadeState :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T v
- cascadeIterative :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T v
- cascadeStepRec :: (C a, C a v) => Parameter a -> v -> State [v] v
- cascadeStepScanl :: (C a, C a v) => Parameter a -> v -> State [v] v
- cascadeStepStack :: (C a, C a v) => Parameter a -> v -> State [v] v
- cascadeCausalModifier :: (C a, C a v) => Int -> T (Parameter a, v) v
- cascadeCausalStacked :: (C a, C a v) => Int -> T (Parameter a, v) v
Documentation
Parameter | Feedback factor. |
|
cascade :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T v Source #
Choose one of the implementations below
flangerPhase :: C a => a Source #
makePhase :: (C a, C a) => Parameter a -> a -> a Source #
Compute phase shift of an allpass at a given frequency.
:: C a | |
=> a | The phase shift to be achieved for the given frequency. |
-> a | The frequency we specified the phase shift for. |
-> Parameter a |
Compute the filter parameter such that a given phase shift is achieved at a certain frequency.
Both frequency and phase are with respect to unit 1.
This is conform to Phase definition
and allows to avoid Transcendental constraint in some cases
since we need no factor 2*pi
.
See for instance parameterApprox
.
However, it is intended that the phase parameter is not of type Phase,
because for the cascadeParameter
we divide by the cascade order
and then there is a difference between phase pi and 3*pi.
:: C a | |
=> a | The phase shift to be achieved for the given frequency. |
-> a | The frequency we specified the phase shift for. |
-> Parameter a |
An approximation to parameter
for small phase and frequency values.
It needs only field operations
due to our choice of the unit 1 for the phase parameter.
cascadeState :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T v Source #
Simulate the Allpass cascade by a list of states of the partial allpasses