lilypond-user
[Top][All Lists]
Advanced

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

Bar numbers at beginning of line


From: Walter Hofmeister
Subject: Bar numbers at beginning of line
Date: Sun, 05 Aug 2007 15:53:31 -0600
User-agent: Microsoft-Entourage/11.3.3.061214

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:
Oboe.ly:51:56: error: GUILE signaled an error for the expression beginning
here
    \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'
[16]

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
time.

Walter Hofmeister



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

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

\paper{
    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
        \stemNeutral
    \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
    d2.
    }
    
    \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
    g2.
    }



    %\bar "|."
}
     
     
     \score {
        \new Staff \melody
        \layout { }
        \midi { }
     }

Attachment: Oboe.pdf
Description: Binary data


reply via email to

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