Jan-Peter Voigt <jp.vo...@gmx.de> 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

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to