synthesizer-dimensional-0.2: Audio signal processing with static physical dimensionsSource codeContentsIndex
Synthesizer.Dimensional.Rate
Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de
Description

Light-weight sample parameter inference which will fit most needs. We only do "poor man's inference", only for sample rates. The sample rate will be provided as an argument of a special type T. This argument will almost never be passed explicitly but should be handled by operators analogous to '($)' and '(.)'.

In contrast to the run-time inference approach, we have the static guarantee that the sample rate is fixed before passing a signal to the outside world. However we still need to make it safe that signals that are rendered for one sample rate are not processed with another sample rate. We should wrap T s u t -> a in a Reader monad, but that's not all. We must investigate a little more here. Maybe we need another type parameter for the sample rate and the signals in order to show that they belong together, like it is done in the ST monad.

Synopsis
newtype T s u t = Cons {
decons :: T (Recip u) t
}
fromNumber :: C u => Recip u -> t -> T s u t
toNumber :: C u => Recip u -> T s u t -> t
fromDimensionNumber :: C u => T (Recip u) t -> T s u t
toDimensionNumber :: C u => T s u t -> T (Recip u) t
common :: Eq t => String -> T s u t -> T s u t -> T s u t
Documentation
newtype T s u t Source
This wraps a function which computes a sample rate dependent result. Sample rate tells how many values per unit are stored for representation of a signal.
Constructors
Cons
decons :: T (Recip u) t
show/hide Instances
Eq t => Eq (T s u t)
Ord t => Ord (T s u t)
(Show t, C u) => Show (T s u t)
fromNumber :: C u => Recip u -> t -> T s u tSource
toNumber :: C u => Recip u -> T s u t -> tSource
This function is somehow dangerous because it drops the s parameter.
fromDimensionNumber :: C u => T (Recip u) t -> T s u tSource
toDimensionNumber :: C u => T s u t -> T (Recip u) tSource
This function is somehow dangerous because it drops the s parameter.
common :: Eq t => String -> T s u t -> T s u t -> T s u tSource
Produced by Haddock version 2.4.2