|
From: | James Worlton |
Subject: | Re: Parentheses overrides |
Date: | Fri, 6 Feb 2015 14:21:53 -0600 |
Cheers,BTW, there was this solution but looks strange with flats:Oups, I forgot that!I'll check for a workaround.
\score {
\new Staff {
\parenthesize cis'4. s8 \parenthesize bes4.
}
\layout {
\context {
\Voice
\override ParenthesesItem.stencil = #(lambda (grob)
(let* ((acc (ly:grob-object (ly:grob-parent grob Y) 'accidental-grob))
(dot (ly:grob-object (ly:grob-parent grob Y) 'dot)))
(if (not (null? acc)) (ly:pointer-group-interface::add-grob grob 'elements acc))
(if (not (null? dot)) (ly:pointer-group-interface::add-grob grob 'elements dot))
(parentheses-item::print grob)))
}
}
}
Pierre2015-02-06 20:53 GMT+01:00 James Worlton <address@hidden>:On Fri, Feb 6, 2015 at 1:20 PM, Pierre Perol-Schneider <address@hidden> wrote:Cheers,With "my" words I'd say that it'll help you to add or reduce the space before and/or after a grob.As english isn't my native language I'm not sure to find the right words.Manual says it "computes the width of an object" (see: http://lilypond.org/doc/v2.19/Documentation/extending/callback-functions.html).
Pierre2015-02-06 20:08 GMT+01:00 James Worlton <address@hidden>:Thanks, Pierre. That's exactly what I'm looking for. So what does the ParenthesesItem X-extent do?James WOn Fri, Feb 6, 2015 at 12:49 PM, Pierre Perol-Schneider <address@hidden> wrote:HTH,So here it goes :If I follow you, you'd rather extent the note head.Hi James,I understand the idea but I thing you missunderstand the X-extent effect.
\version "2.19.15"
parenWider = {
\once\override NoteHead.X-extent = #'(-1.5 . 1.3)
\once\override Accidental.X-extent = #'(1.5 . 0)
\once\override Accidental.extra-offset = #'(1.5 . 0)
}
\score {
\new Staff { \parenWider \parenthesize fis'4 }
}
PierreThanks for pointing that out. I think I understand it.A problem I've now encountered is that the 3 overrides in your solution make ledger lines longer towards the accidental. Neither of the overrides I've tried adding to the parenWider definition make any difference:\once \override Staff.LedgerLineSpanner.X-extent = #'(1.5 . 0) %various values, both positive and negative have no effector\once \override Staff.LedgerLineSpanner.length-fraction = 0.1 %various values, both positive and negative have no effectIs there something I'm missing regarding how to override ledger lines?James W
[Prev in Thread] | Current Thread | [Next in Thread] |