lilypond-user
[Top][All Lists]
Advanced

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

Re: bar numbers at beginning of bar - partial solution


From: Trevor Daniels
Subject: Re: bar numbers at beginning of bar - partial solution
Date: Thu, 29 Jan 2009 10:15:18 -0000

Paul

The notes in the bar are displaced to avoid a collision
of the stem of the first note with the bar number.  A
potential solution is to use 'outside-staff-priority
with the priority of the bar number greater than the stem.
By default the 'outside-staff-priority is not set for the
Stem object, but even when set this doesn't work. Maybe the
Stem object does not honour the 'outside-staff-priority value,
as it has already moved itself horizontally to avoid the
collision before the skyline code is invoked.

(You would also need to move engravers to make the
'outside-staff-priority comparison between bar numbers and
stems work - see Learning Manual 4.4.3 for details - but
this doesn't help anyway and would give rise to other
problems.)

So the best solution is to lower the bar number by setting
the value of the 'staff-padding of the bar number object
sufficiently high to clear most of the stems, and tweaking
the value for any bar number for which the default gives a
poor result.

HTH

Trevor


----- Original Message ----- From: "Paul Scott" <address@hidden>
To: "lilypond-user" <address@hidden>
Sent: Thursday, January 29, 2009 8:06 AM
Subject: Re: bar numbers at beginning of bar - partial solution


Paul Scott wrote:
Mats Bengtsson wrote:
I don't understand what you mean, can you provide an example?

Thanks for answering, Mats.  With the following code the bar number
displaces the notes in each bar to the right.  If I remove the two
self-alignment-X overrides the bar number does not displace any music.

Ok. If I apply some padding and increase the outside-staff-priority I can solve the initial displacement of the music. In some cases the padding would have to be a lot. I have changed the outside-staff-priority below to as much as 400. It would seem that a high outside-staff-priority would solve this without needing the padding. When I can I will post an example that seems to show that outside-staff-priority works sometimes but padding is needed at other times.

Paul



\version "2.12.1"

numberEveryBar = {
 \override Score.BarNumber #'break-visibility = #end-of-line-invisible
 \set Score.barNumberVisibility = #(every-nth-bar-number-visible 1)
 \override Score.BarNumber #'outside-staff-priority = #1
 \override Score.BarNumber #'font-size = #-2
 \override Score.BarNumber #'self-alignment-X = #-1
}
barNumberDown = {
 \override Score.BarNumber #'direction = #DOWN
 \override Score.BarNumber #'outside-staff-priority = #1
 \override Score.BarNumber #'font-size = #-2
 \override Score.BarNumber #'self-alignment-X = #-1
}

\relative c'' {
 \numberEveryBar \barNumberDown
 \repeat unfold 52 c2
 \set Score.currentBarNumber = #100
 \repeat unfold 48 c4
}


  /Mats

Paul Scott wrote:
Hi,

12.2.1

When numbering all bars the default bar numbers seem to be at the end of the previous bar which is confusing to the reader. When I use

\override Score.BarNumber #'self-alignment-X = #-1

to try to make these less confusing to the reader *sometimes* the music above the bar numbers is moved to the right which looks ugly. Is there another way to move the bar numbers without moving the music?

Thanks,

Paul Scott




_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user





_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user






reply via email to

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