1

We have noticed that when a part starts with a partial measure, LilyPond will consider the first measure to be the following one. Is there an easy way to tell LilyPond to start counting from the partial measure?

Adding ss to complete the measure is not good enough because they take up space. We found that adding \set Score.currentBarNumber = #2 at the start will get the bar numbers how we want, but this looks counterintuitive (because who starts counting on 2, right?). Is there an easier way to do this?

In case you are wondering, we are working on: https://github.com/eantoranz/bwv/blob/main/BWV%201004%20Violin%20Partita%20II%20D%20minor/5-ciaccona.ly

4
  • Take a look at the Measure_counter_engraver object
    – Aaron
    Dec 18, 2021 at 18:49
  • Can you elaborate why you want to have the incomplete measure counted, against normal practice? Is this customary for the Ciacona? Dec 18, 2021 at 21:17
  • Quite frankly, I do not care that much in this branch (Bach was not adding numbers to the measures).... however, if I were putting up editions of the chaconne (other than the manuscript), some start counting on the partial.... then I would like to match them on the numbering.
    – eftshift0
    Dec 18, 2021 at 21:34
  • I don't understand your problem with using \set Score.currentBarNumber = #2. It might be counterintuitive, but it is certainly easy. Dec 18, 2021 at 23:33

2 Answers 2

3

I suppose adding a quarter note rest on 1 would be more readable. Anyway, instead of using \partial 2 you can also directly change the measure length by doing

\set Timing.measureLength = #(ly:make-moment 1/2)

before the music and

\unset Timing.measureLength

after the partial measure.

3

Problem: wrong bar numbers when using partial such as in

\partial 2
\firstMeasure
\remainingMeasures

Fix 1: partial with current bar number = 2

\partial 2
\set Score.currentBarNumber = #2
\firstMeasure
\remainingMeasures

Fix 2: start with rest

s4
\firstMeasure
\remainingMeasures

Fix 3: start with rest, tweak width

\newSpacingSection
\override Score.SpacingSpanner.spacing-increment = #6.5
\override Score.SpacingSpanner.shortest-duration-space = #1
s4
\newSpacingSection
\revert Score.SpacingSpanner.spacing-increment
\revert Score.SpacingSpanner.shortest-duration-space
\firstMeasure
\remainingMeasures

Fix 4: set first measure length to 2/4 (thanks to Lazy)

\set Timing.measureLength = #(ly:make-moment 1/2)
\firstMeasure
\unset Timing.measureLength
\override Staff.TimeSignature #'stencil = ##f
\time 3/4
\remainingMeasures

source code : wrong bar numbering after partial demo

demo results

3
  • 1
    What does the symbol "∅" represent here? Dec 19, 2021 at 3:31
  • in the first 2 examples, \partial is used, in the 3rd and 4th examples, s4 is used, and in the last example, nothing (=the empty set symbol ∅) is used 😱. Sorry, it's a bit far-fetched.
    – cthiebaud
    Dec 19, 2021 at 17:10
  • Rigging the first measure's length has one of the strongest parallels, if not the strongest parallel, with how to pull off the request in the question with Musescore instead of Lilypond.
    – Dekkadeci
    Dec 19, 2021 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.