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

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

Synthesizer.Dimensional.Causal.Filter

Contents

Description

 

Synopsis

Non-recursive

Amplification

amplify :: C y amp => y -> T s u t (Single s (Numeric amp) (Numeric amp) yv yv)Source

The amplification factor must be positive.

amplifyDimension :: (C y, C u, C v0, C v1) => T v0 y -> T s u t (Single s (Dimensional v1 y) (Dimensional (Mul v0 v1) y) yv yv)Source

amplifyScalarDimension :: (C y, C u, C v) => T v y -> T s u t (Single s (Dimensional Scalar y) (Dimensional v y) yv yv)Source

negate :: C (Displacement sample) => T s u t (T s sample sample)Source

envelope :: C y => T s u t (T s (Flat y, Numeric amp y) (Numeric amp y))Source

envelopeScalarDimension :: (C y, C u, C v) => T s u t (T s (Dimensional Scalar y y, Dimensional v y y) (Dimensional v y y))Source

envelopeVector :: C y (Displacement sample) => T s u t (T s (Flat y, sample) sample)Source

envelopeVectorDimension :: (C y0 yv, C y, C u, C v0, C v1) => T s u t (T s (Dimensional v0 y y0, Dimensional v1 y yv) (Dimensional (Mul v0 v1) y yv))Source

Filter operators from calculus

differentiate :: (C yv, C q, C u, C v) => T s u q (Single s (Dimensional v q) (Dimensional (DimensionGradient u v) q) yv yv)Source

Recursive

type ResonantFilter s u q ic amp yv0 yv1 = T s u q (T (Converter s (Dimensional Scalar q q, Dimensional (Recip u) q q) ic) (T s (T amp yv0, SampleRateDep s ic) (T amp yv1)))Source

type FrequencyFilter s u q ic amp yv0 yv1 = T s u q (T (Converter s (Dimensional (Recip u) q q) ic) (T s (T amp yv0, SampleRateDep s ic) (T amp yv1)))Source

Without resonance

firstOrderLowpass :: (C q, C q yv, C u) => FrequencyFilter s u q (Parameter q) amp yv yvSource

firstOrderHighpass :: (C q, C q yv, C u) => FrequencyFilter s u q (Parameter q) amp yv yvSource

butterworthLowpassSource

Arguments

:: (C a, C a yv, Storable a, Storable yv, C u) 
=> Int

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

-> ResonantFilter s u a (Parameter a) amp yv yv 

butterworthHighpassSource

Arguments

:: (C a, C a yv, Storable a, Storable yv, C u) 
=> Int

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

-> ResonantFilter s u a (Parameter a) amp yv yv 

chebyshevALowpass :: (C a, C a yv, Storable a, Storable yv, C u) => Int -> ResonantFilter s u a (ParameterA a) amp yv yvSource

chebyshevAHighpass :: (C a, C a yv, Storable a, Storable yv, C u) => Int -> ResonantFilter s u a (ParameterA a) amp yv yvSource

chebyshevBLowpass :: (C a, C a yv, Storable a, Storable yv, C u) => Int -> ResonantFilter s u a (ParameterB a) amp yv yvSource

chebyshevBHighpass :: (C a, C a yv, Storable a, Storable yv, C u) => Int -> ResonantFilter s u a (ParameterB a) amp yv yvSource

butterworthLowpassPoleSource

Arguments

:: (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.

-> ResonantFilter s u q (Pole q) amp yv yv 

butterworthHighpassPoleSource

Arguments

:: (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.

-> ResonantFilter s u q (Pole q) amp yv yv 

chebyshevALowpassPoleSource

Arguments

:: (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.

-> ResonantFilter s u q (Pole q) amp yv yv 

chebyshevAHighpassPoleSource

Arguments

:: (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.

-> ResonantFilter s u q (Pole q) amp yv yv 

chebyshevBLowpassPoleSource

Arguments

:: (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.

-> ResonantFilter s u q (Pole q) amp yv yv 

chebyshevBHighpassPoleSource

Arguments

:: (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.

-> ResonantFilter s u q (Pole q) amp yv yv 

With resonance

universal :: (C q, C q yv, C u) => ResonantFilter s u q (Parameter q) amp yv (Result yv)Source

moogLowpass :: (C q, C q yv, C u) => Int -> ResonantFilter s u q (Parameter q) amp yv yvSource

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

-> FrequencyFilter s u q (Parameter q) amp yv yv 

the lowest comb frequency is used as the filter frequency

allpassPhaserSource

Arguments

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

order, number of filters in the cascade

-> ResonantFilter s u q (q, Parameter q) amp yv yv 

We use the mixing ratio as resonance parameter. Mixing ratio r means: Amplify input by r and delayed signal by 1-r. Maximum effect is achieved for r=0.5.

Filter operators from calculus

integrate :: (C yv, C q, C u, C v) => T s u q (T s (Dimensional v q yv) (Dimensional (Mul u v) q yv))Source