Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Cmd.Factor

Contents

Description

Cmds to do with "refactoring". This basically means fancy copy-paste-like operations.

Synopsis

Documentation

split_time Source #

Arguments

:: 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_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 unchanged.

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.

selection_ Source #

Arguments

:: Cmd.M m 
=> 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.

rebase_relative_calls Source #

Arguments

:: Ui.M m 
=> Bool

if true, copy the call, otherwise rename it

-> Id.BlockId 
-> Id.BlockId 
-> m () 

Update relative calls on a block to a new parent.

rebase_call :: Id.BlockId -> Id.BlockId -> Id.Id Source #

Move a relative call from one caller to another.

ns1caller ns2old.sub -> ns1/caller.sub

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.

named block

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.

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.

util