Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred



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"


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.


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


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.


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 #


:: Cmd.M m 
=> Bool

from root

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