lilypond-user
[Top][All Lists]
Advanced

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

Re: Measure numbers in cadenza


From: Urs Liska
Subject: Re: Measure numbers in cadenza
Date: Mon, 06 May 2013 23:47:02 +0200

Am Montag, den 06.05.2013, 23:18 +0200 schrieb Noeck:
> 
> Am 06.05.2013 15:34, schrieb address@hidden:
> > Hey all,
> > 
> > I'm writing a piece of entirely unmetered music and using \cadenzaOn for 
> > that. I'm manually placing barlines from time to time in order to allow for 
> > line breaks and to help readability.  Is there any way to have the bar 
> > numbers displayed and increment that follow my manual placement of bars?
> > 
> > Cheers,
> > MS
> 
> I am sorry, I have no time to look it up or code it, but I think I have
> read somewhere in the docs how counters can be used. And then what comes
> to my mind is to redefine a custom bar command that increments the
> counter, executes a usual bar command and prints the counter number over
> it (perhaps as a \mark).
> 
> Probably, the question is more like how to do that technically. But as
> no one replied, I thought I can write these thoughts - better than nothing.

I don't have the time to make a suggestion either,
but Joram's idea should be good.

I recently wrote that:

% Initialize first page number
pagenum = #3

% Enter a manual line break (for each pagebreak in the model)
% Increment the pagenum and label the instrument name with it
% (which should only affect the 'real' staff of the example score)
origBreak = #(define-music-function (parser location)
               ()
               (set! pagenum (+ 1 pagenum))
               #{ \break
                  \set Staff.shortInstrumentName = #(number->string
pagenum) #}
               )

This should be quite easy to adapt to barnumbers .
I didn't try this out but it should get you going anyway:

% Initialize bar number
barnum = #1

newBarline = #(define-music-function (parser location)
        ()
        (set! barnum (+ 1 barnum))
        #{ \bar "|" ; (or whatever you want)
         \set Score.currentBarNumber = #number->string barnum) #}
        )

Then you'll want to display all bar numbers.

HTH
Urs

> 
> Cheers,
> Joram
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

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