2014-04-20 14:30 GMT+02:00 Thomas Morley <thomasmorle...@gmail.com>: > 2014-04-20 3:23 GMT+02:00 Thomas Morley <thomasmorle...@gmail.com>: >> 2014-04-19 23:25 GMT+02:00 MING TSANG <tsan...@rogers.com>: >>> The color solfege will be showing on the lower >>> stack in both case. > >> I found no convincing method to set the color for the TextScript, though. >> I used a workaround, hoping someone else comes up with a better solution. > > Hi again, > > I found a way to clear the 'tweaks for newgrob: > > #(define (solfege-engraver lst dir) > (make-engraver > (acknowledgers > ((note-head-interface engraver grob source) > (let* ( > (context (ly:translator-context engraver)) > (tonic-pitch (ly:context-property context 'tonic)) > (tonic-index (ly:pitch-notename tonic-pitch)) > (event (ly:grob-property grob 'cause)) > (event-copy (ly:event-deep-copy event)) > (grob-pitch (ly:event-property event 'pitch)) > (grob-index (ly:pitch-notename grob-pitch)) > (delta (modulo (- grob-index tonic-index) 7)) > (name (list-ref lst delta)) > (newgrob (ly:engraver-make-grob engraver 'TextScript > event-copy))
Please delete the following two lines: > (newgrob-cause (ly:grob-property newgrob 'cause)) > (newgrob-tweaks (ly:event-property newgrob-cause 'tweaks)) ) > > ;; clear 'tweaks for newgrob > (ly:event-set-property! event-copy 'tweaks '()) > (if (string= name "Hb") (set! name "B")) > ;; Give newgrob 'outside-staff-priority depending on > ;; grob 'staff-position > (set! (ly:grob-property newgrob 'outside-staff-priority) > (+ (ly:grob-property newgrob 'outside-staff-priority) > (* dir (ly:grob-property grob 'staff-position)))) > (set! (ly:grob-property newgrob 'text) name) > (set! (ly:grob-property newgrob 'direction) dir) ))))) > > HTH, > Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user