synthesizer-core-0.2: Audio signal processing coded in Haskell: Low level partSource codeContentsIndex
Synthesizer.Plain.Filter.Recursive.Universal
Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de
Description
State variable filter. One filter that generates lowpass, bandpass, highpass, bandlimit at once.
Synopsis
data Parameter a = Parameter {
k1 :: !a
k2 :: !a
ampIn :: !a
ampI1 :: !a
ampI2 :: !a
ampLimit :: !a
}
storeParameter :: Storable a => Dictionary (Parameter a)
data Result a = Result {
highpass :: !a
bandpass :: !a
lowpass :: !a
bandlimit :: !a
}
storeResult :: Storable a => Dictionary (Result a)
parameter :: C a => Pole a -> Parameter a
step :: (C a, C a v) => Parameter a -> v -> State (v, v) (Result v)
modifierInit :: (C a, C a v) => Initialized (v, v) (v, v) (Parameter a) v (Result v)
modifier :: (C a, C a v) => Simple (v, v) (Parameter a) v (Result v)
causal :: (C a, C a v) => T (Parameter a, v) (Result v)
runInit :: (C a, C a v) => (v, v) -> T (Parameter a) -> T v -> T (Result v)
run :: (C a, C a v) => T (Parameter a) -> T v -> T (Result v)
Documentation
data Parameter a Source
Constructors
Parameter
k1 :: !a
k2 :: !a
ampIn :: !a
ampI1 :: !a
ampI2 :: !a
ampLimit :: !a
show/hide Instances
C a v => C a (Parameter v)
Storable a => Storable (Parameter a)
storeParameter :: Storable a => Dictionary (Parameter a)Source
data Result a Source
Constructors
Result
highpass :: !a
bandpass :: !a
lowpass :: !a
bandlimit :: !a
show/hide Instances
C a v => C a (Result v)
Storable a => Storable (Result a)
C v => C (Result v)
storeResult :: Storable a => Dictionary (Result a)Source
parameter :: C a => Pole a -> Parameter aSource

The computation of the internal parameters is a bit complicated, but it fulfills the following properties:

  • At the resonance frequency the band pass has 180 degree phase shift. This is also approximately the frequency where the filter has maximum output. Even more important, this is the frequency where the band limit filter works.
  • At the resonance frequency highpass, lowpass, and bandpass amplify by the factor resonance.
  • The lowpass amplifies the frequency zero by factor 1.
  • The highpass amplifies the highest representable (Nyquist) frequency by the factor 1.
  • The bandlimit amplifies both frequency zero and Nyquist frequency by factor one and cancels the resonance frequency.
step :: (C a, C a v) => Parameter a -> v -> State (v, v) (Result v)Source
Universal filter: Computes high pass, band pass, low pass in one go
modifierInit :: (C a, C a v) => Initialized (v, v) (v, v) (Parameter a) v (Result v)Source
modifier :: (C a, C a v) => Simple (v, v) (Parameter a) v (Result v)Source
causal :: (C a, C a v) => T (Parameter a, v) (Result v)Source
runInit :: (C a, C a v) => (v, v) -> T (Parameter a) -> T v -> T (Result v)Source
run :: (C a, C a v) => T (Parameter a) -> T v -> T (Result v)Source
Produced by Haddock version 2.4.2