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

Safe HaskellNone

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) 
Ord a => Ord (T m t a) 
Show a => Show (T m t a) 
Monoid a => Monoid (T m t a) 
(RelativeC t, Split a) => C (T m t a) 

cons :: a -> T m t aSource

decons :: T m t a -> aSource

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

data Absolute Source

Constructors

Absolute 

data Relative Source

Constructors

Relative 

Instances

newtype Ticks Source

Constructors

Ticks 

Fields

unTicks :: Integer
 

class (Ord a, Monoid a) => Split a whereSource

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

Methods

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

Instances

class C m => Timed m whereSource

Methods

ticksFromSeconds :: Frameworks s => T m t Seconds -> m s (T m t Ticks)Source

class Quantity a whereSource

Methods

ticksFromAny :: (Timed m, Frameworks s) => T m t a -> m s (T m t Ticks)Source

inc :: Monoid a => T m Relative a -> T m t a -> T m t aSource

subSat :: Split a => T m t a -> T m t a -> T m Relative aSource

scale :: Double -> T m Relative Ticks -> T m Relative TicksSource

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 TicksSource

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.