lilypond-user
[Top][All Lists]
Advanced

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

Y-extent Problem


From: Piaras Hoban
Subject: Y-extent Problem
Date: Wed, 16 Oct 2013 23:49:07 +0100

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. Trying to do this automatically causes
a problem whenever I try to access the Y-extent value for a NoteHead grob. 

Whenever  the line 
(y-extent (ly:grob-extent grob sys Y))
is uncommented the spacing of the first system is disrupted.

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.

I've included a MWL below that illustrates the problem and have also attached my working ly file.

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)

Attachment: terrain_test.ly
Description: Binary data


%%%%%%% END EXAMPLE %%%%%%%
- - - - - - - - - - - - - - - - - - -
http://piarashoban.com/

+353 (0) 87 2853692

15 Oakglynn
Naas Co. Kildare
IRELAND


reply via email to

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