lilypond-user-fr
[Top][All Lists]
Advanced

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

Re: Plusieurs \score dans une fonction print-book-with-defaults


From: Gilles Thibault
Subject: Re: Plusieurs \score dans une fonction print-book-with-defaults
Date: Thu, 01 Dec 2022 15:39:40 +0100
User-agent: Webmail Free/1.3.3

Le 2022-12-01 15:31, Gilles Thibault a écrit :
Bonjour.
Je n'ai pas testé, mais je suppose qu'il faut commencer par rajouter
un argument à la fonction si on veut 2 scores


... ou peut-etre tout simplement changer ly:score? par ly:book?
Si j'ai bien compris, la musique ci dessous est un book et non un score même si on omet le \book au début :
{
   \score {
     \relative c' {
       a b c d
       \pageBreak
       a b c d
     }
   }
   \score {
     \relative c' {
       d c b a
     }
}



xBook =
#(define-void-function (key scoreI scoreII) (string? ly:score? ly:score?)

À la fin de xBooK
  $scoreI
  $scoreII ....
mais pas sûr que ça marche comme ça.



\version "2.22.2"

xBook =
#(define-void-function (key score)
   (string? ly:score?)
   (print-book-with-defaults
     #{
     \book {
       \bookOutputSuffix $key
       \paper {
         oddHeaderMarkup = \markup {
           \on-the-fly \first-page {
             \circle \pad-around #2 $key
           }
           \on-the-fly \not-part-first-page {
             \fromproperty #'header:title
             \concat { "[" $key "]"  }
             "- p." \fromproperty #'page:page-number-string
           }
         }
         evenHeaderMarkup = \markup {
           \fromproperty #'header:title
           \concat { "[" $key "]"  }
           "- p." \fromproperty #'page:page-number-string
         }
       }
       $score
     }
     #}))

\header {
  title = "TEST"
}

% FONCTIONNE PARFAITEMENT :

\xBook "Ut" \score {
  \relative c' {
    a b c d
    \pageBreak
    a b c d
  }
}

% CE QUE JE SOUHAITERAIS
% NE FONCTIONNE PAS :

\xBook "Ut" {
  \score {
    \relative c' {
      a b c d
      \pageBreak
      a b c d
    }
  }
  \score {
    \relative c' {
      d c b a
    }
  }
}

--
Gilles



reply via email to

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