|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
length of staff lines in score with only spacer notesIf I have a score containing only an s8 spacer rest, the staff lines will
always have the same length, no matter how wide the key/clef/time signatures are. As a consequence, in some cases the staff lines are way too short (leaving to the time signature without staff lines) and in some cases they are too long. Attached is an example. Any idea where the problem is and how it might be fixed? The other problem appears with the key signature, when you remove the Clef_engraver (because sometimes you only want to print the original key signature in an incipit of a critical edition): The key signature has no padding on the left, so it starts even a little bit before the staff lines... That case is also included in the example. Any ideas how these issues can be fixed? Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, reinhold@..., http://reinhold.kainhofer.com/ * Financial & Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org [score-remove-engravers.ly] \version "2.13.7" m = \relative c' { \clef "tenor" \key c \minor s8 } \markup "Normal staff, all engravers, eighth spacer note" \markup "The staff lines are too short" \new Score { \new Staff \m } \markup "Time signature removed, eighth spacer note" \markup "The staff lines are too short" \new Score { \new Staff \with { \remove "Time_signature_engraver" } \m } \markup "Time signature and Key removed, eighth spacer note" \new Score { \new Staff \with { \remove "Time_signature_engraver" \remove "Key_engraver" } \m } \markup "Time signature and Clef removed, eighth spacer note" \new Score { \new Staff \with { \remove "Time_signature_engraver" \remove "Clef_engraver" } \m } \markup "Time signature and Clef removed (only one b left), eighth spacer note" \markup "The key signature is too far to the left, the staff lines are too long" \new Score { \new Staff \with { \remove "Time_signature_engraver" \remove "Clef_engraver" } \relative c' { \clef "tenor" \key f \major s8 } } _______________________________________________ lilypond-devel mailing list lilypond-devel@... http://lists.gnu.org/mailman/listinfo/lilypond-devel |
|
|
Re: length of staff lines in score with only spacer notesReinhold Kainhofer <reinhold@...> writes:
> If I have a score containing only an s8 spacer rest, the staff lines > will always have the same length, no matter how wide the key/clef/time > signatures are. As a consequence, in some cases the staff lines are > way too short (leaving to the time signature without staff lines) and > in some cases they are too long. Attached is an example. Any idea > where the problem is and how it might be fixed? You can lengthen by putting \bar "" after the spacer. Apart from that... no idea. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@... http://lists.gnu.org/mailman/listinfo/lilypond-devel |
|
|
Re: length of staff lines in score with only spacer notesOn Thu, Nov 5, 2009 at 10:06 AM, Reinhold Kainhofer <reinhold@...> wrote: If I have a score containing only an s8 spacer rest, the staff lines will Hi Reinhold, Would proportional notation help? Like the attached? Trevor. -- Trevor Bača trevorbaca@... _______________________________________________ lilypond-devel mailing list lilypond-devel@... http://lists.gnu.org/mailman/listinfo/lilypond-devel |
|
|
Re: length of staff lines in score with only spacer notes2009/11/5 Reinhold Kainhofer <reinhold@...>:
> If I have a score containing only an s8 spacer rest, the staff lines will > always have the same length, no matter how wide the key/clef/time signatures > are. As a consequence, in some cases the staff lines are way too short (leaving > to the time signature without staff lines) and in some cases they are too long. > Attached is an example. > Any idea where the problem is and how it might be fixed? I'm not sure why this happens, though it's something to do with SpacingSpanner. As a workaround, you can get the extent of the prefatory items from BreakAlignment, then use this to set the width of StaffSymbol: \override StaffSymbol #'after-line-breaking = #(lambda (grob) (let* ((system (ly:grob-system grob)) (elts (ly:grob-object system 'elements)) (break-alignment #f)) (for-each (lambda (x) (let ((elt (ly:grob-array-ref elts x))) (if (grob::has-interface elt 'break-alignment-interface) (set! break-alignment elt)))) (iota (ly:grob-array-length elts))) (if break-alignment (set! (ly:grob-property grob 'width) (+ (ly:output-def-lookup (ly:grob-layout grob) 'indent) (interval-length (interval-widen (ly:grob-extent break-alignment system X) 0.4))))))) > > The other problem appears with the key signature, when you remove the > Clef_engraver (because sometimes you only want to print the original key > signature in an incipit of a critical edition): The key signature has no > padding on the left, so it starts even a little bit before the staff lines... Change the default spacing between LeftEdge and KeySignature: \override Score.LeftEdge #'space-alist = #'((custos extra-space . 0.0) (ambitus extra-space . 2.0) (time-signature extra-space . 1.0) (staff-bar extra-space . 0.0) (breathing-sign minimum-space . 0.0) (clef extra-space . 0.8) (first-note fixed-space . 2.0) (right-edge extra-space . 0.0) (key-signature extra-space . 0.8) (key-cancellation extra-space . 0.0)) Regards, Neil _______________________________________________ lilypond-devel mailing list lilypond-devel@... http://lists.gnu.org/mailman/listinfo/lilypond-devel |
|
|
[PATCH] Re: length of staff lines in score with only spacer notesAm Donnerstag, 5. November 2009 23:58:12 schrieben Sie:
> 2009/11/5 Reinhold Kainhofer <reinhold@...>: > > If I have a score containing only an s8 spacer rest, the staff lines will > > always have the same length, no matter how wide the key/clef/time > > signatures are. As a consequence, in some cases the staff lines are way > > too short (leaving to the time signature without staff lines) and in some > > cases they are too long. Attached is an example. > > Any idea where the problem is and how it might be fixed? > > I'm not sure why this happens, though it's something to do with > SpacingSpanner. It happens for every score where the music does not not create any grobs. E.g. only s8 or \bar "" (notice that the combination s8 \bar "" does create an empty bar line grob, since the bar is at a moment > 0). So I suppose that the width calculation is only done if the music contains at least one real grob after the prefatory key/clef/time signature. On the other hand, the check for an empty score does not fail in this case... > As a workaround, you can get the extent of the prefatory items from > BreakAlignment, then use this to set the width of StaffSymbol: Ah, thanks, that works really great! > > The other problem appears with the key signature, when you remove the > > Clef_engraver (because sometimes you only want to print the original key > > signature in an incipit of a critical edition): The key signature has no > > padding on the left, so it starts even a little bit before the staff > > lines... > > Change the default spacing between LeftEdge and KeySignature: This extra space is only used if the KeySignature is the first element of a staff (i.e. directly after the LeftEdge), right? If so, why shouldn't we increase the default value from 0.0 to 0.8? Patch is up at: http://codereview.appspot.com/150045 Any objections to applying it? Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, reinhold@..., http://reinhold.kainhofer.com/ * Financial & Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org _______________________________________________ lilypond-devel mailing list lilypond-devel@... http://lists.gnu.org/mailman/listinfo/lilypond-devel |
|
|
Re: [PATCH] Re: length of staff lines in score with only spacer notes2009/11/6 Reinhold Kainhofer <reinhold@...>:
> This extra space is only used if the KeySignature is the first element of a > staff (i.e. directly after the LeftEdge), right? If so, why shouldn't we > increase the default value from 0.0 to 0.8? It seems a harmless change, since it's rare for a key signature to be positioned without a clef. > Any objections to applying it? LGTM. Regards, Neil _______________________________________________ lilypond-devel mailing list lilypond-devel@... http://lists.gnu.org/mailman/listinfo/lilypond-devel |
| Free embeddable forum powered by Nabble | Forum Help |