Copyright | (c) Henning Thielemann 2008-2009 |
---|---|
License | GPL |
Maintainer | synthesizer@henning-thielemann.de |
Stability | provisional |
Portability | requires multi-parameter type classes |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
Documentation
class C amp => C y amp | amp -> y Source #
toScalar, amplifySample, amplify
amplifySample :: C y amp => amp -> y -> y Source #