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

Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de
Safe HaskellNone

Synthesizer.Plain.Filter.Recursive.Allpass

Contents

Description

 

Synopsis

Documentation

newtype Parameter a Source

Constructors

Parameter

Feedback factor.

Fields

getParameter :: a
 

parameterSource

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.

parameterAltSource

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.

parameterApproxSource

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

cascadeParameterSource

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