6

I have LilyPond lead sheets for which I would like to be able to choose some display tweaks at compile time, primarily in order to tailor the sheet for the preferred transposition (e.g. for B-flat instruments) and clef of the musician to whom I'm handing it.

I believe style sheets and \include will give me a good way of handling this, but I would like a way to specify the name of the style sheet I'd like to select right from the lilypond command line invocation. What would be the best way to do this? Alternatively, is there another, better way to accomplish the goal?

7

Please read the magnificent documentation at lilypond.org specifically: http://lilypond.org/doc/v2.17/Documentation/usage/command_002dline-usage

music.ly:

#(use-modules (guile-user))
#(format #t "Using style sheet: ~a\n" style-sheet)
\include #style-sheet
\relative { c' d e }

style-default.ily: % style defs

Then run,

lilypond -e '(define-public style-sheet "style-default.ily")' music.ly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.