From: https://code.google.com/p/lilypond/issues/detail?id=4040
Mark Polesky wrote > I don't have a solution, but my interest is piqued because apparently > someone here understands how ledger-positions works? The documentation > for ledger-positions ( Issue 1935 ) is utterly, utterly incomprehensible, > and I'm hoping someone can explain it to me once and for all. > http://lilypond.org/doc/v2.19/Documentation/notation/modifying-single-staves#staff-symbol > http://lilypond.org/doc/v2.19/Documentation/internals/staff_002dsymbol_002dinterface > > Feel free to reply on -devel or start a new issue. Hi Mark, I understand how ledger-positions works and will try to explain it. There are two tricky parts: 1. REPEATING LEDGER PATTERN One could indicate all ledger positions manually, spanning the whole audible spectrum of notes, but usually there is a spacing pattern that repeats, so instead you can just indicate one iteration of that repeating pattern and it will be repeated above and below the positions you indicated. For example, say I indicate ledger-positions of #'(0 3 4 5). Then above those positions that spacing pattern starts over again with the 5 ledger line being a "repetition" of the 0 ledger line, so the next iteration will be (5) 8 9 10, and then (10) 13 14 15, etc. Moving down, the 0 ledger line is a "repetition" of the 5 in the pattern so we would have -5 -2 -1 (0) and then -10 -7 -6 (-5). So the highest and lowest ledger-position that you indicate are "repetitions" of each other, or the point where the pattern (of spacing indicated between them) starts over again. Here's the series that this would produce: ... -12 -11 -10 -7 -6 -5 -2 -1 0 3 4 5 8 9 10 13 14 15 ... And here's some more examples: \version "2.18.2" music = \relative f' { c, d e f g a b c d e f g a b c d e f g a b c d e f g a b } \new Staff \with { % ledgers at ... -6 -4 -2 0 2 4 6 8 ... (same as default positions) \override StaffSymbol.ledger-positions = #'(0 2) \override StaffSymbol.line-positions = #'(0) } { \music } \new Staff \with { % ledgers at ... -20 -16 -12 -8 -4 0 4 8 12 16 20 ... \override StaffSymbol.ledger-positions = #'(0 4) \override StaffSymbol.line-positions = #'(0) } { \music } \new Staff \with { % ledgers at ... -7 -6 -5 -2 -1 0 3 4 5 8 9 10 13 14 15 ... \override StaffSymbol.ledger-positions = #'(0 3 4 5) \override StaffSymbol.line-positions = #'(0) } { \music } 2. GROUPED LEDGER LINES For some kinds of staves one may want groups of ledger lines to always appear together as a group, so that if any ledger lines in that group appear, they all appear. This is done by placing parenthesis around the groups of ledger lines. Below is an example with a Klavarscribo type staff where the lines represent the black keys on the piano and the spaces are the white keys. The ledger lines can be grouped so that they always appear in groups of 2 or 3 that correspond with those groups of staff lines. \version "2.18.2" music = \relative f' { c, d e f g a b c d e f g a b c d e f g a b } \new Staff \with { \override StaffSymbol.ledger-positions = #'(-5 -3 0 2 4 7) \override StaffSymbol.line-positions = #'(-5 -3 0 2 4) staffLineLayoutFunction = #ly:pitch-semitones } \relative f' { \music } \new Staff \with { % ledgers always appear in groups of 2 and 3 that correspond to the staff line groups % it seems that the group of ledger lines is treated as a single unit for purposes % of the repeating ledger line pattern, so (7 9) repeats (-5 -3). % (I'm not sure why ledgers aren't appearing for the first d note...) \override StaffSymbol.ledger-positions = #'( (-5 -3) (0 2 4) (7 9) ) \override StaffSymbol.line-positions = #'(-5 -3 0 2 4) staffLineLayoutFunction = #ly:pitch-semitones } \relative f' { \music } Ok, hopefully that helps. Let me know if you have questions or if I can help with the documentation for this stuff. Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/ledger-positions-explanation-and-documentation-tp165338.html Sent from the Dev mailing list archive at Nabble.com. _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
