- data T a b = forall s c . Cons (TimeAbs -> Either c a -> State s (Maybe b, T Time c)) s (T Time c)
- map :: (a -> b) -> T a b
- mapMaybe :: (a -> Maybe b) -> T a b
- compose :: T b c -> T a b -> T a c
- parallel :: Monoid b => T a b -> T a b -> T a b
- traverse :: s -> (a -> State s b) -> T a b
- process :: T Data EventDataBundle -> ReaderT Handle IO ()
- transposeBundle :: Int -> T Data EventDataBundle
- transpose :: Int -> T Data Data
- delayAdd :: Word8 -> Time -> T Data EventDataBundle
- pattern :: (Selector i, [i]) -> Time -> T Data EventDataBundle
- updateChordDur :: (Channel, Controller) -> (Time, Time) -> Data -> State (Time, KeySet) (Maybe EventDataBundle, T time body)
- patternTempo :: (Selector i, [i]) -> ((Channel, Controller), (Time, Time, Time)) -> T Data EventDataBundle
- patternMultiTempo :: (Selector i, T Int [IndexNote i]) -> ((Channel, Controller), (Time, Time, Time)) -> T Data EventDataBundle
- updateSerialChord :: Int -> NoteEv -> Note -> KeyQueue -> KeyQueue
- updateSerialChordDur :: Int -> (Channel, Controller) -> (Time, Time) -> Data -> State (Time, KeyQueue) (Maybe EventDataBundle, T time body)
- patternSerialTempo :: Int -> (Selector i, [i]) -> ((Channel, Controller), (Time, Time, Time)) -> T Data EventDataBundle
- sweep :: Channel -> Time -> (Controller, (Time, Time)) -> Controller -> Controller -> (Double -> Double) -> T Data EventDataBundle
- partition :: (a -> Bool) -> T a (Maybe a, Maybe a)
- maybeIn :: T a b -> T (Maybe a) b
- guide :: Monoid b => (a -> Bool) -> T a b -> T a b -> T a b
- cyclePrograms :: [Program] -> T Data EventDataBundle
- cycleProgramsDefer :: Time -> [Program] -> T Data EventDataBundle
- main :: IO ()
Documentation
The returned event list must be finite.
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?
updateChordDur :: (Channel, Controller) -> (Time, Time) -> Data -> State (Time, KeySet) (Maybe EventDataBundle, T time body)Source
patternTempo :: (Selector i, [i]) -> ((Channel, Controller), (Time, Time, Time)) -> T Data EventDataBundleSource
patternMultiTempo :: (Selector i, T Int [IndexNote i]) -> ((Channel, Controller), (Time, Time, Time)) -> T Data EventDataBundleSource
updateSerialChordDur :: Int -> (Channel, Controller) -> (Time, Time) -> Data -> State (Time, KeyQueue) (Maybe EventDataBundle, T time body)Source
patternSerialTempo :: Int -> (Selector i, [i]) -> ((Channel, Controller), (Time, Time, Time)) -> T Data EventDataBundleSource
sweep :: Channel -> Time -> (Controller, (Time, Time)) -> Controller -> Controller -> (Double -> Double) -> T Data EventDataBundleSource
cyclePrograms :: [Program] -> T Data EventDataBundleSource
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.