lilypond-user
[Top][All Lists]
Advanced

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

Re: bis


From: David Nalesnik
Subject: Re: bis
Date: Mon, 25 Jul 2016 07:56:34 -0500

On Mon, Jul 25, 2016 at 6:54 AM,  <address@hidden> wrote:
>
> Thanks a lot, I'll check it out!
>
> Erik
>
>
> ----- Ursprungligt meddelande -----
> Från:
> "Andrew Bernard" <address@hidden>
>
> Till:
> "lilypond-user Mailinglist" <address@hidden>
> Kopia:
>
> Skickat:
> Mon, 25 Jul 2016 19:23:40 +1000
> Ämne:
> Re: bis
>
>
>
> Hi Erik,
>
> This is a use for a text spanner with centred text that I had been
> asking about on the list for some time, Eventually I wrote a function
> to do it with the kind help of Thomas Morley also. Very useful - I
> always said so!
>

This is a good solution, but one drawback is the left and right bounds
of the text spanner aren't set to the column that holds the bar lines,
rather to the NoteColumn objects.  One consequence is that you
wouldn't get automatic alignment with bar lines, if that's what you
want.

Another solution is available on the LSR:
http://lsr.di.unimi.it/LSR/Snippet?id=954.

Add this function:

textedMeasureBracket =
#(define-music-function
  (parser location str mus)
  (markup? ly:music?)
  #{
    \override Staff.MeasureCounter.stencil =
    #(lambda (grob) (test-stencil grob str))
    \startMeasureCount
    #mus
    \stopMeasureCount
  #}
  )

Use it like this:

twice = \markup { \italic "bis" }

{
  \textedMeasureBracket \twice { g'1 g'1 }
}


HTH,
David



reply via email to

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