Copyright | (c) Henning Thielemann 2008 |
---|---|
License | GPL |
Maintainer | synthesizer@henning-thielemann.de |
Stability | provisional |
Portability | requires multi-parameter type classes |
Safe Haskell | None |
Language | Haskell2010 |
First order lowpass and highpass with complex valued feedback. The complex feedback allows resonance. It is often called complex resonator.
- data Parameter a
- parameter :: C a => Pole a -> Parameter a
- parameterFromPeakWidth :: C a => a -> Pole a -> Parameter a
- parameterFromPeakToDCRatio :: C a => Pole a -> Parameter a
- step :: C a v => Parameter a -> v -> State (T v) (Result v)
- modifierInit :: (C a, C a v) => Initialized (T v) (T v) (Parameter a) v (Result v)
- modifier :: (C a, C a v) => Simple (T v) (Parameter a) v (Result v)
- causal :: (C a, C a v) => T (Parameter a, v) (Result v)
- runInit :: (C a, C a v) => T v -> T (Parameter a) -> T v -> T (Result v)
- run :: (C a, C a v) => T (Parameter a) -> T v -> T (Result v)
Documentation
parameter :: C a => Pole a -> Parameter a Source #
The internal parameters are computed such that:
- At the resonance frequency
the filter amplifies by the factor
resonance
with no phase shift. - At resonance frequency plus half sample rate
the filter amplifies by facter
recip $ 2 - recip resonance
with no phase shift, but you cannot observe this immediately, because it is outside the Nyquist band.
parameterFromPeakWidth :: C a => a -> Pole a -> Parameter a Source #
The internal parameters are computed such that:
- At the resonance frequency
the filter amplifies by the factor
resonance
with no phase shift. - At resonance frequency plus and minus band width the filter amplifies by facter 1 with a non-zero phase shift.
parameterFromPeakToDCRatio :: C a => Pole a -> Parameter a Source #
The internal parameters are computed such that:
- At the resonance frequency
the filter amplifies by the factor
resonance
with a non-zero phase shift. - The filter amplifies the direct current (frequency zero) by factor 1 with no phase shift.
- The real component is a lowpass, the imaginary component is a highpass. You can interpolate between them using other complex projections.
step :: C a v => Parameter a -> v -> State (T v) (Result v) Source #
Universal filter: Computes high pass, band pass, low pass in one go
modifierInit :: (C a, C a v) => Initialized (T v) (T v) (Parameter a) v (Result v) Source #