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

Safe HaskellNone

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 

Fields

Instances
Eq Track # 
Instance details

Defined in Ui.Track

Methods

(==) :: Track -> Track -> Bool #

(/=) :: Track -> Track -> Bool #

Read Track # 
Instance details

Defined in Ui.Track

Show Track # 
Instance details

Defined in Ui.Track

Methods

showsPrec :: Int -> Track -> ShowS #

show :: Track -> String #

showList :: [Track] -> ShowS #

DeepSeq.NFData Track # 
Instance details

Defined in Ui.Track

Methods

rnf :: Track -> () #

Pretty.Pretty Track # 
Instance details

Defined in Ui.Track

Serialize Track # 
Instance details

Defined in Cmd.Serialize

track :: Text -> Events.Events -> Track Source #

Construct a new Track.

type SetStyleHigh = (TrackBg, Bool -> Event.EventStyle) Source #

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

data RenderConfig Source #

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

data RenderStyle 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.

type TrackSignals = Map (BlockId, TrackId) TrackSignal 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.

data TrackSignal Source #

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.

Instances
Eq TrackSignal # 
Instance details

Defined in Ui.Track

Show TrackSignal # 
Instance details

Defined in Ui.Track

DeepSeq.NFData TrackSignal # 
Instance details

Defined in Ui.Track

Methods

rnf :: TrackSignal -> () #

CStorable TrackSignal # 
Instance details

Defined in Ui.TrackC

Pretty.Pretty TrackSignal # 
Instance details

Defined in Ui.Track