Copyright | (c) David Janin, 2016 |
---|---|
License | see the LICENSE file in the distribution |
Maintainer | janin@labri.fr |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
There is another choice (see module bundles Duration)
- data Duration d i
- updateOnDelay :: (Num d, Ord d, Ord i) => d -> Duration d i -> Duration d i
- updateOnVariable :: (Num d, Ord d, Ord i) => [i] -> Duration d i -> Duration d i
- durationFromID :: Num d => i -> Duration d i
- durationFromConst :: Num d => d -> Duration d i
- isZeroDuration :: (Num d, POrd d) => d -> Bool
- maybeConstDur :: (Num d, Ord d, Ord i) => Duration d i -> Maybe d
- toConstDur :: (Num d, Ord d, Ord i) => Duration d i -> d
- constDur :: d -> MinMaxAffine d i
Documentation
Ord iv => Tilable (Beat iv) (Music iv a) Source # | |
(Num d, Ord d, Ord i) => Eq (Duration d i) Source # | |
(Fractional d, Ord d, Ord i) => Fractional (Duration d i) Source # | |
(Num d, Ord d, Ord i) => Num (Duration d i) Source # | |
(Num d, Ord d, Ord i) => Ord (Duration d i) Source # | |
(Show d, Show i) => Show (Duration d i) Source # | |
(Num d, Ord d, Ord i) => POrd (Duration d i) Source # | |
(Num d, Ord d, Ord i) => Lattice (Duration d i) Source # | |
updateOnDelay :: (Num d, Ord d, Ord i) => d -> Duration d i -> Duration d i Source #
Replaces every unknown X by X+d where d is a constant duration.
updateOnVariable :: (Num d, Ord d, Ord i) => [i] -> Duration d i -> Duration d i Source #
Replaces every (index) specified unknown X by 0.
durationFromID :: Num d => i -> Duration d i Source #
Creates an unknown duration from a variable index.
durationFromConst :: Num d => d -> Duration d i Source #
Creates an constant duration from a constant value.
isZeroDuration :: (Num d, POrd d) => d -> Bool Source #
True if duration equals zero, false otherwise
maybeConstDur :: (Num d, Ord d, Ord i) => Duration d i -> Maybe d Source #
Tries to convert a duration into a constant value. Return Nothing when the duration is not constant.
toConstDur :: (Num d, Ord d, Ord i) => Duration d i -> d Source #
Converts a duration into a constant value. Makes an error when the duration is not constant.
constDur :: d -> MinMaxAffine d i Source #
Creates a duration from a duration constant d