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

Portabilityrequires multi-parameter type classes
Safe HaskellNone



A class that allows unified handling of Amplitude.Flat and Amplitude.Dimensional Dim.Scalar which is often used for control curves. However, I'm thinking about whether this is more abuse than use. So this class may disappear in future. Amplitude.Flat might become a synonym for DN.scalar one. Sometimes, using Flat instead of DN.Scalar has the advantage of internally saving a multiplication with one, but I think the compiler should optimize that away. The optimization however is more complicated if a whole StorableVector is multiplied element-wise by one. E.g. the concatenation of flat (storable) signals can be done without copying the entire data.


class C amp => C y amp | amp -> y whereSource


amplifySample :: amp -> y -> ySource


(IsScalar v, C y) => C y (Numeric (T v y)) 
C y => C y (Flat y) 

canonicalize :: (C y flat, Transform sig y) => T rate flat (sig y) -> T rate (Flat y) (sig y)Source

toSamples :: (C y flat, Transform sig y) => T rate flat (sig y) -> sig ySource