Karya, built on Sun Nov 26 01:04:37 PST 2017 (patch 0a920b2bde70c0cbac8ee09d158064798b61bbe5)

Safe HaskellNone




The main attributes of an event are its duration and text. The starting time is actually in the Track.

Events can display a signal, which will be rendered in the background in one of a few ways: a color, or a graph.

The text in events never changes size, even when you zoom in or out. If an Event gets too small for its text, it collapses into a blue chunk, which is the standard color for some data that didn't fit.

The beginning of the Event is marked with a red line. The text will begin slightly below the line, but still try to fit within the event. If the Event end doesn't give room for the text, the text will overlap the line so that its bottom touches the bottom of the Event. If there is no room for the text at all, because of other text or the top of the Event, the text will disappear and the line will be blue, to mark hidden text.

No Event may overlap another Event on the same Track.



type Text = Text Source #

TODO remove this, it dates from when event text was ByteString.

data Stack Source #




type IndexKey = ScoreTime.TrackTime Source #

This is the original position of the event on its integrated track. I can use this to find the (hopefully) equivalent event from the next integration to apply it even if the event has been moved or altered.

Keying on just the position has the effect that moving an event means to move any event that is generated at that position. This might be perfectly reasonable or even desirable since it's easier to understand. I'll have to see what kinds of edits and what kinds of reintegrations are likely in practice.


end :: Event -> ScoreTime.ScoreTime Source #

Return the position at the end of the event. If it has a negative duration, this will be before the start.


data Orientation Source #

Whether the event is front-weighted or back-weighted. In the event this is represented with positive or negative duration.




Bounded Orientation # 
Enum Orientation # 
Eq Orientation # 
Ord Orientation # 
Read Orientation # 
Show Orientation # 
Pretty.Pretty Orientation # 
Serialize.Serialize Orientation # 


set_start :: ScoreTime.ScoreTime -> Event -> Event Source #

Move the start only. This could invert the duration if the start moves past the end.

set_end :: ScoreTime.ScoreTime -> Event -> Event Source #

Redundant with the end_ lens, but here for symmetry with set_start.

round :: Event -> Event Source #

Round event times as described in ScoreTime.round. TODO used by Events, do I really need this?



type EventStyle Source #


 = Text

track title

-> Event 
-> Style.StyleId 

This is called on events before they go to the UI, to be used for "syntax highlighting", i.e. it can set the style depending on the event, but the change in style won't be saved in the event itself.