synthesizer-dimensional-0.8.1.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 HaskellSafe-Inferred
LanguageHaskell2010

Synthesizer.Dimensional.Amplitude.Flat

Description

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 #

Minimal complete definition

toScalar, amplifySample, amplify

Instances

Instances details
C y => C y (Flat y) Source # 
Instance details

Defined in Synthesizer.Dimensional.Amplitude.Flat

Methods

toScalar :: Flat y -> y

amplifySample :: Flat y -> y -> y Source #

amplify :: Transform sig y => Flat y -> sig y -> sig y

(IsScalar v, C y) => C y (Numeric (T v y)) Source # 
Instance details

Defined in Synthesizer.Dimensional.Amplitude.Flat

Methods

toScalar :: Numeric (T v y) -> y

amplifySample :: Numeric (T v y) -> y -> y Source #

amplify :: Transform sig y => Numeric (T v y) -> sig y -> sig y

amplifySample :: C y amp => amp -> y -> y Source #

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 y Source #