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

Portability requires multi-parameter type classes provisional synthesizer@henning-thielemann.de None

Synthesizer.Plain.Filter.Recursive.Allpass

Description

Synopsis

# Documentation

newtype Parameter a Source

Constructors

 Parameter Feedback factor. FieldsgetParameter :: a

Instances

 Functor Parameter Applicative Parameter Foldable Parameter Traversable Parameter C a v => C a (Parameter v) Show a => Show (Parameter a) Storable a => Storable (Parameter a)

Arguments

 :: 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.

Arguments

 :: C a => a The phase shift to be achieved for the given frequency. -> a The frequency we specified the phase shift for. -> Parameter a

This is the same as `parameter`, but for `phase = frequency` it has a division of a zero by a zero of multiplicity 2, whereas `parameter` has a division of a non-zero number by zero. Thus `parameter` suffers less from cancellation if `phase` is close to `frequency`.

Arguments

 :: 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.

# atomic first order allpass

type State v = (v, v)Source

firstOrderStep :: (C a, C a v) => Parameter a -> v -> State (State v) vSource

firstOrderModifier :: (C a, C a v) => Simple (State v) (Parameter a) v vSource

firstOrderCausal :: (C a, C a v) => T (Parameter a, v) vSource

firstOrder :: (C a, C a v) => T (Parameter a) -> T v -> T vSource

makePhase :: (C a, C a) => Parameter a -> a -> aSource

Compute phase shift of an allpass at a given frequency.

# allpass cascade with uniform control

Arguments

 :: C a => Int The number of equally designed 1st order allpasses. -> a The phase shift to be achieved for the given frequency. -> a The frequency we specified the phase shift for. -> Parameter a

cascadeStep :: (C a, C a v) => Parameter a -> v -> State [v] vSource

cascadeStepStackPairs :: (C a, C a v) => Parameter a -> v -> State [State v] vSource

cascadeStepStack :: (C a, C a v) => Parameter a -> v -> State [v] vSource

cascadeStepScanl :: (C a, C a v) => Parameter a -> v -> State [v] vSource

cascadeStepRec :: (C a, C a v) => Parameter a -> v -> State [v] vSource

fromPairs :: [(a, a)] -> [a]Source

toPairs :: [a] -> [(a, a)]Source

cascadeModifier :: (C a, C a v) => Int -> Simple [v] (Parameter a) v vSource

cascadeCausal :: (C a, C a v) => Int -> T (Parameter a, v) vSource

cascadeCausalModifier :: (C a, C a v) => Int -> T (Parameter a, v) vSource

cascadeCausalStacked :: (C a, C a v) => Int -> T (Parameter a, v) vSource

cascade :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T vSource

Choose one of the implementations below

cascadeIterative :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T vSource

Directly implement the allpass cascade as multiple application of allpasses of 1st order

cascadeState :: (C a, C a v) => Int -> T (Parameter a) -> T v -> T vSource

Simulate the Allpass cascade by a list of states of the partial allpasses

# allpass cascade with independently controlled atomic allpasses

cascadeDiverseStep :: (C a, C a v) => [Parameter a] -> v -> State [v] vSource

cascadeDiverseStepScanl :: (C a, C a v) => [Parameter a] -> v -> State [v] vSource