streamed-0.1: Programmatically edit MIDI event streams via ALSA

Sound.MIDI.ALSA.Causal

Synopsis

Documentation

data T a b Source

The returned event list must be finite.

Constructors

forall s c . Cons (TimeAbs -> Either c a -> State s (Maybe b, T Time c)) s (T Time c) 

Instances

map :: (a -> b) -> T a bSource

mapMaybe :: (a -> Maybe b) -> T a bSource

compose :: T b c -> T a b -> T a cSource

parallel :: Monoid b => T a b -> T a b -> T a bSource

Run two stream processor in parallel. We cannot use the Arrow method &&& since we cannot the first method of the Arrow class. Consider first :: arrow a b -> arrow (c,a) (c,b) and a trigger where arrow a b generates an event of type b. How could we generate additionally an event of type c without having an input event?

traverse :: s -> (a -> State s b) -> T a bSource

partition :: (a -> Bool) -> T a (Maybe a, Maybe a)Source

maybeIn :: T a b -> T (Maybe a) bSource

guide :: Monoid b => (a -> Bool) -> T a b -> T a b -> T a bSource

cycleProgramsDefer :: Time -> [Program] -> T Data EventDataBundleSource

 cycleProgramsDefer t

After a note that triggers a program change, we won't change the program in the next t seconds. This is in order to allow chords being played and in order to skip accidentally played notes.