lilypond-user
[Top][All Lists]
Advanced

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

Re: Header as argument in score generating function


From: Thomas Morley
Subject: Re: Header as argument in score generating function
Date: Sat, 13 Jan 2018 07:16:17 +0100

2018-01-13 3:30 GMT+01:00 Pierre-Luc Gauthier <address@hidden>:
> Hi there,
>
> Is there a way to pass a \header block as an argument to a scheme function?
>
> I have not found the correct predicate for it and get the following error :
> Expecting music, found #<module 7f2e875c7cc0>
>
> I did read and tried stuff based on :
> http://lilypond.org/doc/v2.19/Documentation/notation/predefined-type-predicates.en.html
>
> 'P.S. is my MWE.
>
> Thanks for any pointers
> --
> Pierre-Luc Gauthier
>
> %%%%%%%%%%%%%%%%%
> \version "2.21.0"
>
> headerA = \header {piece = "header A"}
> headerB = \header {piece = "header B"}
>
> scoreFunc = #
> (define-scheme-function
>  (header content) (ly:music? ly:music?)

As the error-message states, don't ask for ly:muisc? but for module?

Cheers,
  Harm

>  #{
>    \score {
>      $content
>      \layout {}
>      $header
>    }
>  #})
>
> \book {
>   \bookOutputSuffix "headeredBook"
>   \scoreFunc \headerA {c'4 d' e' f'}
>   \scoreFunc \headerB {c''4 b' a' g'}
> }
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>



reply via email to

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