[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: measure numbers with letters
From: |
Paul Scott |
Subject: |
Re: measure numbers with letters |
Date: |
Sat, 22 Jul 2017 21:49:19 -0700 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
On Sat, Jul 22, 2017 at 05:25:30PM -0700, madMuze wrote:
> Simon Albrecht-2 wrote
> > {
> > c'1 \break
> > \once\override Score.BarNumber.text = "1A"
> > c'
> > }
> > does not work
>
> In 2.18, I use
>
> barNrSffx = #(define-music-function (parser location sffx lastNr) (string?
> number?)
> #{
> \override Score.BarNumber.before-line-breaking = #(lambda (grob)
> (let*
> ( (barNrTxt (caadr (ly:grob-property grob 'text)))
> (barNr (string->number barNrTxt))
> (barNrStr (string-append barNrTxt sffx)) )
> (ly:grob-set-property! grob 'text (if (or (<= barNr lastNr)
> (= lastNr 0) )
> barNrStr
> barNrTxt )) ) )
> #}
> )
>
> in use::
> % music for mm1-16, for instance, then
> \set Score.currentBarNumber = 1
> \barNrSffx "bis" 16 % mm1-16 again with ornaments; bar number will read
> "2bis", &c.
> % m17 follows and will be numbered "17" (with no suffix)
>
> Perhaps this gives you a start. I think the tricky part is using "caadr" to
> find the current BarNumber.text so it can be reused. I'm sure many people
> with better knowledge and skills can improve upon this...
Thank you!
This at least gives me code that works for my purpose!
For me it would seem that your 2nd argument/parameter wouldn't be necessary
since I always want to modify the text of the previous bar number.
Thank you again,
Paul
- measure numbers with letters, Paul Scott, 2017/07/22
- Re: measure numbers with letters, Noeck, 2017/07/22
- Re: measure numbers with letters, Simon Albrecht, 2017/07/22
- Re: measure numbers with letters, madMuze, 2017/07/22
- Re: measure numbers with letters,
Paul Scott <=
- Re: measure numbers with letters, Thomas Morley, 2017/07/23
- Re: measure numbers with letters, Paul Scott, 2017/07/23
- Re: measure numbers with letters, Paul Scott, 2017/07/23
- Re: measure numbers with letters, Thomas Morley, 2017/07/23
- Re: measure numbers with letters, Paul Scott, 2017/07/23
- Re: measure numbers with letters, Paul Scott, 2017/07/23