2018-01-13 3:30 GMT+01:00 Pierre-Luc Gauthier <p.luc.gauth...@gmail.com>:
> 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
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

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

Reply via email to