lilypond-user
[Top][All Lists]
Advanced

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

Re: Resetting beat count


From: Aaron Hill
Subject: Re: Resetting beat count
Date: Sun, 08 Mar 2020 03:30:55 -0700
User-agent: Roundcube Webmail/1.4.2

On 2020-03-08 3:18 am, Pablo Cordal wrote:
Thank you very much Aaron, but I get and error, I attach print, could it be
because I have an older version?

Yes, I tend to assume folks are on the latest build, which is obviously not always correct.

Try:

%%%%
\version "2.18.2"

forceBar = #(define-music-function
  (parser location bar) (string?)
  (define (advanceToNextMeasure context)
    (let ((timing (ly:context-find context 'Timing))
          (score (ly:context-find context 'Score)))
      (ly:context-set-property! timing 'measurePosition
        (ly:make-moment 0))
      (ly:context-set-property! score 'currentBarNumber
        (1+ (ly:context-property score 'currentBarNumber)))))
  #{ \applyContext #advanceToNextMeasure \bar #bar #})

{
  \override Score.BarNumber.break-visibility = #all-visible

  \repeat unfold 5 b'4 \forceBar "|."
  \repeat unfold 7 b'4 \forceBar "|."
  \repeat unfold 3 b'4 \forceBar "|."
  \repeat unfold 6 b'4 \forceBar "|."
}
%%%%

The main changes:

- 2.18.2 requires that the parser and location arguments are explicitly defined. - 2.18.2 does not support bare durations, so I just used \repeat unfold instead.


-- Aaron Hill



reply via email to

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