lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nesting paper blocks


From: Timothy Lanfear
Subject: Re: Nesting paper blocks
Date: Fri, 20 Mar 2020 22:03:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 20/03/2020 16:17, Peter Crighton wrote:
Sounds like a good approach. I was meaning to brush up on my Python anyway.

    > With categories being different types of scores I want to do for
    the same
    > song (namely music sheets with all the music, including notes,
    chords and
    > lyrics; chord sheets with only chord symbols; and lyric sheets
    with just
    > lyrics and chords).

    As you're now running LP with a script, your script(s) could
    automatically build several paper.ly <http://paper.ly> files in
    turn, and rerun
    LP to produce different formats.

    You can extend this in any way you like, dealing with other parts
    of the LP source that might need to be altered. For example, I have
    a script that typesets psalms, and it modifies the source files of
    the Anglican chants (which always contain a   \transpose f f   line),
    transposing them into mutually compatible keys before compiling them
    into a document for that particular church service.


I haven’t run LilyPond with scripts before. If there’s any documentation or code examples I should look at, I’d appreciate being pointed in the right direction.

    IOW, use a scripting language to script, and LP to typeset music.


Sound advice.

On the other hand, does an approach like this help?

\version "2.20.0"

basicdistance = #(define-scheme-function (n) (integer?)
  #{ \paper { system-system-spacing.basic-distance = #n } #})

linewidth = #(define-scheme-function (n) (integer?)
  #{ \paper { line-width = #(ly:cm n) } #})

\paper {
  indent = 0
}

\linewidth 10
\basicdistance 30
\new Staff {
  \relative c' {
    c1 \break
    c1
  }
}



--
Timothy Lanfear, Bristol, UK.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]