lilypond-user
[Top][All Lists]
Advanced

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

Getting Y position of Grobs / Spacing Error


From: Piaras Hoban
Subject: Getting Y position of Grobs / Spacing Error
Date: Sat, 19 Oct 2013 12:14:12 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> I'm not top posting.

Hi folks,

I've been working towards an automatic way to notate what Brian Ferneyhough 
calls "interruptive polyphony". 

I've been reasonably successful in terms of implementing the rhythmic aspect 
of the problem (still some work to do on grace notes).  

However, at the moment I have to precisely specify the Y value of the note 
I'm trying to connect to in a different staff. 

Trying to set this value automatically causes a problem whenever I try to 
access the Y-extent value for a NoteHead grob. 

In the example below uncommenting the line  
(y-extent (ly:grob-extent grob sys Y)) disrupts the spacing of the first system.

Is there anyway to prevent this? Or is there an alternative way to 
access the Y-position of Grobs? 

Apologies if this is a known-issue that I've somehow missed a previous 
discussion of.

I've included a MWL below that illustrates the problem.

any help would be great!

piaras hoban

%%%%%%% START EXAMPLE %%%%%%%
\language "english"
\version "2.17.26"

music = {
        \repeat unfold 4 c'1 \break
        \repeat unfold 4 c'1
}

\score {
    <<
        \new Staff {
            \once \override NoteHead.after-line-breaking = #(lambda (grob)
                    (let*
                        (
                           (sys (ly:grob-system grob))
                           (x-extent (ly:grob-extent grob sys X))
                           ;;uncomment y-extent to cause spacing error
                           ;(y-extent (ly:grob-extent grob sys Y))
                        )
                        (display (list x-extent ))
                    )
                )
            \music
        }
        \new Staff {
            \music
        }
    >>
}

#(set-global-staff-size 32)



%%%%%%% END EXAMPLE %%%%%%%




reply via email to

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