lilypond-user
[Top][All Lists]
Advanced

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

Re: How to do simple arithmetic on bar numbers?


From: James Lowe
Subject: Re: How to do simple arithmetic on bar numbers?
Date: Sun, 16 Jan 2011 21:27:37 +0000
User-agent: Microsoft-MacOutlook/14.0.0.100825

Hello,

-----Original Message-----
From: Graham King <address@hidden>
Date: Sun, 16 Jan 2011 21:11:25 +0000
To: "address@hidden" <address@hidden>
Subject: How to do simple arithmetic on bar numbers?

>I'm preparing a modern-notation edition of a piece of choral renaissance
>polyphony, in which the maxima at the end of each section is notated as
>a neomensural "\maxima*n/m" (where, for each part, n,m are chosen to
>cause all the parts to end the section together).
>
>Example lilypond code and the result are attached.
>
>Bar-numbering is attached to the top part in the score so, when that
>part's maxima starts early and other parts are still moving, the other
>parts sometimes have "extra" bars of music.  As a result, I have to
>reset the bar numbering manually afterwards (see line 27 of the example
>attached):
>
>       \set Staff.currentBarNumber = #4
>
>Rather than specifying a static bar number, how could the following
>pseudocode be programmed?
>
>       \set Staff.currentBarNumber = Staff.currentBarNumber + x
>
>where, in this example, x = 1
>
>As you can tell, I'm not a Scheme programmer!  Thanks for any help you
>can offer.
>-


I'm not a scheme programmer either but we do have a snippet

http://lsr.dsi.unimi.it/LSR/Snippet?id=333

That might give you some clues.

I am also guessing that you could use a similar method that we document
for 'Upbeats' (see Notation Reference) where we can use

\set Timing.measurePosition blahblahblah (instead of \partial X)

to denote a position in a single measure but for your specific case use

\set Timing.internalBarNumber or \set Timing.currentlBarNumber somehow.

Look in the Internal reference for Timing_translator.

I'm throwing these ideas out so that if you cannot figure something out,
someone else more knowledgeable that I in the internals might.

James





internalBarNumber 



>




reply via email to

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