Safe Haskell | Safe-Inferred |
---|
Functions to write performance postprocess functions.
Synopsis
- type Flat stroke = S.Flat (Realize.Group (Realize.Stroke stroke)) (Realize.Note stroke)
- type Technique stroke = [stroke] -> stroke -> [stroke] -> Maybe stroke
- postprocess :: Technique (Realize.Stroke stroke) -> [Flat stroke] -> [Flat stroke]
- plain :: Technique stroke -> Technique (Realize.Stroke stroke)
Documentation
type Flat stroke = S.Flat (Realize.Group (Realize.Stroke stroke)) (Realize.Note stroke) Source #
A realized note with associated S.Meta.
type Technique stroke Source #
= [stroke] | Dropped strokes. These are in original order, which means if you want to see the previous strokes, you have to use Lists.takeEnd. |
-> stroke | current |
-> [stroke] | next |
-> Maybe stroke | Nothing to not modify |
A Technique is a wrapper around postprocess to write functions which modify strokes during a reduction.
TODO: it turns out this doesn't really happen very much, so far only the [k]tk -> kk transformation seems common. There are some other transformations but they aren't universal. Perhaps instead this should be a per-Korvai thing.
postprocess :: Technique (Realize.Stroke stroke) -> [Flat stroke] -> [Flat stroke] Source #