Re: How to really center a text above a note?

2009-07-07 Thread Neil Puttock
2009/7/5 Mark Polesky markpole...@yahoo.com: If the unsafe assumption on line 8 could be addressed, I think it should be implemented in the source. Neil? I can probably do a loop to pick up the first head, i.e., filtering out any grobs which don't support rhythmic-head-interface. I don't

Re: How to really center a text above a note?

2009-07-07 Thread Trevor Bača
On Tue, Jul 7, 2009 at 10:33 AM, Neil Puttock n.putt...@gmail.com wrote: 2009/7/5 Mark Polesky markpole...@yahoo.com: If the unsafe assumption on line 8 could be addressed, I think it should be implemented in the source. Neil? I can probably do a loop to pick up the first head, i.e.,

Re: How to really center a text above a note?

2009-07-05 Thread Valentin Villenave
2009/6/29 Neil Puttock n.putt...@gmail.com: With apologies to Michael, here's a simpler method for centring text using a grob callback, which effectively does the same as your old code by retrieving the notehead (or rest) from the PaperColumn then mimicking the centered_on_x_parent callback:

Re: How to really center a text above a note?

2009-07-05 Thread Mark Polesky
Valentin Villenave wrote: 2009/6/29 Neil Puttock : With apologies to Michael, here's a simpler method for centring text using a grob callback, which effectively does the same as your old code by retrieving the notehead (or rest) from the PaperColumn then mimicking the

Re: How to really center a text above a note?

2009-07-04 Thread Michael Lauer
Neil Puttock n.puttock at gmail.com writes: With apologies to Michael, here's a simpler method for centring text using a grob callback, which effectively does the same as your old code by retrieving the notehead (or rest) from the PaperColumn then mimicking the centered_on_x_parent

Re: How to really center a text above a note?

2009-06-29 Thread Trevor Bača
On Sun, May 24, 2009 at 8:36 PM, Michael Lauer mrlau...@yahoo.com wrote: Wilbert Berendsen lilykde at xs4all.nl writes: Op zondag 24 mei 2009, schreef madMuze: perhaps a Schemer could pull the X-extent info from the attachment point notehead, divide it by 2 and send that to the

Re: How to really center a text above a note?

2009-06-29 Thread Mats Bengtsson
A hint is to look at how the alignment is done for articulations, i.e. Script layout objects, where the X-offset property is the function script-interface::calc-x-offset defined in scm/output-lib.scm. It doesn't work to use that function directly for TextScript objects, but you can probably use

Re: How to really center a text above a note?

2009-06-29 Thread Mark Polesky
Trevor Bača wrote: Or is something else now going that would prevent calls to Self_alignment_interface::aligned_on_x_parent and centered_on_x_parent from working as they did previously? Trevor, I honestly have no idea if this is relevant here, but recently I noticed that in define-grobs.scm,

Re: How to really center a text above a note?

2009-06-29 Thread Neil Puttock
2009/6/29 Trevor Bača trevorb...@gmail.com: ... is it possible that TextScripts *used to* have NoteHeads as grob-parents (at least in 2.9.16) and have since changed to have PaperColumns as grob parents, thus rendering the settings from 2.9.16 no longer functional? Michael's correct. The

Re: How to really center a text above a note?

2009-05-27 Thread Wilbert Berendsen
Op maandag 25 mei 2009, schreef Michael Lauer: I think the difference is that LyricTexts have NoteHeads as grob-parents, while TextScripts have PaperColumns. (...) Many thanks, I'll try to dig this further out! best regards, Wilbert Berendsen -- Frescobaldi, LilyPond editor for KDE:

RE: How to really center a text above a note?

2009-05-24 Thread Kieren MacMillan
Hi Wilbert, There must be a way to really center a simple text above a note. But [this centers] the text above the *left* side of the note: { \once \override TextScript #'self-alignment-X = #CENTER c'4-text } How can I center a text or markup above the *center* of the note/chord? Offset

RE: How to really center a text above a note?

2009-05-24 Thread madMuze
perhaps a Schemer could pull the X-extent info from the attachment point notehead, divide it by 2 and send that to the offset. Meanwhile, it may to helpful to know that: quarter-note head width = about 1.31 half-note head width = about 1.39 whole-note head width = about 1.96 (in staff space

Re: How to really center a text above a note?

2009-05-24 Thread Wilbert Berendsen
Op zondag 24 mei 2009, schreef madMuze: perhaps a Schemer could pull the X-extent info from the attachment point notehead, divide it by 2 and send that to the offset. Meanwhile, it may to helpful to know that: quarter-note head width = about 1.31 half-note head width = about 1.39

Re: How to really center a text above a note?

2009-05-24 Thread Michael Lauer
Wilbert Berendsen lilykde at xs4all.nl writes: Op zondag 24 mei 2009, schreef madMuze: perhaps a Schemer could pull the X-extent info from the attachment point notehead, divide it by 2 and send that to the offset. Meanwhile, it may to helpful to know that: quarter-note head width =

How to really center a text above a note?

2009-05-23 Thread Wilbert Berendsen
Hi, There must be a way to really center a simple text above a note. But these two lines center the text above the *left* side of the note: { c'4-\markup\center-align text } { \once \override TextScript #'self-alignment-X = #CENTER c'4-text } How can I center a text or markup above the