Lily ponders:
With the help from the list I have the .ly file that I use quite often. Many 
thanks lily ponders.
Is it possible to modify the code do not display the tied note?
example in the attached .ly file:  
i.e. (1) do not display second ⓢ & third ⓢ because it is the tied notes
(2) do not display the second ⓕ because it is the tied note.
(3)  ⓡ is displayed - want to retain this because it is a slur.
Thank you for any help.

Emmanuel,
Ming
\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) }






\new Staff {
  <<
    \new Voice = "soprano" \zup { 
      \override TextScript.outside-staff-priority = 1000
      \textLengthOn % make room for text!
      \voiceOne \soprano
    }
   
  >>
}
%}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to