reactive-midyim-0.4.0.1: Process MIDI events via reactive-banana

Safe HaskellNone
LanguageHaskell98

Reactive.Banana.MIDI.Time

Synopsis

Documentation

newtype T m t a Source #

The T types are used instead of floating point types, because the latter ones caused unpredictable 'negative number' errors. There should be a common denominator to all involved numbers. This way we can prevent unlimited growth of denominators.

Constructors

Cons (Const a (m t)) 

Instances

Eq a => Eq (T m t a) Source # 

Methods

(==) :: T m t a -> T m t a -> Bool #

(/=) :: T m t a -> T m t a -> Bool #

Ord a => Ord (T m t a) Source # 

Methods

compare :: T m t a -> T m t a -> Ordering #

(<) :: T m t a -> T m t a -> Bool #

(<=) :: T m t a -> T m t a -> Bool #

(>) :: T m t a -> T m t a -> Bool #

(>=) :: T m t a -> T m t a -> Bool #

max :: T m t a -> T m t a -> T m t a #

min :: T m t a -> T m t a -> T m t a #

Show a => Show (T m t a) Source # 

Methods

showsPrec :: Int -> T m t a -> ShowS #

show :: T m t a -> String #

showList :: [T m t a] -> ShowS #

Monoid a => Monoid (T m t a) Source # 

Methods

mempty :: T m t a #

mappend :: T m t a -> T m t a -> T m t a #

mconcat :: [T m t a] -> T m t a #

(RelativeC t, Split a) => C (T m t a) Source # 

Methods

split :: T m t a -> T m t a -> (T m t a, (Bool, T m t a)) #

cons :: a -> T m t a Source #

decons :: T m t a -> a Source #

relative :: (Ord a, Monoid a) => String -> a -> T m Relative a Source #

data Absolute Source #

Constructors

Absolute 

data Relative Source #

Constructors

Relative 

newtype Ticks Source #

Constructors

Ticks 

Fields

Instances

Eq Ticks Source # 

Methods

(==) :: Ticks -> Ticks -> Bool #

(/=) :: Ticks -> Ticks -> Bool #

Ord Ticks Source # 

Methods

compare :: Ticks -> Ticks -> Ordering #

(<) :: Ticks -> Ticks -> Bool #

(<=) :: Ticks -> Ticks -> Bool #

(>) :: Ticks -> Ticks -> Bool #

(>=) :: Ticks -> Ticks -> Bool #

max :: Ticks -> Ticks -> Ticks #

min :: Ticks -> Ticks -> Ticks #

Show Ticks Source # 

Methods

showsPrec :: Int -> Ticks -> ShowS #

show :: Ticks -> String #

showList :: [Ticks] -> ShowS #

Monoid Ticks Source # 

Methods

mempty :: Ticks #

mappend :: Ticks -> Ticks -> Ticks #

mconcat :: [Ticks] -> Ticks #

Quantity Ticks Source # 

Methods

ticksFromAny :: Timed m => T m t Ticks -> m (T m t Ticks) Source #

Split Ticks Source # 

Methods

split :: Ticks -> Ticks -> (Ticks, (Bool, Ticks)) Source #

class (Ord a, Monoid a) => Split a where Source #

Technically identical to NonNeg.C but without connotation of non-negativity.

Minimal complete definition

split

Methods

split :: a -> a -> (a, (Bool, a)) Source #

Instances

class MonadMoment m => Timed m where Source #

Minimal complete definition

ticksFromSeconds

Methods

ticksFromSeconds :: T m t Seconds -> m (T m t Ticks) Source #

class Quantity a where Source #

Minimal complete definition

ticksFromAny

Methods

ticksFromAny :: Timed m => T m t a -> m (T m t Ticks) Source #

Instances

Quantity Ticks Source # 

Methods

ticksFromAny :: Timed m => T m t Ticks -> m (T m t Ticks) Source #

Quantity Seconds Source # 

Methods

ticksFromAny :: Timed m => T m t Seconds -> m (T m t Ticks) Source #

inc :: Monoid a => T m Relative a -> T m t a -> T m t a Source #

subSat :: Split a => T m t a -> T m t a -> T m Relative a Source #

scale :: Double -> T m Relative Ticks -> T m Relative Ticks Source #

scale could also be defined for Seconds, however, repeated application of scale would yield unlimited growth of denominator. This applies e.g. to controlled beat generation.

scaleCeiling :: Double -> T m Relative Ticks -> T m Relative Ticks Source #

scale could also be defined for Seconds, however, repeated application of scale would yield unlimited growth of denominator. This applies e.g. to controlled beat generation.