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

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

Synthesizer.Dimensional.Amplitude.Displacement

Description

 

Synopsis

Documentation

mix :: (C y, C y, C y yv, C u) => R s u y yv -> R s u y yv -> R s u y yv Source #

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

mixVolume :: (C y, C y, C y yv, C u) => T u y -> R s u y yv -> R s u y yv -> R s u y yv Source #

mixMulti :: (C y, C y, C y yv, C u) => [R s u y yv] -> R s u y yv Source #

Mix one or more signals.

mixMultiVolume :: (C y, C y, C y yv, C u) => T u y -> [R s u y yv] -> R s u y yv Source #

raise :: (C y, C u) => T u y -> T rate (Dimensional u y) (T y) -> T rate (Dimensional u y) (T y) Source #

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

raiseVector :: (C y, C y yv, C u) => T u y -> yv -> T rate (Dimensional u y) (T yv) -> T rate (Dimensional u y) (T yv) Source #

distort :: (C y, C y yv, C u) => (yv -> yv) -> R s u y y -> R s u y yv -> R s u 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 output. 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.

map :: Primitive amp => (y0 -> y1) -> T rate amp (T y0) -> T rate amp (T y1) Source #

mapLinear :: (C y flat, C y, C u) => y -> T u y -> T rate flat (T y) -> T rate (Dimensional u y) (T 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.

mapExponential :: (C y flat, C y, C u) => y -> T u q -> T rate flat (T y) -> T rate (Dimensional u q) (T y) Source #

mapLinearDimension Source #

Arguments

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

range: one is mapped to center + range * ampX

-> T (Mul v u) y

center: zero is mapped to center

-> T rate (Dimensional u y) (T y) 
-> T rate (Dimensional (Mul v u) y) (T y) 

inflateGeneric :: (C y flat, Transform sig y) => amp -> T rate flat (sig y) -> T rate (Numeric amp) (sig y) Source #

I suspect that this function will most oftenly not the right choice. When the amplitude is Flat, better use inflate. When the amplitude is Numeric, better use Filter.amplifyScalarDimension since this will not modify signal values but only the global amplitude. This is both more efficient and ensures boundedness of signal values.

inflate :: amp -> T rate (Flat y) sig -> T rate (Numeric amp) sig Source #