Safe Haskell | Safe-Inferred |
---|
Idiomatic things for various instruments.
Synopsis
- library :: Library.Library
- c_pizz_arp :: Transformer Note
- pizz_arp :: RealTime.RealTime -> Stream.Stream Score.Event -> NoteDeriver
- map_simultaneous :: RealTime.RealTime -> (Score.Event -> Bool) -> (NonEmpty Score.Event -> Deriver [Score.Event]) -> Stream.Stream Score.Event -> NoteDeriver
- c_avoid_overlap :: Transformer Note
- avoid_overlap :: RealTime.RealTime -> Stream.Stream Score.Event -> Stream.Stream Score.Event
- next_same_pitch :: Stream.Stream Score.Event -> Stream.Stream (Score.Event, [Score.Event])
- c_zero_duration_mute :: Transformer Note
- c_extend_duration :: Transformer Note
- extend_duration :: [Attrs.Attributes] -> RealTime.RealTime -> Stream.Stream Score.Event -> Stream.Stream Score.Event
- c_apply_attributes :: Transformer Note
- apply_attributes :: Score.Event -> Score.Event
- control_attributes :: ScoreT.Control -> Maybe.Maybe Attrs.Attributes
- control_prefix :: Text
Documentation
pizz arp
:: RealTime.RealTime | events starting closer than this amount are considered simultaneous |
-> (Score.Event -> Bool) | only process events that pass this predicate |
-> (NonEmpty Score.Event -> Deriver [Score.Event]) | process simultaneous events |
-> Stream.Stream Score.Event | |
-> NoteDeriver |
avoid overlap
avoid_overlap :: RealTime.RealTime -> Stream.Stream Score.Event -> Stream.Stream Score.Event Source #
next_same_pitch :: Stream.Stream Score.Event -> Stream.Stream (Score.Event, [Score.Event]) Source #
For each event, get the next events with the same instrument and starting pitch.
zero dur mute
c_zero_duration_mute :: Transformer Note Source #
See DUtil.zero_duration for a version that can apply any kind of transformation. This one is limited to attrs because it's a postproc, and it's a postproc because otherwise it's hard to tell if a note is really zero duration and not just an infer-duration note.
extend duration
extend_duration :: [Attrs.Attributes] -> RealTime.RealTime -> Stream.Stream Score.Event -> Stream.Stream Score.Event Source #
Don't overlap with another note with the same pitch, as in avoid_overlap
.
apply attributes
apply_attributes :: Score.Event -> Score.Event Source #
For all controls that start with control_prefix
and are positive during
the event start, add those attributes to the event.
TODO a possible variation would be to take 0<v<1 as a probability of applying the attribute.