Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- type Time = Integer
- type Velocity = Integer
- type Program = Integer
- type Controller = Integer
- type Chan = Integer
- data Event a
- data Channel a = Channel Integer a
- data Message
- = PgmChange Program
- | Controller Controller Integer
- | On Pitch Velocity
- | Off Pitch Velocity
- note :: Time -> Pitch -> [Event Message]
- noteOn :: Pitch -> Event Message
- noteOff :: Pitch -> Event Message
- rest :: Time -> [Event a]
- program :: Program -> [Event Message]
- controller :: Controller -> Integer -> [Event Message]
- channel :: Chan -> [Event a] -> [Event (Channel a)]
- transpose :: Integer -> [Event Message] -> [Event Message]
- transposeEvent :: Integer -> Event Message -> Event Message
- changeTempo :: Integer -> [Event a] -> [Event a]
- changeTempoEvent :: Integer -> Event a -> Event a
- controlCurve :: Time -> Controller -> [Integer] -> [Event Message]
- normalVelocity :: Velocity
- emphasize :: Integer -> [Event Message] -> [Event Message]
- takeTime :: Time -> [Event a] -> [Event a]
- dropTime :: Time -> [Event a] -> [Event a]
- skipTime :: Time -> [Event a] -> [Event a]
- compressTime :: Integer -> Time -> [Event a] -> [Event a]
- lazyPause :: [Event a] -> [Event a]
- duration :: [Event a] -> Time
- (+:+) :: [Event a] -> [Event a] -> [Event a]
- merge :: [Event a] -> [Event a] -> [Event a]
- (=:=) :: [Event a] -> [Event a] -> [Event a]
- mergeWait :: Bool -> Time -> Time -> [Event a] -> Time -> [Event a] -> [Event a]
- mergeMany :: [[Event a]] -> [Event a]
Documentation
type Controller = Integer Source #
PgmChange Program | |
Controller Controller Integer | |
On Pitch Velocity | |
Off Pitch Velocity |
note :: Time -> Pitch -> [Event Message] Source #
This function is strict in the pitch and thus asserts that the pitch for NoteOn and NoteOff are evaluated at the same time to the same value. This way we assert that a pressed note will be released later.
controller :: Controller -> Integer -> [Event Message] Source #
controlCurve :: Time -> Controller -> [Integer] -> [Event Message] Source #
skipTime :: Time -> [Event a] -> [Event a] Source #
Like dropTime
but does not simply remove events but play them at once.
This way all tones are correctly stopped and started,
however you risk the 'too many events in a too short period' exception.
compressTime :: Integer -> Time -> [Event a] -> [Event a] Source #
Do not simply remove events but play them at once. This way all tones are correctly stopped and started, however you risk the 'too many events in a too short period' exception.