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

Safe HaskellNone

Cmd.Repl.LLily

Contents

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.modify_config $ LLily.make_config 1 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_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.CmdL Text Source #

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

debugging

derive :: Id.BlockId -> Cmd.CmdL [LEvent.LEvent Score.Event] Source #

Run a lilypond derive and return score events.

make_ly :: Cmd.CmdL (Either Text Lazy.Text, [Log.Msg]) Source #

Convert current block to lilypond score.

convert :: Cmd.CmdL ([Event], [Log.Msg]) Source #

Derive focused block to ly events.