lilypond-user
[Top][All Lists]
Advanced

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

Re: bookparts


From: David Kastrup
Subject: Re: bookparts
Date: Tue, 06 Mar 2018 14:09:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Jan-Peter Voigt <address@hidden> writes:

[...]

>> Now books and bookparts actually have a \header with associated scopes.
>> Anything wrong with doing assignments in there?
> That might look like this?
> ------------------------------
> \version "2.19.80"
>
> headerVal =
> #(define-scheme-function (name)(symbol?)
>    (let ((alist (ly:module->alist (ly:book-header $current-bookpart))))
>      (assoc-get name alist)
>      ))
>
> \bookpart {
>   \header {
>     thevoice = \relative { a'4 c g f }
>     thelyrics = \lyricmode { la la la la }
>   }
>   <<
>     \new Voice = "heinz" { \headerVal thevoice }
>     \new Lyrics \lyricsto "heinz" { \headerVal thelyrics }
>   >>
> }

I was more thinking of \thevoice and \thelyrics here but indeed no
variants of that work.  Not really sure just what the function of the
"scopes" for books and bookparts as established in lily/parser.yy
actually is.

-- 
David Kastrup



reply via email to

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