live-sequencer-0.0.6: Live coding of MIDI music

Safe HaskellSafe
LanguageHaskell98

Midi

Synopsis

Documentation

data Event a Source #

Constructors

Wait Time 
Say String 
Event a 

data Channel a Source #

Constructors

Channel Integer a 

Instances

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.

rest :: Time -> [Event a] Source #

channel :: Chan -> [Event a] -> [Event (Channel a)] Source #

takeTime :: Time -> [Event a] -> [Event a] Source #

dropTime :: Time -> [Event a] -> [Event a] 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.

lazyPause :: [Event a] -> [Event a] Source #

Keep only Wait constructors. You can use this as a lazily generated pause which is usually more efficient than (Wait (duration xs)).

(+:+) :: [Event a] -> [Event a] -> [Event a] infixr 7 Source #

merge :: [Event a] -> [Event a] -> [Event a] Source #

(=:=) :: [Event a] -> [Event a] -> [Event a] infixr 6 Source #

mergeWait :: Bool -> Time -> Time -> [Event a] -> Time -> [Event a] -> [Event a] Source #

mergeMany :: [[Event a]] -> [Event a] Source #