Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Cmd.Repl.LLily

Description

Lilypond compiles are always kicked off manually.

I used to have some support for automatically reinvoking lilypond after changes to a block, but it didn't seem too useful, since any useful amount of lilypond score takes quite a while to compile.

Set 1t to equal one quarter note, quantize to 16th notes. Configure "inst" with short and long names, then change them.

LLily.set_quarter_duration 1
LLily.set_quantize Lilypond.D16
LLily.modify_config =<< LLily.set_staves [("inst", "long", "short")]
LLily.modify_staff "inst" $ Lilypond.short #= "a" . Lilypond.long #= "b"
Synopsis

config

modify_config :: Ui.M m => (Config -> Config) -> m () Source #

with_config :: Cmd.M m => Config -> m a -> m a Source #

set_code :: Ui.M m => Util.Instrument -> [Text] -> m () Source #

set_staves :: Ui.M m => [(Text, Instrument, Instrument)] -> m (Config -> Config) Source #

Set staff config, [(instrument, long_name, short_name)]. The order determines the order of the staves on the page.

If there is no staff config, all instruments get staves. Otherwise, only instruments with StaffConfigs and staff_display are displayed.

compile

blocks :: Title -> [(Title, Id.BlockId)] -> Cmd.CmdL Text Source #

Compile multiple blocks, with an explicit movement structure.

block :: Id.BlockId -> Cmd.CmdL Text Source #

Compile the given block as lilypond. If there are movements, they are extracted from the events.

block_inst :: Maybe Text -> Util.Instrument -> Id.BlockId -> Cmd.CmdT IO Text Source #

Compile the given block, but only with a single instrument.

current :: Cmd.CmdL Text Source #

Compile the current block.

view_block :: Id.BlockId -> Cmd.CmdL () Source #

Show the output of the lilypond for the given block.

from events

compile_ly

compile_explicit :: Title -> [Movement] -> Cmd.CmdL Text Source #

Run lilypond with explicit movements.

compile_extract :: Title -> [Score.Event] -> Cmd.CmdT IO Text Source #

Extract movements from the events and run lilypond. Return any error.

debugging

block_ly :: Cmd.M m => Id.BlockId -> m Lazy.Text Source #

Convert the block to lilypond score.

convert :: Cmd.M m => Id.BlockId -> m [Event] Source #

Derive the block to ly events.

LPerf

derive :: Cmd.M m => Id.BlockId -> m [LEvent.LEvent Score.Event] Source #

Run a lilypond derive and return score events.

sel_events :: Cmd.M m => m [LEvent.LEvent Score.Event] Source #

Like LPerf.sel_events, but use the lilypond derive.

root_sel_events :: Cmd.M m => m [LEvent.LEvent Score.Event] Source #

Like sel_events but take the root derivation.

get_sel Source #

Arguments

:: Cmd.M m 
=> Bool

from root

-> (Id.BlockId -> m [LEvent.LEvent Score.Event]) 
-> m [LEvent.LEvent Score.Event]