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
- toReson :: FlatFilter -> ResonFilter
- mlp :: Sig -> Sig -> Sig -> Sig
- mlp2 :: Sig -> Sig -> Sig -> Sig
- mlp3 :: Sig -> Sig -> Sig -> Sig
- lp18 :: Sig -> Sig -> Sig -> Sig -> Sig
- ladder :: 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
- alp1 :: Sig -> Sig -> Sig -> Sig
- alp2 :: Sig -> Sig -> Sig -> Sig
- alp3 :: Sig -> Sig -> Sig -> Sig
- alp4 :: Sig -> Sig -> Sig -> Sig
- ahp :: Sig -> Sig -> Sig
- mvchpf :: Sig -> Sig -> Sig
- mvclpf1 :: Sig -> Sig -> Sig -> Sig
- mvclpf2 :: Sig -> Sig -> Sig -> Sig
- mvclpf3 :: Sig -> Sig -> Sig -> Sig
- mvclpf4 :: Sig -> Sig -> Sig -> Sig
- zdf1 :: Sig -> Sig -> (Sig, Sig)
- zlp1 :: Sig -> Sig -> Sig
- zhp1 :: Sig -> Sig -> Sig
- zap1 :: Sig -> Sig -> Sig
- zdf2 :: Sig -> Sig -> Sig -> (Sig, Sig, Sig)
- zlp :: Sig -> Sig -> Sig -> Sig
- zbp :: Sig -> Sig -> Sig -> Sig
- zhp :: Sig -> Sig -> Sig -> Sig
- zdf2_notch :: Sig -> Sig -> Sig -> (Sig, Sig, Sig, Sig)
- zbr :: Sig -> Sig -> Sig -> Sig
- zladder :: Sig -> Sig -> Sig -> Sig
- zdf4 :: Sig -> Sig -> Sig -> (Sig, Sig, Sig, Sig, Sig, Sig)
- zlp4 :: Sig -> Sig -> Sig -> Sig
- zbp4 :: Sig -> Sig -> Sig -> Sig
- zhp4 :: Sig -> Sig -> Sig -> Sig
- peakEq :: Sig -> Sig -> Sig -> Sig -> Sig
- highShelf :: Sig -> Sig -> Sig -> Sig
- lowShelf :: Sig -> Sig -> Sig -> Sig
- lpCheb1 :: Sig -> Sig -> Sig
- lpCheb1' :: D -> Sig -> Sig -> Sig
- lpCheb2 :: Sig -> Sig -> Sig
- lpCheb2' :: D -> Sig -> Sig -> Sig
- clp :: Sig -> Sig -> Sig
- clp' :: D -> Sig -> Sig -> Sig
- hpCheb1 :: Sig -> Sig -> Sig
- hpCheb1' :: D -> Sig -> Sig -> Sig
- hpCheb2 :: Sig -> Sig -> Sig
- hpCheb2' :: D -> Sig -> Sig -> Sig
- chp :: Sig -> Sig -> Sig
- chp' :: D -> Sig -> Sig -> Sig
- plastic :: Sig -> Sig -> Sig -> Sig
- wobble :: Sig -> Sig -> Sig -> Sig
- trumpy :: Sig -> Sig -> Sig -> Sig
- harsh :: Sig -> Sig -> Sig -> Sig
- tbf :: Sig -> Sig -> Sig -> Sig -> Sig
- diode :: Sig -> Sig -> Sig -> Sig -> Sig
- linDiode :: Sig -> Sig -> Sig -> Sig
- noNormDiode :: Sig -> Sig -> Sig -> Sig -> Sig
- linKorg_lp :: Sig -> Sig -> Sig -> Sig
- linKorg_hp :: Sig -> Sig -> Sig -> Sig
- korg_lp :: Sig -> Sig -> Sig -> Sig -> Sig
- korg_hp :: Sig -> Sig -> Sig -> Sig -> Sig
- slp :: Sig -> Sig -> Sig -> Sig
- shp :: Sig -> Sig -> Sig -> Sig
- sbp :: Sig -> Sig -> Sig -> Sig
- sbr :: Sig -> Sig -> Sig -> Sig
- multiStatevar :: (Sig, Sig, Sig) -> Sig -> Sig -> Sig -> Sig
- multiSvfilter :: (Sig, Sig, Sig) -> Sig -> 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
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.
toReson :: FlatFilter -> ResonFilter Source #
Makes fake resonant filter from flat filter. The resulting filter just ignores the resonance.
Specific filters
Moog filters
mlp :: Sig -> Sig -> Sig -> Sig Source #
Moog's low-pass filter.
mlp centerFrequency qResonance signal
mlp2 :: Sig -> Sig -> Sig -> Sig Source #
Another implementation of moog low pass filter (it's moogladder 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.
Making the smooth lines
smooth :: Sig -> Sig -> Sig Source #
Produces smooth transitions between values in the signals. The first value defines a duration in seconds for a transition from one value to another in piecewise constant signals.
slide :: Sig -> Sig -> Sig Source #
Makes slides between values in the signals. The first value defines a duration in seconds for a transition from one value to another in piecewise constant signals.
Analog filters
Requires Csound 6.07 or higher
alp1 :: Sig -> Sig -> Sig -> Sig Source #
Analog-like low-pass filter
alpf1 centerFrequency resonance asig
alp2 :: Sig -> Sig -> Sig -> Sig Source #
Analog-like low-pass filter
alpf2 centerFrequency resonance asig
alp3 :: Sig -> Sig -> Sig -> Sig Source #
Analog-like low-pass filter
alpf3 centerFrequency resonance asig
alp4 :: Sig -> Sig -> Sig -> Sig Source #
Analog-like low-pass filter
alpf4 centerFrequency resonance asig
Low level analog filters
mvchpf :: Sig -> Sig -> Sig Source #
Moog ladder lowpass filter.
Moogladder is an new digital implementation of the Moog ladder filter based on the work of Antti Huovilainen, described in the paper "Non-Linear Digital Implementation of the Moog Ladder Filter" (Proceedings of DaFX04, Univ of Napoli). This implementation is probably a more accurate digital representation of the original analogue filter.
asig moogladder ain, kcf, kres[, istor]
csound doc: http://www.csounds.com/manual/html/moogladder.html
Emulator of analog high pass filter.
mvchpf asig xfreq
mvclpf1 :: Sig -> Sig -> Sig -> Sig Source #
Emulators of analog filters (requires Csound >= 6.07).
mvclpf1 asig xfreq xresonance
mvclpf2 :: Sig -> Sig -> Sig -> Sig Source #
Emulators of analog filters.
mvclpf2 asig xfreq xresonance
mvclpf3 :: Sig -> Sig -> Sig -> Sig Source #
Emulators of analog filters.
mvclpf3 asig xfreq xresonance
mvclpf4 :: Sig -> Sig -> Sig -> Sig Source #
Emulators of analog filters.
mvclpf4 asig xfreq xresonance
Zero delay filters
One pole filters
Two pole filters
Ladder filter
Four poles filters
Eq-filters
Classic analog-like filters
low pass
lpCheb1' :: D -> Sig -> Sig -> Sig Source #
Chebyshev type I low pass filter (with given number of poles, first argument).
lpCheb2' :: D -> Sig -> Sig -> Sig Source #
Chebyshev type II low pass filter (with given number of poles, first argument).
clp' :: D -> Sig -> Sig -> Sig Source #
Butterworth lowpass filter based on clfilt opcode (with given number of poles, first argument).
high pass
hpCheb1' :: D -> Sig -> Sig -> Sig Source #
Chebyshev type I high pass filter (with given number of poles, first argument).
hpCheb2' :: D -> Sig -> Sig -> Sig Source #
Chebyshev type II high pass filter (with given number of poles, first argument).
chp :: Sig -> Sig -> Sig Source #
Butterworth high pass filter based on clfilt opcode (with 2 poles).
chp' :: D -> Sig -> Sig -> Sig Source #
Butterworth high pass filter based on clfilt opcode (with given number of poles, first argument).
Named resonant low pass filters
TB303 filter
tbf :: Sig -> Sig -> Sig -> Sig -> Sig Source #
Fixed version of tbfcv filter the first argument is distortion (range [0, 1])
diode :: Sig -> Sig -> Sig -> Sig -> Sig #
Non-Linear normalized diode ladder filter.
diode saturation centerFrequency resonance asig
resonance ranges in the interval [0, 1] and higher. self-resonance occurs at 1.
saturation ranges from 1 and higher (typical value: 4)
linDiode :: Sig -> Sig -> Sig -> Sig #
Linear diode ladder filter.
linDiode centerFrequency resonance asig
resonance ranges in the interval [0, 1] and higher. self-resonance occurs at 1.
noNormDiode :: Sig -> Sig -> Sig -> Sig -> Sig #
Non-Linear not normalized diode ladder filter.
noNormDiode saturation centerFrequency resonance asig
resonance ranges in the interval [0, 1] and higher. self-resonance occurs at 1.
saturation ranges from 1 and higher (typical value: 4)
linKorg_lp :: Sig -> Sig -> Sig -> Sig #
Linear korg 35 low pass filter (12 dB).
linDiode centerFrequency resonance asig
resonance ranges in the interval [0, 1] and higher. self-resonance occurs at 1.
linKorg_hp :: Sig -> Sig -> Sig -> Sig #
Linear korg 35 high pass filter (6 dB).
linDiode centerFrequency resonance asig
resonance ranges in the interval [0, 1] and higher. self-resonance occurs at 1.
korg_lp :: Sig -> Sig -> Sig -> Sig -> Sig #
Korg 35 low pass filter (12 dB).
diode saturation centerFrequency resonance asig
resonance ranges in the interval [0, 1] and higher. self-resonance occurs at 1.
saturation ranges from 1 and higher (typical value: 4)
korg_hp :: Sig -> Sig -> Sig -> Sig -> Sig #
Korg 35 high pass filter (6 dB).
diode saturation centerFrequency resonance asig
resonance ranges in the interval [0, 1] and higher. self-resonance occurs at 1.
saturation ranges from 1 and higher (typical value: 4)