lilypond-user
[Top][All Lists]
Advanced

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

custom ledger lines (was: wrong placement of timesignature (since 2.16))


From: Keith OHara
Subject: custom ledger lines (was: wrong placement of timesignature (since 2.16))
Date: Sat, 1 Sep 2012 21:55:02 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Gagi Petrovic <mail <at> gagipetrovic.nl> writes:

>    \override Staff.StaffSymbol #'line-positions = #'(-4 4) 
>    \override Staff.StaffSymbol #'ledger-positions = #'(0)

At first I thought Gagi wanted ledgers on notes at the center of his open staff,
and nowhere else.  Then I remembered how 'ledger-positions works.

The list of 'ledger-positions is a _pattern_, repeated as far as needed to
reach any note.  Thus #'ledger-positions = #'(0 2) gives the usual pattern
at positions ... -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12

That means 'ledger-positions must be a list of _at_least_two_, so the code 
can tell how to space the patterns.  Given just one position, the code gives 
up and produces no ledgers.  (We can also 
  \override Staff NoteHead #'no-ledgers = ##t
if we want no ledgers at all.)

If we really _do_ want a ledger for notes on centerline, and no others, we can
  \relative c, { 
     \override Staff.StaffSymbol #'ledger-positions = #'(0 99)
     \override Staff.StaffSymbol #'line-positions = #'(-4 4) 
     c8 d e f g a b c c d e f g a b c c d e f g a b c
     c d e f g a b c c d e f g a b c }
and assume that we will never need a note as far out at position ±99.

Can anyone using custom staves comment on whether this system will work for
foreseeable real applications of custom ledgers ?

I questioned the repeating-pattern aspect in the code, thinking we could 
just write out (a finite portion of) the pattern explicitly
  #'ledger-positions = #'(-12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12)
but I did not oppose the design because contributors usually know their 
application best.
So far, the repeating-pattern aspect is not documented, so it is our little
secret.  If it will work, I can document it; if not, propose a change.




reply via email to

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