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

Safe HaskellNone
LanguageHaskell2010

Synthesizer.Dimensional.Map.Displacement

Synopsis

Documentation

mix :: (C y, C y, C y yv, C v, Arrow arrow) => T arrow (DNS v y yv, DNS v y yv) (DNS v y yv) Source #

Mix two signals. In contrast to zipWith the result has the length of the longer signal.

mixVolume :: (C y, C y yv, C v, Arrow arrow) => T v y -> T arrow (DNS v y yv, DNS v y yv) (DNS v y yv) Source #

fanoutAndMixMulti :: (C y, C y yv, C v, Arrow arrow) => [T arrow sample (DNS v y yv)] -> T arrow sample (DNS v y yv) Source #

Mix one or more signals.

fanoutAndMixMultiVolume :: (C y, C y yv, C v, Arrow arrow) => T v y -> [T arrow sample (DNS v y yv)] -> T arrow sample (DNS v y yv) Source #

Mix zero or more signals.

raise :: (C y, C y yv, C v, Arrow arrow) => T v y -> yv -> T arrow (DNS v y yv) (DNS v y yv) Source #

Add a number to all of the signal values. This is useful for adjusting the center of a modulation.

distort :: (C y, C y yv, C v, Arrow arrow) => (yv -> yv) -> T arrow (DNS v y y, DNS v y yv) (DNS v y yv) Source #

Distort the signal using a flat function. The first signal gives the scaling of the function. If the scaling is c and the input sample is y, then c * f(y/c) is emitted. This way we can use an (efficient) flat function and have a simple, yet dimension conform, way of controlling the distortion. E.g. if the distortion function is tanh then the value c controls the saturation level.

mapLinear :: (C y flat, C y, C u, Arrow arrow) => y -> T u y -> T arrow (T flat y) (DNS u y y) Source #

Map a control curve without amplitude unit by a linear (affine) function with a unit. This is a combination of raise and amplify.

It is not quite correct in the sense, that it does not produce low-level sample values in the range (-1,1). Instead it generates values around 1.

mapExponential :: (C y flat, C y, C u, Arrow arrow) => y -> T u q -> T arrow (T flat y) (DNS u q y) Source #

mapLinearDimension Source #

Arguments

:: (C y, C y, C u, C v, Arrow arrow) 
=> T v y

range: one is mapped to center + range * ampX

-> T (Mul v u) y

center: zero is mapped to center

-> T arrow (DNS u y y) (DNS (Mul v u) y y)