Safe Haskell | Safe-Inferred |
---|
Infrastructure for dealing with rulers in a higher level way.
Synopsis
- meter_until :: Meter.AbstractMeter -> TrackTime -> Int -> TrackTime -> Meter.Meter
- copy_marklist :: Ui.M m => Ruler.Name -> Id.RulerId -> Id.RulerId -> m ()
- set_marklist :: Ui.M m => Id.RulerId -> Ruler.Name -> Mark.Marklist -> m ()
- get_meter :: Ui.M m => Id.RulerId -> m Meter.Meter
- set_meter :: Ui.M m => Id.RulerId -> Meter.Meter -> m ()
- meter_take :: TrackTime -> Meter.Meter -> Meter.Meter
- meter_drop :: TrackTime -> Meter.Meter -> Meter.Meter
- extract :: TrackTime -> TrackTime -> [Meter.MSection] -> [Meter.MSection]
- delete :: TrackTime -> TrackTime -> [Meter.MSection] -> [Meter.MSection]
- type ModifyRuler = Ruler.Ruler -> Either Text Ruler.Ruler
- data Scope
- replace :: Ui.M m => Id.BlockId -> ModifyRuler -> m Id.RulerId
- local :: Ui.M m => Scope -> Id.BlockId -> ModifyRuler -> m [Id.RulerId]
- local_meter :: Ui.M m => Scope -> Id.BlockId -> (Meter.Meter -> Meter.Meter) -> m [Id.RulerId]
- local_block :: Ui.M m => Id.BlockId -> ModifyRuler -> m [Id.RulerId]
- local_section :: Ui.M m => Id.BlockId -> TrackNum -> ModifyRuler -> m Id.RulerId
- local_tracks :: Ui.M m => Id.BlockId -> [TrackNum] -> ModifyRuler -> m [Id.RulerId]
- local_ruler :: Ui.M m => Scope -> Id.BlockId -> Id.RulerId -> ModifyRuler -> m Id.RulerId
- rulers_in_scope :: Ui.M m => Scope -> Id.BlockId -> Id.RulerId -> m ([TrackNum], Bool)
- modify_copy :: Ui.M m => Id.BlockId -> Id.RulerId -> ModifyRuler -> m Id.RulerId
- modify :: Ui.M m => Scope -> Id.BlockId -> ModifyRuler -> m ()
- modify_block :: Ui.M m => Id.BlockId -> ModifyRuler -> m ()
- modify_section :: Ui.M m => Id.BlockId -> TrackNum -> ModifyRuler -> m ()
- modify_tracks :: Ui.M m => Id.BlockId -> [TrackNum] -> ModifyRuler -> m ()
- modify_ruler :: Ui.M m => Id.BlockId -> [TrackNum] -> Id.RulerId -> ModifyRuler -> m ()
- section_ruler_id :: Ui.M m => Id.BlockId -> TrackNum -> m Id.RulerId
- get_section :: Ui.M m => Id.BlockId -> TrackNum -> m [(TrackNum, Block.TracklikeId)]
- block_id_to_ruler :: Id.BlockId -> Id.Id
- block_id_to_free_ruler :: Map Id.RulerId a -> Id.BlockId -> Id.Id
- copy :: Ui.M m => Id.Id -> Id.RulerId -> m Id.RulerId
- rulers_of :: Ui.M m => Id.BlockId -> [TrackNum] -> m [Id.RulerId]
- block_tracks :: Ui.M m => Id.BlockId -> m [(TrackNum, Block.TracklikeId)]
generate
meter_until :: Meter.AbstractMeter -> TrackTime -> Int -> TrackTime -> Meter.Meter Source #
Make a ruler of a single meter until the given end time.
by marklist
copy_marklist :: Ui.M m => Ruler.Name -> Id.RulerId -> Id.RulerId -> m () Source #
Copy a marklist from one ruler to another. If it already exists in the destination ruler, it will be replaced.
set_marklist :: Ui.M m => Id.RulerId -> Ruler.Name -> Mark.Marklist -> m () Source #
Replace or add a marklist with the given name.
by Meter
get_meter :: Ui.M m => Id.RulerId -> m Meter.Meter Source #
set_meter :: Ui.M m => Id.RulerId -> Meter.Meter -> m () Source #
meter_take :: TrackTime -> Meter.Meter -> Meter.Meter Source #
meter_drop :: TrackTime -> Meter.Meter -> Meter.Meter Source #
extract :: TrackTime -> TrackTime -> [Meter.MSection] -> [Meter.MSection] Source #
delete :: TrackTime -> TrackTime -> [Meter.MSection] -> [Meter.MSection] Source #
ModifyRuler
type ModifyRuler = Ruler.Ruler -> Either Text Ruler.Ruler Source #
The scope of a ruler modification.
Block | Modify all rulers on the block. |
Section !TrackNum | Modify the |
Tracks ![TrackNum] | Modify the given tracks. |
replace :: Ui.M m => Id.BlockId -> ModifyRuler -> m Id.RulerId Source #
Create or replace a ruler for the given block.
local
local :: Ui.M m => Scope -> Id.BlockId -> ModifyRuler -> m [Id.RulerId] Source #
Modify a ruler or rulers, making copies if they're shared outside of the Scope.
local_meter :: Ui.M m => Scope -> Id.BlockId -> (Meter.Meter -> Meter.Meter) -> m [Id.RulerId] Source #
Like local
, but specialized to modify the meter.
local_block :: Ui.M m => Id.BlockId -> ModifyRuler -> m [Id.RulerId] Source #
:: Ui.M m | |
=> Id.BlockId | |
-> TrackNum | Modify the |
-> ModifyRuler | |
-> m Id.RulerId |
local_tracks :: Ui.M m => Id.BlockId -> [TrackNum] -> ModifyRuler -> m [Id.RulerId] Source #
Modify the given tracks, making copies if they're shared with other tracks.
local_ruler :: Ui.M m => Scope -> Id.BlockId -> Id.RulerId -> ModifyRuler -> m Id.RulerId Source #
Modify the given RulerId, making a copy if it's shared with another block.
:: Ui.M m | |
=> Scope | |
-> Id.BlockId | |
-> Id.RulerId | |
-> m ([TrackNum], Bool) | (tracknums with the RulerId and in the scope, True if there are ones out of scope) |
modify_copy :: Ui.M m => Id.BlockId -> Id.RulerId -> ModifyRuler -> m Id.RulerId Source #
Copy the ruler and modify the copy.
modify
modify :: Ui.M m => Scope -> Id.BlockId -> ModifyRuler -> m () Source #
Modify the ruler on the focused block. Other blocks with the same ruler will also be modified.
modify_block :: Ui.M m => Id.BlockId -> ModifyRuler -> m () Source #
Modify all rulers in the block.
modify_section :: Ui.M m => Id.BlockId -> TrackNum -> ModifyRuler -> m () Source #
Modify all rulers on the block in this section_ruler_id
.
modify_tracks :: Ui.M m => Id.BlockId -> [TrackNum] -> ModifyRuler -> m () Source #
:: Ui.M m | |
=> Id.BlockId | |
-> [TrackNum] | If given, these are the TrackIds that were intended to be modified. This is necessary if you try to modify Ui.no_ruler. |
-> Id.RulerId | |
-> ModifyRuler | |
-> m () |
util
section_ruler_id :: Ui.M m => Id.BlockId -> TrackNum -> m Id.RulerId Source #
The section RulerId is the first ruler of the section. A section is
defined by get_section
, but in a normal block with one ruler track at
tracknum 0, it will be tracknum 0.
get_section :: Ui.M m => Id.BlockId -> TrackNum -> m [(TrackNum, Block.TracklikeId)] Source #
Get the tracks of the section of the given track. A section extends from a ruler track until the next ruler track.
block_id_to_ruler :: Id.BlockId -> Id.Id Source #
Create a block-local RulerId. It gets the exact same name as the block, but is defined as a function so it's clear where this conversion is done.
block_id_to_free_ruler :: Map Id.RulerId a -> Id.BlockId -> Id.Id Source #
copy :: Ui.M m => Id.Id -> Id.RulerId -> m Id.RulerId Source #
rulers_of :: Ui.M m => Id.BlockId -> [TrackNum] -> m [Id.RulerId] Source #
block_tracks :: Ui.M m => Id.BlockId -> m [(TrackNum, Block.TracklikeId)] Source #