[Top][All Lists]

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

Re: Bar numbers at beginning of line

From: Mats Bengtsson
Subject: Re: Bar numbers at beginning of line
Date: Mon, 06 Aug 2007 15:20:04 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.0.5)

As a musician, I would get very confused if I saw a bar number
in the middle of a measure (which is what you seem to try to achieve). If the conductor asked an orchestra to play from bar 100 and the bar number was printed that way, I'm sure that
at least half the orchestra would start at the top of the line
(i.e. in the middle of the measure) not at the beginning of the full measure.

To avoid this possible confusion, I would strongly recommend to instead typeset the bar number at the first bar line of the new line.

I afraid that you may need some advanced Scheme hacking to obtain
this in LilyPond, but it's certainly doable (don't have the time to
figure out the details right now).


Quoting Walter Hofmeister <address@hidden>:

Hello all,
   I have a problem whose solution eludes me. In general, when you have a
partial measure, the bar count does not get incremented. When you have a
piece that contains a section that ends on a partial measure and then the
next section begins with a pick up (partial measure as well), it is
necessary to tell Lilypond what the measure is with:
\set Score.currentBarNumber = #x so that the bar numbers will compute
correctly. Where the problem comes in for me is when the partial bar that
ends the first section appears at the beginning of the line. When this
happens, Lilypond seems to refuse to print the bar number at the beginning
of the line, which looks odd.
   I have tried to compose a tweak that will fix this. Looking in the
reference manual under BarNumber, I find the following:
break-visibility (vector):
#(#f #f #t)
A vector of 3 booleans, #(end-of-line unbroken begin-of-line). #t means
visible, #f means killed.

From this I am a little unsure of the syntax that I should use in my tweak,
but I try:
\override BarNumber #'break-visibility = #(#f #t #t)

For which I get: error: GUILE signaled an error for the expression beginning
   \override Score.BarNumber #'break-visibility = #
                                                       (#f #t #t)
Interpreting music... [8]
warning: type check for `break-visibility' failed; value `#<unspecified>'
must be of type `vector'

It seems that the tweak was not constructed correctly, that the value for
the vector was not expressed in the correct format. However for a non-scheme
programmer, I am not sure how someone is supposed to figure out how to do
this as the Reference manual will tell you all that you may change, but
nowhere have I found a reference for the syntax of each data type that you
might encounter in lilypond. For the programmers on the list this might seem
painfully obvious, but to us non-programmers it isn't. Is it possible that I
have encountered a bug?
   I have included the file below and a .pdf of the result. Thanks for your

Walter Hofmeister

*************************Lily file starts here**************************

\version "2.11.23"
\include ""
#(set-default-paper-size "letter")
#(set-global-staff-size 23)

   top-margin = 1\mm
   after-title-space = 10\mm
   line-width = 165\mm
   left-margin = 20\mm
   between-system-space = 25\mm
   ragged-last-bottom = ##t

\header {
   title = "Bourree"
   composer = "J.S. Bach"


melody = \relative c'' {
       \clef treble
       \key g \major
       \time 2/2
   \repeat volta 2 {
   \partial 8*2
   b8( c)
% 1
   d4-. g-. d-. c-.
   b4-.\breathe g'-. b,-. a-.
   g4-- b8( a) b4-. cs
   d8( cs d e) d( c b a)
% 5
   b4-.\breathe b'-. e,-. d-.
   cs4-. e-. a-. g-.

   fs8( e fs g) fs[( e d cs])

   \partial 4*3
   \set Score.currentBarNumber = #8

   \repeat volta 2 {
   \partial 8*2
   \override Score.BarNumber #'break-visibility = #(f t t)

   fs8( g)

   \set Score.currentBarNumber = #9
   a4-. d-. a-. g-.
% 10
   fs4-.\breathe d'-. fs,-. e-.
   d4-. g-. c( b8 a)
   b8( c b a) g4-.\breathe b,8( c)
   d4-. g-. d-. c-.
   b4-.\breathe g'-. b,-. a-.
% 15
   g4-- b8( a) b4-. cs
   d8( cs d e) d( c b a)
   b4-.\breathe b'-. e,-. d-.
   c4-. e-. a-. c,-.
   d8( cs d e) d[( c b a])
   \partial 4*3

   %\bar "|."

    \score {
       \new Staff \melody
       \layout { }
       \midi { }

reply via email to

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