Safe Haskell | Safe-Inferred |
---|
Synopsis
- data Ruler = Ruler {}
- type Marklists = Map Name (Maybe Meter.Meter, Mark.Marklist)
- type Name = Text
- meter_ruler :: Meter.Meter -> Ruler
- meter_name :: Name
- empty :: Ruler
- get_meter :: Ruler -> Meter.Meter
- lookup_meter :: Ruler -> Maybe Meter.Meter
- set_meter :: Meter.Meter -> Ruler -> Ruler
- modify_meter :: (Meter.Meter -> Meter.Meter) -> Ruler -> Ruler
- lookup_marklist :: Name -> Ruler -> Maybe Mark.Marklist
- get_marklist :: Name -> Ruler -> Mark.Marklist
- set_marklist :: Name -> Mark.Marklist -> Ruler -> Ruler
- remove_marklist :: Name -> Ruler -> Ruler
- modify_marklist :: Name -> (Mark.Marklist -> Mark.Marklist) -> Ruler -> Ruler
- modify_marklists :: (Map Name (Maybe Meter.Meter, Mark.Marklist) -> Map Name (Maybe Meter.Meter, Mark.Marklist)) -> Ruler -> Ruler
- time_end :: Ruler -> ScoreTime
- bounds_name :: Name
- set_bounds :: Maybe ScoreTime -> Maybe ScoreTime -> Ruler -> Ruler
- get_bounds :: Ruler -> (Maybe ScoreTime, Maybe ScoreTime)
- bounds_of :: Ruler -> (ScoreTime, Maybe ScoreTime)
Ruler
A Ruler contains all the data to display a ruler.
Ruler | |
|
Instances
Show Ruler Source # | |
CStorable Ruler Source # | |
DeepSeq.NFData Ruler Source # | |
Eq Ruler Source # | |
Pretty.Pretty Ruler Source # | |
Serialize Ruler Source # | |
type Marklists = Map Name (Maybe Meter.Meter, Mark.Marklist) Source #
Each ruler can have multiple named marklists. This means a ruler can have multiple simultaneous meters, or a separate list of ad-hoc cue points. All marks are flattened before display, and are drawn in the sort order of their Names.
However, multiple meters are liable to be cluttered, and multiple cue lists also seem gratuitous.
meter_ruler :: Meter.Meter -> Ruler Source #
Create a ruler with just a meter
marklist.
meter_name :: Name Source #
The meter marklist by convention has marks corresponding to the meter of the piece. Other commands may use this to find out where beats are.
get_meter :: Ruler -> Meter.Meter Source #
lookup_meter :: Ruler -> Maybe Meter.Meter Source #
modify_meter :: (Meter.Meter -> Meter.Meter) -> Ruler -> Ruler Source #
lookup_marklist :: Name -> Ruler -> Maybe Mark.Marklist Source #
get_marklist :: Name -> Ruler -> Mark.Marklist Source #
set_marklist :: Name -> Mark.Marklist -> Ruler -> Ruler Source #
modify_marklist :: Name -> (Mark.Marklist -> Mark.Marklist) -> Ruler -> Ruler Source #
If the marklist isn't set, modify will be given an empty one.
modify_marklists :: (Map Name (Maybe Meter.Meter, Mark.Marklist) -> Map Name (Maybe Meter.Meter, Mark.Marklist)) -> Ruler -> Ruler Source #
bounds
bounds_name :: Name Source #
Marks on this marklist given the logical block bounds. If there is one
mark, it denotes the logical block end. Two morks mean the first one is the
logical block start. The mark text doesn't matter, but s
and e
are
customary.
bounds_of :: Ruler -> (ScoreTime, Maybe ScoreTime) Source #
Get block bounds as defined by the ruler. This uses explicit
bounds_name
if there are any, otherwise it uses the meter
. Otherwise,
the start time can default to 0, but the end time defaults to Nothing so the
caller can use the end of the last event.