reactive-midyim-0.4.1.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 # 
Instance details

Defined in Reactive.Banana.MIDI.Time

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 # 
Instance details

Defined in Reactive.Banana.MIDI.Time

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 # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

show :: T m t a -> String #

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

Semigroup a => Semigroup (T m t a) Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

sconcat :: NonEmpty (T m t a) -> T m t a #

stimes :: Integral b => b -> T m t a -> T m t a #

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

Defined in Reactive.Banana.MIDI.Time

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 # 
Instance details

Defined in Reactive.Banana.MIDI.Time

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 
Instances
RelativeC Relative Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

newtype Seconds Source #

Constructors

Seconds 

Fields

Instances
Eq Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

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

Ord Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Show Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Semigroup Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Monoid Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Quantity Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

Split Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

newtype Ticks Source #

Constructors

Ticks 

Fields

Instances
Eq Ticks Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

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

Ord Ticks Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

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 # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

showsPrec :: Int -> Ticks -> ShowS #

show :: Ticks -> String #

showList :: [Ticks] -> ShowS #

Semigroup Ticks Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

sconcat :: NonEmpty Ticks -> Ticks #

stimes :: Integral b => b -> Ticks -> Ticks #

Monoid Ticks Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

mempty :: Ticks #

mappend :: Ticks -> Ticks -> Ticks #

mconcat :: [Ticks] -> Ticks #

Quantity Ticks Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

Split Ticks Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

class RelativeC t Source #

Instances
RelativeC Relative Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

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
Split Ticks Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

Split Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

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 # 
Instance details

Defined in Reactive.Banana.MIDI.Time

Methods

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

Quantity Seconds Source # 
Instance details

Defined in Reactive.Banana.MIDI.Time

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.