Safe Haskell | Safe-Inferred |
---|
Cmds to do with "refactoring". This basically means fancy copy-paste-like operations.
Synopsis
- split_time :: Cmd.M m => m Id.BlockId
- split_time_at :: Ui.M m => Id.BlockId -> ScoreTime -> Id.Id -> m Id.BlockId
- split_names :: Id.BlockId -> (Id.Id, Id.Id)
- split_track :: Cmd.M m => m Id.BlockId
- split_track_at :: Ui.M m => Id.BlockId -> TrackNum -> Id.Id -> m Id.BlockId
- selection :: Cmd.M m => Id.Id -> m Id.BlockId
- selection_relative :: Cmd.M m => Id.Id -> m Id.BlockId
- relative_selection :: Cmd.M m => Id.Id -> m Id.BlockId
- selection_alts :: Cmd.M m => Bool -> Int -> Id.Id -> m [Id.BlockId]
- selection_ :: Cmd.M m => Bool -> Bool -> Id.Id -> m Id.BlockId
- make_relative :: Id.BlockId -> Id.Id -> Id.Id
- extract :: Ui.M m => Id.Id -> Id.BlockId -> [TrackNum] -> [Id.TrackId] -> Events.Range -> m Id.BlockId
- replace_with_call :: Ui.M m => Id.BlockId -> [Id.TrackId] -> Events.Range -> Id.BlockId -> Bool -> m ()
- rebase_ids :: Ui.M m => Id.BlockId -> Id.BlockId -> m ()
- rebase_id :: Id.BlockId -> Id.BlockId -> Id.BlockId -> Maybe Id.Id
- block_from_template :: Cmd.M m => m ()
- delete_empty_tracks :: Ui.M m => Id.BlockId -> m ()
- block_template_from_selection :: Cmd.M m => m Id.BlockId
- block_template :: Ui.M m => Id.BlockId -> [Id.TrackId] -> Events.Range -> m Id.BlockId
- clipped_skeleton :: Ui.M m => Id.BlockId -> Id.BlockId -> [TrackNum] -> m ()
- order_block :: Cmd.M m => Id.Id -> [Id.BlockId] -> m Id.BlockId
- order_track :: Ui.M m => Id.BlockId -> [Id.BlockId] -> m Id.TrackId
- block_id_to_call :: Id.BlockId -> Text
- local_sections :: Ui.M m => Id.BlockId -> ([Meter.MSection] -> [Meter.MSection]) -> m ()
- local_block :: Ui.M m => Id.BlockId -> (Meter.Meter -> Meter.Meter) -> m ()
Documentation
:: Cmd.M m | |
=> m Id.BlockId | BlockId of new block |
Split the block at the time of the current selection, and create a new
block and view with everything afterwards. The old and new blocks are
renamed with -1
and -2
suffixes, respectively. The old block is renamed
for symmetry with the new one, but mostly because it's changed duration, so
previous calls are probably no longer valid.
split_time_at :: Ui.M m => Id.BlockId -> ScoreTime -> Id.Id -> m Id.BlockId Source #
Create a new block from template, then copy over all the events below the given time. Clear the source track, and trim events that overlap the split point. Modify the ruler (locally!) in the old and new blocks.
split_names :: Id.BlockId -> (Id.Id, Id.Id) Source #
split_track :: Cmd.M m => m Id.BlockId Source #
Put all tracks with a after the selection into a new block.
Unlike split_time
I don't rename the source block, because the length
is unchanged.
split_track_at :: Ui.M m => Id.BlockId -> TrackNum -> Id.Id -> m Id.BlockId Source #
selection :: Cmd.M m => Id.Id -> m Id.BlockId Source #
Copy the selection into a new block, and replace it with a call to that block.
selection_relative :: Cmd.M m => Id.Id -> m Id.BlockId Source #
Copy the selection to a relative block, and replace it with a relative block call.
relative_selection :: Cmd.M m => Id.Id -> m Id.BlockId Source #
Same as selection_relative
because I always type the wrong one.
selection_alts :: Cmd.M m => Bool -> Int -> Id.Id -> m [Id.BlockId] Source #
Create a number of alternate versions of the selection, and insert
an alt
call.
:: Cmd.M m | |
=> Bool | replace the copied events with a call to the new block |
-> Bool | create relative block call |
-> Id.Id | |
-> m Id.BlockId |
Copy the selection into a new block, and replace it with a call to that block.
make_relative :: Id.BlockId -> Id.Id -> Id.Id Source #
extract :: Ui.M m => Id.Id -> Id.BlockId -> [TrackNum] -> [Id.TrackId] -> Events.Range -> m Id.BlockId Source #
Copy the ranges to a new block with the given Id.
replace_with_call :: Ui.M m => Id.BlockId -> [Id.TrackId] -> Events.Range -> Id.BlockId -> Bool -> m () Source #
Clear selected range and put in a call to the new block.
relative calls
rebase_ids :: Ui.M m => Id.BlockId -> Id.BlockId -> m () Source #
Rename all blocks with the old parent as a prefix. Unlike
rebase_relative_calls
, this doesn't modify any events.
rebase_id :: Id.BlockId -> Id.BlockId -> Id.BlockId -> Maybe Id.Id Source #
Move a relative callee from one parent to another, or Nothing if it's not a child of that parent.
block_from_template :: Cmd.M m => m () Source #
If there's a point selection, create a new empty block based on the current one. If the selection has time, then the new block will have only the selected tracks with a ruler clipped to the selected range.
delete_empty_tracks :: Ui.M m => Id.BlockId -> m () Source #
named block
block_template_from_selection :: Cmd.M m => m Id.BlockId Source #
block_template :: Ui.M m => Id.BlockId -> [Id.TrackId] -> Events.Range -> m Id.BlockId Source #
Create a new block with the given tracks and ruler clipped to the given range.
clipped_skeleton :: Ui.M m => Id.BlockId -> Id.BlockId -> [TrackNum] -> m () Source #
order block
order_block :: Cmd.M m => Id.Id -> [Id.BlockId] -> m Id.BlockId Source #
Create a new block containing calls to the given BlockIds.
order_track :: Ui.M m => Id.BlockId -> [Id.BlockId] -> m Id.TrackId Source #
Append a track to the given block with calls to the given BlockIds. The calling track will have a 1:1 time relationship with the calls, which is useful for lilypond derivation since it only understands 1:1. Also modify the ruler to be the concatenation of the rulers of the sub-blocks.
block_id_to_call :: Id.BlockId -> Text Source #
util
local_sections :: Ui.M m => Id.BlockId -> ([Meter.MSection] -> [Meter.MSection]) -> m () Source #
local_block :: Ui.M m => Id.BlockId -> (Meter.Meter -> Meter.Meter) -> m () Source #