lilypond-devel
[Top][All Lists]
Advanced

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

Re: \bookpart and variables


From: Werner LEMBERG
Subject: Re: \bookpart and variables
Date: Mon, 09 Feb 2015 19:40:47 +0100 (CET)

> Here is an example (where I use the Scheme equivalent of
> assignment): [...]

Interesting.  Note that

  foo = \relative c' { c d e f g }
  \bookpart {
    \foo
  }

  foo = \relative c'' { g f e d c }
  \bookpart {
    \foo
  }

fortunately works as expected (this is, different notes in different
\bookparts), while

  #(define notecolor blue)
  \bookpart {
    \score {
      { \override NoteHead.color = #(lambda (grob) notecolor)
        c1
      }
    }
  }

  #(define notecolor red)
  \bookpart {
    \score {
      { \override NoteHead.color = #(lambda (grob) notecolor)
        c1
      }
    }
  }

gives a red notehead both times.  So I think that your comparison is
not completely valid, since lilypond's `variables' are obviously
expanded at a different time than Scheme assignments.

Is this documented somewhere?


    Werner



reply via email to

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