Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Ui.Track

Contents

Description

The Track type and supporting functions.

Synopsis

# track

data Track Source #

An event track, which contains some configuration, and the actual events that make up the score.

Constructors

 Track Fieldstrack_title :: !Text track_events :: !Events.Events track_bg :: !Color.ColorSimilar to style, you can individually configure track bg color, but in practice I do it automatically at the low level with TrackBg.track_render :: !RenderConfig

Instances

 # Methods(==) :: Track -> Track -> Bool #(/=) :: Track -> Track -> Bool # # Methods # MethodsshowsPrec :: Int -> Track -> ShowS #show :: Track -> String #showList :: [Track] -> ShowS # # Methodsrnf :: Track -> () # # MethodsformatList :: [Track] -> Doc Source #

Construct a new Track.

High level SetStyle, with information provided automatically. Bool is true if the track has note track children.

It's a bit awkward to have two SetStyles, but some information can only be supplied by Ui.Sync.

# track signal

Whether to draw a Signal.Display on this track, and if so, how.

Constructors

 RenderConfig Fields

Instances

 # Methods # Methods # MethodsshowList :: [RenderConfig] -> ShowS # # MethodsformatList :: [RenderConfig] -> Doc Source #

RenderStyles can take an optional source which says which control the signal comes from. This is only for note tracks, and will extract the final signal from the events and display that.

Non-note tracks will ignore the RenderSource, and note tracks will ignore a RenderStyle without a RenderSource.

This has no effect on the actual rendering, since it just draws a signal and doesn't know where it came from, but is configuration for the code that goes and looks for that signal.

Constructors

 NoRender Line !(Maybe RenderSource) Filled !(Maybe RenderSource)

Instances

 # Methods # Methods # MethodsshowList :: [RenderStyle] -> ShowS # # MethodsformatList :: [RenderStyle] -> Doc Source #

Constructors

 Control Control Pitch PControl

Instances

 # Methods # Methods # MethodsshowList :: [RenderSource] -> ShowS # # MethodsformatList :: [RenderSource] -> Doc Source #

Each (BlockId, TrackId) pair can have a TrackSignal associated with it.

There's no particular reason a ruler couldn't also have a signal in it, except that it might look a little crowded. But RulerId isn't supported. If there's ever a need I can add it.

Similar to Derive.TrackWarp, the signal generated by signal tracks is stashed away in TrackSignals during derivation so it can be sent to the UI for display.

Signals are in real time, but the UI wants to display them in score time. If the block happens to have a linear warp then the mapping is trivial, and I don't have to bother generating another signal just for display. However, if there is a non-trivial warp, the signal will have to be unwarped back to ScoreTime.

Constructors

 TrackSignal Fieldsts_signal :: !Signal.Display ts_shift :: !ScoreTime ts_stretch :: !ScoreTime

Instances

 # Methods # MethodsshowList :: [TrackSignal] -> ShowS # # Methodsrnf :: TrackSignal -> () # # MethodsformatList :: [TrackSignal] -> Doc Source #