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: Graham King
Subject: Re: How to do simple arithmetic on bar numbers?
Date: Sun, 16 Jan 2011 22:15:38 +0000

Thanks James,
this is not quite what I'm looking for.  If, using snippet 333, I keep
Default_bar_line_engraver in the context of the top staff, it fails to
count a \ibar in the lower part, but if I restore
Default_bar_line_engraver to its normal context of Score, the top part
gets a redundant barline from the lower part.

Still hoping there's a solution somewhere...

-- Graham

On Sun, 2011-01-16 at 21:27 +0000, James Lowe wrote:
> 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 
> 
> 
> 
> >
> 
-- 
Graham King <address@hidden>



reply via email to

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