lilypond-user
[Top][All Lists]
Advanced

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

Re: Special layout for a score : four hands


From: Robin Bannister
Subject: Re: Special layout for a score : four hands
Date: Wed, 1 Jun 2011 17:16:15 +0200

Frederic Dannen wrote:
It works, but as I said, not very elegant.


Would it be more elegant without the blank pages? You could make lily *seem* to count pages twice as fast by doubling what \fromproperty #'page:page-number-string delivers.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define-markup-command (four-hand-page layout props offset) (number?)
 (let* (
   (two-hand (chain-assoc-get 'page:page-number-string props))
   (four-hand (number->string (+ offset (* 2 (string->number two-hand))))))
   (interpret-markup layout props four-hand)))

\paper { % simple example
 oddHeaderMarkup = \markup \fill-line { \four-hand-page #1 } % Primo
 evenHeaderMarkup = ##f
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

And \four-hand-page #0 would give you even numbering for Secondo.

Cheers, Robin



reply via email to

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