Hi, Colin: Thank you for you email. I don't remember who the author of 'solfege-engraver' is? By re-submit to the list again I hope the author will see this and be able to update it if it is possible. Emmanuel, Ming
On Monday, June 30, 2014 11:01:34 PM, Colin Campbell <c...@shaw.ca> wrote: On 14-06-30 07:39 PM, MING TSANG wrote: > >Hi, Colin: ><><><><> >Thank you for the suggestion. But I want to preserve what is code in the >staff. I do not want to display second ⓢ and third ⓢ above the staff (the >same way midi track just extend the beats without playing it). The same for >second ⓕ. I want to retain the ⓡ because it is a slur (just as midi will >play it). >"ⓓ" "ⓡ" "ⓜ" "ⓕ" "ⓢ" "ⓛ" "ⓣ" > > > >Emmanuel, >Ming Sorry about that, Ming! I hadn't read your original message properly. As you seem to be modifying a scheme snippet, perhaps you can find a way to trigger the solfege only on a pitch change. I'm thinking of something like \set chordChanges = ##t in a ChordNames context. Can you get in touch with the snippet author? HTH, Colin -- The average pencil is seven inches long, with just a half-inch eraser - in case you thought optimism was dead. - Robert Brault, software developer, writer (1952- )
\version "2.19.8" #(define syllables '("do" "re" "mi" "fa" "so" "la" "ti")) #(define sylsâ '("â" "â¡" "â" "â" "â¢" "â" "â£")) #(define numRâ '("â" "â" "â" "â" "â" "â " "â")) #(define number '("1" "2" "3" "4" "5" "6" "7")) #(define numRâ '("â" "â" "â" "â" "â" "â" "â")) %{ #(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)) (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))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) dir) ))))) %} #(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))) ;; 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) ))))) xup = \with { \consists #(solfege-engraver syllables UP) } xdown = \with { \consists #(solfege-engraver syllables DOWN) } zup= \with { \consists #(solfege-engraver sylsâ UP) } zdown= \with { \consists #(solfege-engraver sylsâ DOWN) } nup= \with { \consists #(solfege-engraver number UP) } ndown= \with { \consists #(solfege-engraver number DOWN) } rup= \with { \consists #(solfege-engraver numRâ UP) } rdown= \with { \consists #(solfege-engraver numRâ DOWN) } sup= \with { \consists #(solfege-engraver numRâ UP) } sdown= \with { \consists #(solfege-engraver numRâ DOWN) } % { %%%%%%%%%%%%%%% sample %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% soprano = { a'4 g'4~2~ | 4 f'4~2 | c'2( d'2) | b1} %soprano = { a'4 g'2.~ | 4 f'2. | c'2( d'2) | b1} sopWords = \lyricmode { Red fox and blue cat. } \new Staff { << \new Voice = "soprano" \zup { \override TextScript.outside-staff-priority = 1000 \textLengthOn % make room for text! \voiceOne \soprano } \new Lyrics \with { \override VerticalAxisGroup #'staff-affinity = #CENTER } \lyricsto "soprano" \sopWords >> } \markup{The 'fox' is sung 4 beats long & 'and' 3 beats long ( a tie).} \markup{It will be clearer if (2)\underline{'the second & third â¢'} is not printed.} \markup{ ... Is it possible to modify 'solfege-engraver' not to print (2)?} \markup{The â¡ for 'blue' is ok being printed because it is a slur.} %}
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user