lilypond-user
[Top][All Lists]
Advanced

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

Re: Making a \layout definition in Scheme


From: Urs Liska
Subject: Re: Making a \layout definition in Scheme
Date: Wed, 4 Apr 2018 22:54:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0



Am 04.04.2018 um 22:31 schrieb David Kastrup:
Urs Liska <address@hidden> writes:

Am 04.04.2018 um 19:25 schrieb David Kastrup:
Urs Liska <address@hidden> writes:

OK, but now I have a follow-up question which is quite similar to my
other post from today (and I'm afraid the answer is similarly
embarrassing):

I managed to install an editionID to a specific movement's score with
this code:

        (ly:score-add-output-def! score
          #{
            \layout {
              \context {
                \Score
                #(editionID #f movement-path)
              }
            }
          #})

which actually works when I use that "movement-path" variable to
address  in \editionMod later.

However, I would like to be able to also write this without the
permanent switches,
Permanent switches?  Huh?
Well, 'permanent' is of course the wrong word. What I'm (somewhat)
taking issue with is switching languages back and forth within one
expression.
Because?

Only because it's starting to become a somewhat alien element in the main body of the files. So basically a cosmetic issue (which I've dropped in the meantime, as said in my previous post).

i.e. in pure Scheme syntax.
Why?  Seriously.
My project library is getting more and more pure Scheme code, and
while sometimes I wonder if it's worth the effort it usually turns out
to do so, for example because things immediately become easier to
maintain or extend afterwards.
How so?


    (make-kayser-score
     (make-grouped-staves 'GrandStaff
       'clarino-one 'clarino-two 'corno-one 'corno-two)
     'tympano
     (make-grouped-staves 'ChoirStaff 'soprano 'alto 'tenor 'bass)
     (make-grouped-staves 'StaffGroup
       (make-grouped-staves 'GrandStaff 'violin-one 'violin-two 'viola)
       'bc))))

(https://git.openlilylib.org/bfsc/kayser/blob/master/includes/lib/make-score.ily#L57)
is the result of the LilyPond=>Scheme condensation process. It still "features" a hard-coded score structure which is not an issue in the current project but which I want to replace with a parametric and template based infrastructure to produce scores. This code is a much better starting point for this than the original "LilyPond" version in https://git.openlilylib.org/bfsc/kayser/blob/5edb9fb11d1f462c19864614d75d9b9d3665e61b/includes/lib/make-score.ily






reply via email to

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