haskore-0.2.0.3: The Haskore Computer Music System

Safe Haskell | None

Haskore.Basic.Duration

Synopsis

- type T = Dur
- type Ratio = T
- type Offset = Rational
- (%+) :: Integer -> Integer -> T
- fromRatio :: Rational -> T
- toRatio :: T -> Rational
- toNumber :: Fractional a => T -> a
- scale :: Ratio -> T -> T
- add :: Offset -> T -> T
- divide :: T -> T -> Integer
- divisible :: T -> T -> Bool
- gcd :: T -> T -> T
- dotted :: T -> T
- doubleDotted :: T -> T
- bn :: T
- sfn :: T
- tn :: T
- sn :: T
- en :: T
- qn :: T
- hn :: T
- wn :: T
- dwn :: T
- dtn :: T
- dsn :: T
- den :: T
- dqn :: T
- dhn :: T
- ddhn :: T
- dden :: T
- ddqn :: T
- nameDictionary :: Map T String
- toString :: T -> String
- propToString :: Bool

# Documentation

type T = Dur Source

type Ratio = T Source

type Offset = Rational Source

(%+) :: Integer -> Integer -> T Source

fromRatio :: Rational -> T Source

toRatio :: T -> Rational Source

toNumber :: Fractional a => T -> aSource

scale :: Ratio -> T -> T Source

add :: Offset -> T -> T Source

divide :: T -> T -> Integer Source

divisible :: T -> T -> Bool Source

gcd :: T -> T -> T Source

dotted :: T -> T Source

doubleDotted :: T -> T Source

bn :: T Source

sfn :: T Source

tn :: T Source

sn :: T Source

en :: T Source

qn :: T Source

hn :: T Source

wn :: T Source

dwn :: T Source

dtn :: T Source

dsn :: T Source

den :: T Source

dqn :: T Source

dhn :: T Source

ddhn :: T Source

dden :: T Source

ddqn :: T Source

nameDictionary :: Map T String Source

toString :: T -> String Source

Converts `1%4` to `"qn"` and so on.

propToString :: Bool Source