Safe Haskell | Safe-Inferred |
---|
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.
Synopsis
- data Event
- data Stack = Stack {
- stack_stack :: !Stack.Stack
- stack_key :: !IndexKey
- type IndexKey = ScoreTime.TrackTime
- event :: ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> Text -> Event
- clear_integration :: Event -> Event
- start :: Event -> ScoreTime.TrackTime
- duration :: Event -> ScoreTime.TrackTime
- text :: Event -> Text
- style :: Event -> Style.StyleId
- stack :: Event -> Maybe Stack
- start_ :: Lens.Lens Event ScoreTime.TrackTime
- duration_ :: Lens.Lens Event ScoreTime.TrackTime
- text_ :: Lens.Lens Event Text
- style_ :: Lens.Lens Event Style.StyleId
- stack_ :: Lens.Lens Event (Maybe Stack)
- end_ :: Lens.Lens Event ScoreTime.TrackTime
- set_text_raw :: Text -> Event -> Event
- end :: Event -> ScoreTime.ScoreTime
- range :: Event -> (ScoreTime.ScoreTime, ScoreTime.ScoreTime)
- overlaps :: ScoreTime.ScoreTime -> Event -> Bool
- min :: Event -> ScoreTime.ScoreTime
- max :: Event -> ScoreTime.ScoreTime
- orientation :: Event -> Types.Orientation
- orientation_of :: ScoreTime.TrackTime -> Types.Orientation
- is_negative :: Event -> Bool
- is_positive :: Event -> Bool
- unmodified :: Event -> Event
- set_start :: ScoreTime.ScoreTime -> Event -> Event
- set_end :: ScoreTime.ScoreTime -> Event -> Event
- place :: ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> Event -> Event
- round :: Event -> Event
- intern_event :: Map Text (Text, Int) -> Event -> (Map Text (Text, Int), Event)
- type EventStyle = Text -> Event -> Style.StyleId
types
Instances
Show Event Source # | |
CStorable Event Source # | |
DeepSeq.NFData Event Source # | |
Eq Event Source # | |
Pretty.Pretty Event Source # | |
Serialize.Serialize Event Source # | |
Stack | |
|
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.
event :: ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> Text -> Event Source #
Event constructor.
clear_integration :: Event -> Event Source #
Recreate the event without the integrated-from metadata.
access
start :: Event -> ScoreTime.TrackTime Source #
duration :: Event -> ScoreTime.TrackTime Source #
style :: Event -> Style.StyleId Source #
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
.
range :: Event -> (ScoreTime.ScoreTime, ScoreTime.ScoreTime) Source #
min :: Event -> ScoreTime.ScoreTime Source #
max :: Event -> ScoreTime.ScoreTime Source #
Orientation
orientation :: Event -> Types.Orientation Source #
is_negative :: Event -> Bool Source #
is_positive :: Event -> Bool Source #
modify
unmodified :: Event -> Event Source #
Mark this is a generated event, which has not yet been modified.
set_start :: ScoreTime.ScoreTime -> Event -> Event Source #
Move the start only. This could invert the duration if the start moves past the end.
place :: ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> Event -> Event Source #
round :: Event -> Event Source #
Round event times as described in ScoreTime.round
.
TODO used by Events, do I really need this?
misc
style
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.