synthesizer-dimensional-0.8.0.1: Audio signal processing with static physical dimensions

Copyright(c) Henning Thielemann 2008
LicenseGPL
Maintainersynthesizer@henning-thielemann.de
Stabilityprovisional
Portabilityrequires multi-parameter type classes
Safe HaskellNone
LanguageHaskell2010

Synthesizer.Dimensional.Rate.Filter

Contents

Description

 

Synopsis

Non-recursive

Amplification

negate :: (C yv, C u) => T s u t (Signal s amp yv -> Signal s amp yv) Source #

envelope :: (C y0 flat, C y0, C u) => T s u t (Signal s flat y0 -> Signal s amp y0 -> Signal s amp y0) Source #

envelopeVector :: (C y0 flat, C y0 yv, C u) => T s u t (Signal s flat y0 -> Signal s amp yv -> Signal s amp yv) Source #

convolveVector :: (C q yv, C q, C u) => T s u q (R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) Source #

Smooth

mean Source #

Arguments

:: (C yv, C q, C q yv, C u, Storable q, Storable yv) 
=> T (Recip u) q

minimum cut-off frequency

-> T s u q (R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

needs a better handling of boundaries, yet

meanStatic Source #

Arguments

:: (C yv, C q, C q yv, C u) 
=> T (Recip u) q

cut-off frequency

-> T s u q (Signal s amp yv -> Signal s amp yv) 

needs a better handling of boundaries, yet

Delay

delay :: (C yv, C t, C u, Write sig yv) => T u t -> T s u t (T (Phantom s) amp (sig yv) -> T (Phantom s) amp (sig yv)) Source #

phaseModulation Source #

Arguments

:: (C yv, C q, C u, Storable q, Storable yv) 
=> T q yv 
-> T u q

minimal deviation from current time, usually negative

-> T u q

maximal deviation, it must be minDev <= maxDev and the modulation must always be in the range [minDev,maxDev].

-> T s u q (R s u q q -> Signal s amp yv -> Signal s amp yv) 

phaser Source #

Arguments

:: (C yv, C q, C q yv, C u, Storable q, Storable yv) 
=> T q yv 
-> T u q

maxDev, must be positive

-> T s u q (R s u q q -> Signal s amp yv -> Signal s amp yv) 

symmetric phaser

phaserStereo Source #

Arguments

:: (C yv, C q, C q yv, C u, Storable q, Storable yv) 
=> T q yv 
-> T u q

maxDev, must be positive

-> T s u q (R s u q q -> Signal s amp yv -> Signal s amp (T yv)) 

frequencyModulation :: (C t flat, C yv, C t, C u) => T t yv -> T s u t (Signal s flat t -> Signal s amp yv -> Signal s amp yv) Source #

frequencyModulationDecoupled :: (C t flat, C yv, C t, C u) => T t yv -> T (Dimensional u t) amp (T yv) -> T s u t (Signal s flat t -> Signal s amp yv) Source #

Frequency modulation where the input signal can have a sample rate different from the output. (The sample rate values can differ, the unit must be the same. We could lift that restriction, but then the unit handling becomes more complicated, and I didn't have a use for it so far.)

The function can be used for resampling.

Recursive

Without resonance

firstOrderLowpass :: (C q, C q yv, C u) => T s u q (R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) Source #

firstOrderHighpass :: (C q, C q yv, C u) => T s u q (R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) Source #

butterworthLowpass Source #

Arguments

:: (C q flat, C q, C q yv, C u) 
=> Int

Order of the filter, must be even, the higher the order, the sharper is the separation of frequencies.

-> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

butterworthHighpass Source #

Arguments

:: (C q flat, C q, C q yv, C u) 
=> Int

Order of the filter, must be even, the higher the order, the sharper is the separation of frequencies.

-> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

chebyshevALowpass Source #

Arguments

:: (C q flat, C q, C q yv, C u) 
=> Int

Order of the filter, must be even, the higher the order, the sharper is the separation of frequencies.

-> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

chebyshevAHighpass Source #

Arguments

:: (C q flat, C q, C q yv, C u) 
=> Int

Order of the filter, must be even, the higher the order, the sharper is the separation of frequencies.

-> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

chebyshevBLowpass Source #

Arguments

:: (C q flat, C q, C q yv, C u) 
=> Int

Order of the filter, must be even, the higher the order, the sharper is the separation of frequencies.

-> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

chebyshevBHighpass Source #

Arguments

:: (C q flat, C q, C q yv, C u) 
=> Int

Order of the filter, must be even, the higher the order, the sharper is the separation of frequencies.

-> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

With resonance

universal Source #

Arguments

:: (C q flat, C q, C q yv, C u) 
=> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp (Result yv))

highpass, bandpass, lowpass filter

highpassFromUniversal :: Signal s amp (Result yv) -> Signal s amp yv Source #

bandpassFromUniversal :: Signal s amp (Result yv) -> Signal s amp yv Source #

lowpassFromUniversal :: Signal s amp (Result yv) -> Signal s amp yv Source #

bandlimitFromUniversal :: Signal s amp (Result yv) -> Signal s amp yv Source #

moogLowpass :: (C q flat, C q, C q yv, C u) => Int -> T s u q (Signal s flat q -> R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) Source #

Allpass

allpassCascade Source #

Arguments

:: (C q, C q yv, C u) 
=> Int

order, number of filters in the cascade

-> q

the phase shift to be achieved for the given frequency

-> T s u q (R s (Recip u) q q -> Signal s amp yv -> Signal s amp yv) 

Reverb

comb :: (C t, C y yv, C u, Storable yv) => T u t -> y -> T s u t (Signal s amp yv -> Signal s amp yv) Source #

Infinitely many equi-delayed exponentially decaying echos.

Helper functions

interpolateMultiRelativeZeroPad :: (C q, C yv) => T q yv -> T q -> T yv -> T yv Source #