Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone





data Track Source #

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


Show Track # 
Instance details

Defined in Cmd.Integrate.Convert


showsPrec :: Int -> Track -> ShowS #

show :: Track -> String #

showList :: [Track] -> ShowS #

Pretty.Pretty Track # 
Instance details

Defined in Cmd.Integrate.Convert

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.