Safe Haskell | Safe-Inferred |
---|
Ui.Track
Contents
Description
The Track
type and supporting functions.
Synopsis
- data Track = Track {}
- track :: Text -> Events.Events -> Track
- empty :: Track
- modify_events :: (Events.Events -> Events.Events) -> Track -> Track
- set_events :: Events.Events -> Track -> Track
- type SetStyle = (TrackBg, Event.EventStyle)
- data SetStyleHigh = SetStyleHigh {
- _track_bg :: TrackBg
- _set_event_style :: forall a. Id.Namespace -> Map Id.BlockId a -> Id.BlockId -> Bool -> Event.EventStyle
- type TrackBg = Track -> Color.Color
- data RenderConfig = RenderConfig {}
- no_render :: RenderConfig
- line_render :: RenderConfig
- data RenderStyle
- = NoRender
- | Line !(Maybe RenderSource)
- | Filled !(Maybe RenderSource)
- data RenderSource
- set_render_style :: RenderStyle -> Track -> Track
- type TrackSignals = Map (Id.BlockId, Id.TrackId) TrackSignal
- data TrackSignal = TrackSignal {
- ts_signal :: !Signal.Display
- ts_shift :: !ScoreTime
- ts_stretch :: !ScoreTime
- empty_track_signal :: TrackSignal
- signal_at :: ScoreTime -> TrackSignal -> Signal.Y
- data WaveformChunk = WaveformChunk {}
track
An event track, which contains some configuration, and the actual events that make up the score.
Constructors
Track | |
Fields
|
modify_events :: (Events.Events -> Events.Events) -> Track -> Track Source #
set_events :: Events.Events -> Track -> Track Source #
type SetStyle = (TrackBg, Event.EventStyle) Source #
data SetStyleHigh Source #
High level SetStyle
, with information provided automatically.
It's a bit awkward to have two SetStyles, but some information can only be supplied by Ui.Sync.
Constructors
SetStyleHigh | |
Fields
|
type TrackBg = Track -> Color.Color Source #
track signal
data RenderConfig Source #
Whether to draw a Signal.Display
on this track, and if so, how.
Constructors
RenderConfig | |
Fields |
Instances
Show RenderConfig Source # | |
Defined in Ui.Track Methods showsPrec :: Int -> RenderConfig -> ShowS # show :: RenderConfig -> String # showList :: [RenderConfig] -> ShowS # | |
CStorable RenderConfig Source # | |
Defined in Ui.TrackC Methods sizeOf :: RenderConfig -> Int # alignment :: RenderConfig -> Int # peekElemOff :: Ptr RenderConfig -> Int -> IO RenderConfig # pokeElemOff :: Ptr RenderConfig -> Int -> RenderConfig -> IO () # peekByteOff :: Ptr b -> Int -> IO RenderConfig # pokeByteOff :: Ptr b -> Int -> RenderConfig -> IO () # peek :: Ptr RenderConfig -> IO RenderConfig # poke :: Ptr RenderConfig -> RenderConfig -> IO () # | |
Eq RenderConfig Source # | |
Defined in Ui.Track | |
Pretty.Pretty RenderConfig Source # | |
Defined in Ui.Track Methods pretty :: RenderConfig -> Text Source # format :: RenderConfig -> Doc Source # formatList :: [RenderConfig] -> Doc Source # | |
Serialize RenderConfig Source # | |
Defined in Cmd.Serialize |
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.
Constructors
NoRender | |
Line !(Maybe RenderSource) | |
Filled !(Maybe RenderSource) |
Instances
Show RenderStyle Source # | |
Defined in Ui.Track Methods showsPrec :: Int -> RenderStyle -> ShowS # show :: RenderStyle -> String # showList :: [RenderStyle] -> ShowS # | |
Eq RenderStyle Source # | |
Defined in Ui.Track | |
Pretty.Pretty RenderStyle Source # | |
Defined in Ui.Track Methods pretty :: RenderStyle -> Text Source # format :: RenderStyle -> Doc Source # formatList :: [RenderStyle] -> Doc Source # | |
Serialize RenderStyle Source # | |
Defined in Cmd.Serialize |
data RenderSource Source #
Constructors
Control ScoreT.Control | |
Pitch ScoreT.PControl |
Instances
Show RenderSource Source # | |
Defined in Ui.Track Methods showsPrec :: Int -> RenderSource -> ShowS # show :: RenderSource -> String # showList :: [RenderSource] -> ShowS # | |
Eq RenderSource Source # | |
Defined in Ui.Track | |
Pretty.Pretty RenderSource Source # | |
Defined in Ui.Track Methods pretty :: RenderSource -> Text Source # format :: RenderSource -> Doc Source # formatList :: [RenderSource] -> Doc Source # | |
Serialize RenderSource Source # | |
Defined in Cmd.Serialize |
set_render_style :: RenderStyle -> Track -> Track Source #
type TrackSignals = Map (Id.BlockId, Id.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.
Constructors
TrackSignal | |
Fields
|
Instances
Show TrackSignal Source # | |
Defined in Ui.Track Methods showsPrec :: Int -> TrackSignal -> ShowS # show :: TrackSignal -> String # showList :: [TrackSignal] -> ShowS # | |
CStorable TrackSignal Source # | |
Defined in Ui.TrackC Methods sizeOf :: TrackSignal -> Int # alignment :: TrackSignal -> Int # peekElemOff :: Ptr TrackSignal -> Int -> IO TrackSignal # pokeElemOff :: Ptr TrackSignal -> Int -> TrackSignal -> IO () # peekByteOff :: Ptr b -> Int -> IO TrackSignal # pokeByteOff :: Ptr b -> Int -> TrackSignal -> IO () # peek :: Ptr TrackSignal -> IO TrackSignal # poke :: Ptr TrackSignal -> TrackSignal -> IO () # | |
DeepSeq.NFData TrackSignal Source # | |
Defined in Ui.Track Methods rnf :: TrackSignal -> () # | |
Eq TrackSignal Source # | |
Defined in Ui.Track | |
Pretty.Pretty TrackSignal Source # | |
Defined in Ui.Track Methods pretty :: TrackSignal -> Text Source # format :: TrackSignal -> Doc Source # formatList :: [TrackSignal] -> Doc Source # |
waveform
data WaveformChunk Source #
Draw one chunk of waveform on the track. Corresponds to PeakCache::Params.
Constructors
WaveformChunk | |
Instances
Show WaveformChunk Source # | |
Defined in Ui.Track Methods showsPrec :: Int -> WaveformChunk -> ShowS # show :: WaveformChunk -> String # showList :: [WaveformChunk] -> ShowS # | |
Pretty.Pretty WaveformChunk Source # | |
Defined in Ui.Track Methods pretty :: WaveformChunk -> Text Source # format :: WaveformChunk -> Doc Source # formatList :: [WaveformChunk] -> Doc Source # |