Karya, built on 2018-02-23T20:23:55 (patch cf8565b7ac832266878af99a942555d139065f12)

Safe HaskellNone





data Track Source #

A simplified description of a UI track, as collected by Derive.Call.Integrate.



type Tracks = [(Track, [Track])] Source #

(note track, control tracks)

integrate Source #


:: Config 
-> Map TrackId TrackNum 
-> [Score.Event] 
-> (Tracks, [Text])

(tracks, errs)

Convert derived score events back into UI events.

TODO optionally quantize the ui events

allocate_tracks :: Map TrackId TrackNum -> [Score.Event] -> [(TrackKey, [Score.Event])] Source #

Allocate the events to separate tracks.

split_overlapping :: [Score.Event] -> [[Score.Event]] Source #

Split events into separate lists of non-overlapping events.

type TrackKey = (Maybe TrackNum, Score.Instrument, Pitch.ScaleId, Voice) Source #

This determines how tracks are split when integration recreates track structure.

type Voice = Int Source #



pitch_events :: Pitch.ScaleId -> Pitch.ScaleId -> [Score.Event] -> (Track, [Text]) Source #

Unlike control_events, this only drops dups that occur within the same event. This is because it's more normal to think of each note as establishing a new pitch, even if it's the same as the last one.

pitch_signal_events :: Score.Event -> ([Event.Event], [Text]) Source #

Convert an event's pitch signal to symbolic note names. This uses pitch_note, which handles a constant transposition, but not continuous pitch changes (it's not even clear how to spell those). I could try to convert back from NoteNumbers, but I still have the problem of how to convert the curve back to high level pitches.



clip_concat :: [[Event.Event]] -> [Event.Event] Source #

Concatenate the events, dropping ones that are out of order. The durations are not modified, so they still might overlap in duration, but the start times will be increasing.

drop_dups :: [Event.Event] -> [Event.Event] Source #

Drop subsequent events with the same text, since those are redundant for controls.

clip_to_zero :: [Event.Event] -> [Event.Event] Source #

Drop events before 0, keeping at least one at 0. Controls can wind up with samples before 0 (e.g. after using move), but events can't start before 0.