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

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

Re: alignement opus et piece


From: Gilles
Subject: Re: alignement opus et piece
Date: Mon, 24 Sep 2012 10:11:09 +0200
User-agent: Opera Mail/12.02 (Win64)


Pour ne justement pas toucher le code de David, j'ai laisser la fonction
être appeler par opus
Ouf ! 2 fautes d'accord en 2 verbes. Orthographe = 0/20
Comme ma phrase en plus, ne voulait rien dire, je reformule ...
On peut appeler la fonction que j'ai nommée ici my-hymn via la propriété
opus du \header.
J'en profite pour supprimer du coup, la réference à la propriété piece dans
scoreTitleMarkup

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.16.0"
\paper {
      scoreTitleMarkup = \markup { \column {
        \on-the-fly #print-all-headers { \bookTitleMarkup \hspace #1 }
        \fromproperty #'header:opus
        }
      }
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define-markup-command (my-hymn layout props label arg1 arg2)
      (symbol? markup? markup?)
      (let* ((stencil (interpret-markup layout props arg1))
             (x-ext (ly:stencil-extent stencil X))
             (y-ext (ly:stencil-extent stencil Y))
             (arg1-stencil (ly:make-stencil  ;; David Code
                `(delay-stencil-evaluation
                   ,(delay (ly:stencil-expr
       (let* ((table (ly:output-def-lookup layout 'label-page-table))
              (page-number (if (list? table)
                              (assoc-get label table)
                              #f)))
        (interpret-markup layout props (if (even? page-number)
                  (markup arg1)
                  (markup #:fill-line ("" arg1))))))))
                x-ext
                y-ext))
             (arg2-stencil (interpret-markup layout props
                              (markup #:fill-line (#:tiny arg2)))))
       (ly:stencil-add arg1-stencil arg2-stencil)))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\book {
      \score {
        \new Staff { \label #'a \repeat unfold 100 c'1 }
        \header {
          opus = \markup \my-hymn #'a "hymn-1" "Te Deum"
        }
      }

      \score {
        \new Staff { \label #'b \repeat unfold 100 c'1 }
        \header {
          opus = \markup \my-hymn #'b "hymn-2" "Aria"
        }
      }

      \score {
        \new Staff { \label #'c \repeat unfold 100 c'1 }
        \header {
          opus = \markup \my-hymn #'c "hymn-3" "Messe"
        }
      }

      \score {
        \new Staff { \label #'d c'1 }
        \header {
          opus = \markup \my-hymn #'d "hymn-4" "Solo"
        }
      }

      \score {
        \new Staff { \label #'e \repeat unfold 100 c'1 }
        \header {
          opus = \markup \my-hymn #'e "hymn-5" "Magnificat"
        }
      }

      \score {
        \new Staff { \label #'f c'1 }
        \header {
          opus = \markup \my-hymn #'f "hymn-6" "Agnus"
        }
      }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--
Gilles



reply via email to

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