csound-expression-4.7: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Air.Filter

Contents

Description

Filters

Synopsis

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

lp :: Sig -> Sig -> Sig -> Sig Source

Low-pass filter.

lp cutoff resonance sig

hp :: Sig -> Sig -> Sig -> Sig Source

High-pass filter.

hp cutoff resonance sig

bp :: Sig -> Sig -> Sig -> Sig Source

Band-pass filter.

bp cutoff resonance sig

br :: Sig -> Sig -> Sig -> Sig Source

Band-reject filter.

br cutoff resonance sig

alp :: Sig -> Sig -> Sig -> Sig Source

All-pass filter.

alp cutoff resonance sig

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

blp :: Sig -> Sig -> Sig Source

Low-pass filter.

blp cutoff sig

bhp :: Sig -> Sig -> Sig Source

High-pass filter.

bhp cutoff sig

bbp :: Sig -> Sig -> Sig -> Sig Source

Band-pass filter.

bbp cutoff bandwidth sig

bbr :: Sig -> Sig -> Sig -> Sig Source

Band-regect filter.

bbr cutoff bandwidth sig

Filter order

type ResonFilter = Sig -> Sig -> Sig -> Sig Source

Resonant filter.

f centerFreq q asig

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

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 moogvcf in Csound). The arguments have are just like in the mlp filter.

mlp3 :: Sig -> Sig -> Sig -> Sig Source

Mooglowpass filter with 18 dB.

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.

singA :: Sig -> Sig Source

Formant filter that sings an A.

singO :: Sig -> Sig Source

Formant filter that sings an O.

singE :: Sig -> Sig Source

Formant filter that sings an E.

singU :: Sig -> Sig Source

Formant filter that sings an U.

singO2 :: Sig -> Sig Source

Formant filter that sings an O.

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.