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

Safe HaskellNone
LanguageHaskell2010

Synthesizer.Dimensional.Signal

Description

Signals equipped with volume and sample rate information that may carry a unit. Kind of volume and sample rate is configurable by types.

Synopsis

Documentation

data T rate amplitude body Source #

A signal value 0.5 at global amplitude 1 and signal value 1 at global amplitude 0.5 shall represent the same signal. Thus observing the amplitude breaks the abstraction.

Cyclic nature such as needed for Fourier transform must be expressend in the body. It would be nice to use the data type for waveforms, too, but for waveforms the rate parameter makes no sense.

type R s v y yv = T (Phantom s) (Dimensional v y) (T yv) Source #

asTypeOfAmplitude :: y -> T rate (Dimensional v y) sig -> y Source #

render :: C u => T (Recip u) t -> (forall s. T s u t (T (Phantom s) amp sig)) -> T (Dimensional u t) amp sig Source #

apply :: C u => (forall s. T s u t (T (Phantom s) amp0 sig0 -> T (Phantom s) amp1 sig1)) -> T (Dimensional u t) amp0 sig0 -> T (Dimensional u t) amp1 sig1 Source #

cache :: Storable yv => T rate amp (T yv) -> T rate amp (T yv) Source #

bindCached :: Storable yv => T s u t (T rate amp (T yv)) -> (T rate amp (T yv) -> T s u t b) -> T s u t b Source #

share :: Storable yv => T s u t (T rate amp (T yv)) -> (T s u t (T rate amp (T yv)) -> T s u t b) -> T s u t b Source #

store :: (C t, C u, Storable yv) => T u t -> T s u t (T (Phantom s) amp (T yv) -> T (Phantom s) amp (T yv)) Source #

restore :: Read sig yv => T rate amp (sig yv) -> T rate amp (T yv) Source #

($-) :: (C y, C y, C u, C v) => T s u t (R s v y y -> a) -> T v y -> T s u t a infixl 0 Source #

Take a scalar argument where a process expects a signal. Only possible for non-negative values so far.

($&) :: Applicative f => f (a -> b) -> f a -> f b Source #

(&*^) :: (C y flat, Transform sig y) => amp -> T s u t (T rate flat (sig y)) -> T s u t (T rate (Numeric amp) (sig y)) infix 7 Source #

(&*>^) :: amp -> T s u t (T rate (Flat y) sig) -> T s u t (T rate (Numeric amp) sig) infix 7 Source #