Safe Haskell | None |
---|---|
Language | Haskell98 |
Filters
- lp1 :: Sig -> Sig -> Sig
- hp1 :: Sig -> Sig -> Sig
- lp :: Sig -> Sig -> Sig -> Sig
- hp :: Sig -> Sig -> Sig -> Sig
- bp :: Sig -> Sig -> Sig -> Sig
- br :: Sig -> Sig -> Sig -> Sig
- alp :: Sig -> Sig -> Sig -> Sig
- bp2 :: Sig -> Sig -> Sig -> Sig
- br2 :: Sig -> Sig -> Sig -> Sig
- blp :: Sig -> Sig -> Sig
- bhp :: Sig -> Sig -> Sig
- bbp :: Sig -> Sig -> Sig -> Sig
- bbr :: Sig -> Sig -> Sig -> Sig
- type ResonFilter = Sig -> Sig -> Sig -> Sig
- type FlatFilter = Sig -> Sig -> Sig
- filt :: Int -> ResonFilter -> ResonFilter
- flatFilt :: Int -> FlatFilter -> FlatFilter
- mlp :: Sig -> Sig -> Sig -> Sig
- mlp2 :: Sig -> Sig -> Sig -> Sig
- mlp3 :: Sig -> Sig -> Sig -> Sig
- lp18 :: Sig -> Sig -> Sig -> Sig -> Sig
- formant :: ResonFilter -> [(Sig, Sig)] -> Sig -> Sig
- singA :: Sig -> Sig
- singO :: Sig -> Sig
- singE :: Sig -> Sig
- singU :: Sig -> Sig
- singO2 :: Sig -> Sig
- smooth :: Sig -> Sig -> Sig
- slide :: Sig -> Sig -> Sig
Documentation
Arguemnts are inversed to get most out of curruing. First come parameters and the last one is the signal.
First order filters
lp1 :: Sig -> Sig -> Sig Source
First order low pass filter (tone in Csound, 6 dB)
lp1 centerFreq asig
hp1 :: Sig -> Sig -> Sig Source
First order high pass filter (atone in Csound, 6 dB)
hp1 centerFreq asig
Simple filters
bp2 :: Sig -> Sig -> Sig -> Sig Source
Resonance band pass filter (yet another implementation, it's reson in Csound)
bp2 centerFreq q asig
br2 :: Sig -> Sig -> Sig -> Sig Source
Resonance band reject filter (yet another implementation, it's areson in Csound)
br2 centerFreq q asig
Butterworth filters
Filter order
type FlatFilter = Sig -> Sig -> Sig Source
Filter without a resonance.
f centerFreq q asig
filt :: Int -> ResonFilter -> ResonFilter Source
Applies a filter n-times. The n is given in the first rgument.
flatFilt :: Int -> FlatFilter -> FlatFilter Source
Applies a flat filter (without resonance) n-times. The n is given in the first rgument.
Specific filters
Moog filters
mlp2 :: Sig -> Sig -> Sig -> Sig Source
Another implementation of moog low pass filter (it's moogvcf in Csound).
The arguments have are just like in the mlp
filter.
lp18 :: Sig -> Sig -> Sig -> Sig -> Sig Source
Low pass filter 18 dB with built in distortion module.
lp18 distortion centerFreq resonance asig
- distortion's range is 0 to 1
- resonance's range is 0 to 1
Formant filters
formant :: ResonFilter -> [(Sig, Sig)] -> Sig -> Sig Source
Formant filter.
formant bandPassFilter formants asig
It expects a band pass filter, a list of formants and processed signal. The signal is processed with each filter the result is a sum of all proceessed signals. Formant filters are used to mimic the vocalization of the sound.