lilypond-devel
[Top][All Lists]
Advanced

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

Re: I want ledger lines in middle of staff, or dashed staff lines


From: Mats Bengtsson
Subject: Re: I want ledger lines in middle of staff, or dashed staff lines
Date: Wed, 21 Feb 2007 10:27:33 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20061206)

I don't see any need for a separate class. It should be enough to add a
property setting that allows for ledger lines within the extent of the stave.
I hope you use the
\override Staff.StaffSymbol #'line-positions = ...
feature (see http://lilypond.org/doc/v2.8/Documentation/topdocs/NEWS) to
create the staves. In that case, an even better solution to your problem is
to just check that property in Ledger_line_spanner::brew_ledger_lines(...)
and only remove ledger lines if there is no corresponding staff line.

  /Mats


Kevin Dalley wrote:
Thanks.

I'm starting to go with some C++ hacking.  I can get the extra ledger
lines as long as I don't need them, when the note is outside of the
staff and normal ledger lines are created, as you mentioned.  I
haven't yet lied to LilyPond about whether the note is outside the
staff, but I'll think about it.

Is it worth adding a s separate ledger class for these ledgers,
perhaps subclassing from the current class?  That way normal staffs
don't need to worry about the code, only odd ones.  Though I added an
engraver for the chromatic staff, I'm not sure it is *really* an
engraver, it just changes the position of the notes.  It does work,
however.

I'm having trouble figuring out how to add a ledger style class.
Perhaps I'll just add it to my staff and see what happens.

Mats Bengtsson <address@hidden> writes:

As far as I can see from the implementation, the ledger lines are only
typeset if the note pitch is outside the staff, so some C++ hacking would
be needed to get a clean solution for you. It should be possible to fool
LilyPond, though, by typesetting the note heads one octave too high
(for example) so they get ledger lines, and then move everything back to
the desired position using extra-offset for all involved layout objects.



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

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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