Is there any possibility to retrieve informations about slurs being adjacent from a callback?

For example

\displayMusic { c4 ( c ) ( c ) c }

shows

[...]

(make-music
         'EventChord
         'elements
         (list (make-music
                 'NoteEvent
                 'duration
                 (ly:make-duration 2 0 1 1)
                 'pitch
                 (ly:make-pitch -1 0 0))
               (make-music
                 'SlurEvent
                 'span-direction
                 1)
               (make-music
                 'SlurEvent
                 'span-direction
                 -1)))

[...]

so the two appearances of a 'SlurEvent with opposite sign shows that a slur end and starts on the same note.

Can I retrieve this kind of information from within a callback?

#(define-public (slur::test grob)
 (let* ((left-bound (ly:spanner-bound grob LEFT))
        (right-bound (ly:spanner-bound grob RIGHT))
        (left-note (ly:grob-property left-bound 'cause))
        (right-note (ly:grob-property right-bound 'cause)))

       (display "\nleft note: ")(display (event-cause left-note))(newline)
       (ly:slur::print grob)))

The console output shows only informations about duration, pitch etc., but nothing about the corresponding
slurs. Is this information still accesible at this step, and if yes, how?

Thanks in advance

Marc



_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to