synthesizer- Audio signal processing coded in HaskellSource codeContentsIndex
newtype T s sig = Cons {
decons :: sig Bool
toAmplitudeSignal :: (C q, C u, Functor sig) => T s u q (T s sig -> T s (D (Recip u) q (T sig)) q)
newtype T s sig Source

We want to represent streams of discrete events in a manner that is more safe than plain [Bool]. Each peak can be imagined as a Dirac impulse.

A [Bool] could be used accidentally for Synthesizer.Dimensional.Amplitude.Cut.selectBool, where selectBool is intended for piecewise constant control curves.

You may think that a type like Peak = Peak Bool as sample type in T s Peak would also do the job. Actually, this wouldn't be a good idea since you can apply constant interpolation on it, which obviously fools the idea of a peak.

decons :: sig Bool
show/hide Instances
Monoid (sig Bool) => Monoid (T s sig)
Transform (sig Bool) => Transform (T s sig)
Read (sig Bool) => Read (T s sig)
toAmplitudeSignal :: (C q, C u, Functor sig) => T s u q (T s sig -> T s (D (Recip u) q (T sig)) q)Source
This is the most frequently needed transformation of a stream of peaks, if not the only one. It converts to a signal of peaks with area 1. This convention is especially useful for smoothing filters that produce frequency progress curves from zero crossings.
Produced by Haddock version 2.4.2