Safe Haskell | Safe-Inferred |
---|
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.
Track | |
|
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.
SetStyleHigh | |
|
type TrackBg = Track -> Color.Color Source #
track signal
data RenderConfig Source #
Whether to draw a Signal.Display
on this track, and if so, how.
Instances
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.
Instances
Show RenderStyle Source # | |
Defined in Ui.Track showsPrec :: Int -> RenderStyle -> ShowS # show :: RenderStyle -> String # showList :: [RenderStyle] -> ShowS # | |
Eq RenderStyle Source # | |
Defined in Ui.Track (==) :: RenderStyle -> RenderStyle -> Bool # (/=) :: RenderStyle -> RenderStyle -> Bool # | |
Pretty.Pretty RenderStyle Source # | |
Defined in Ui.Track pretty :: RenderStyle -> Text Source # format :: RenderStyle -> Doc Source # formatList :: [RenderStyle] -> Doc Source # | |
Serialize RenderStyle Source # | |
Defined in Cmd.Serialize put :: Putter RenderStyle Source # get :: Get RenderStyle Source # |
data RenderSource Source #
Instances
Show RenderSource Source # | |
Defined in Ui.Track showsPrec :: Int -> RenderSource -> ShowS # show :: RenderSource -> String # showList :: [RenderSource] -> ShowS # | |
Eq RenderSource Source # | |
Defined in Ui.Track (==) :: RenderSource -> RenderSource -> Bool # (/=) :: RenderSource -> RenderSource -> Bool # | |
Pretty.Pretty RenderSource Source # | |
Defined in Ui.Track pretty :: RenderSource -> Text Source # format :: RenderSource -> Doc Source # formatList :: [RenderSource] -> Doc Source # | |
Serialize RenderSource Source # | |
Defined in Cmd.Serialize put :: Putter RenderSource Source # get :: Get RenderSource Source # |
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.
TrackSignal | |
|
Instances
Show TrackSignal Source # | |
Defined in Ui.Track showsPrec :: Int -> TrackSignal -> ShowS # show :: TrackSignal -> String # showList :: [TrackSignal] -> ShowS # | |
CStorable TrackSignal Source # | |
Defined in Ui.TrackC 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 rnf :: TrackSignal -> () # | |
Eq TrackSignal Source # | |
Defined in Ui.Track (==) :: TrackSignal -> TrackSignal -> Bool # (/=) :: TrackSignal -> TrackSignal -> Bool # | |
Pretty.Pretty TrackSignal Source # | |
Defined in Ui.Track 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.
Instances
Show WaveformChunk Source # | |
Defined in Ui.Track showsPrec :: Int -> WaveformChunk -> ShowS # show :: WaveformChunk -> String # showList :: [WaveformChunk] -> ShowS # | |
Pretty.Pretty WaveformChunk Source # | |
Defined in Ui.Track pretty :: WaveformChunk -> Text Source # format :: WaveformChunk -> Doc Source # formatList :: [WaveformChunk] -> Doc Source # |