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

Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de
Safe HaskellNone

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

meanSource

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

meanStaticSource

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

phaseModulationSource

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) 

phaserSource

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

phaserStereoSource

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

butterworthLowpassSource

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) 

butterworthHighpassSource

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) 

chebyshevALowpassSource

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) 

chebyshevAHighpassSource

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) 

chebyshevBLowpassSource

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) 

chebyshevBHighpassSource

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

universalSource

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 yvSource

bandpassFromUniversal :: Signal s amp (Result yv) -> Signal s amp yvSource

lowpassFromUniversal :: Signal s amp (Result yv) -> Signal s amp yvSource

bandlimitFromUniversal :: Signal s amp (Result yv) -> Signal s amp yvSource

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

allpassCascadeSource

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 yvSource