X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fmusic-functions.scm;h=724165a88f399d9e02d4877f256990bd1763860b;hb=6ec65b15b95eb3bd700579a9f85ce209ecd0812d;hp=d3b5b2fda558be22e44a263e33ca11b50bd27c8c;hpb=46b687aca821801f779e479ccc601c713ed0917e;p=lilypond.git diff --git a/scm/music-functions.scm b/scm/music-functions.scm index d3b5b2fda5..724165a88f 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -841,7 +841,7 @@ if appropriate. (if (and (equal? nm object-name) (procedure? cb)) (begin - (ly:grob-set-property! grob 'stencil Balloon_interface::print) + (ly:grob-set-property! grob 'stencil ly:balloon-interface::print) (set! (ly:grob-property grob 'original-stencil) cb) (set! (ly:grob-property grob 'balloon-text) text) (set! (ly:grob-property grob 'balloon-text-offset) off) @@ -963,3 +963,14 @@ use GrandStaff as a context. " (ly:make-duration 0 0) '()))) (ly:music-compress skip (ly:music-length mus)) skip)) + +(define-public (pitch-of-note event-chord) + + (let* + ((evs (filter (lambda (x) (memq 'note-event (ly:music-property x 'types))) + (ly:music-property event-chord 'elements)))) + + (if (pair? evs) + (ly:music-property (car evs) 'pitch) + #f))) +