csound-expression-5.0.1: 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 moogladder 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.

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

ahp :: Sig -> Sig -> Sig Source

Analog-like high-pass filter

ahp centerFrequency 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