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

Copyright(c) Henning Thielemann 2008-2010
LicenseGPL
Maintainersynthesizer@henning-thielemann.de
Stabilityprovisional
Portabilityrequires multi-parameter type classes
Safe HaskellNone
LanguageHaskell2010

Synthesizer.Plain.Filter.Recursive.Allpass

Contents

Description

 

Synopsis

Documentation

newtype Parameter a

Constructors

Parameter

Feedback factor.

Fields

getParameter :: a
 

parameter

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.

parameterAlt

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.

parameterApprox

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)

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

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

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

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

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

Compute phase shift of an allpass at a given frequency.

allpass cascade with uniform control

cascadeParameter

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 

flangerPhase :: C a => a

flangerParameter :: C a => Int -> a -> Parameter a

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

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

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

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

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

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

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

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

cascadeCausal :: (C a, C a v) => Int -> T (Parameter a, 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

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

Choose one of the implementations below

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

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 v

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] v

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