Hi, lilyponders:
The attach .ly file show the sequencing of solfege above the staff behaves
inconsistent.
How can this be resolved? I am also hoping it will be the same if it is
sequencing below the staff. The color solfege will be showing on the lower
stack in both case.
Help is appreciated.
Emmanuel,
Ming
\version "2.19.4"
\language "english"
%%%%%%%%%%%%%%%\include "include_solfege-engraver.ly"
#(define syllables '("do" "re" "mi" "fa" "so" "la" "ti"))
#(define syls '("d" "r" "m" "f" "s" "l" "t"))
#(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) )))))
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) }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%end
clors =
#(define-music-function (parser location which color music)
((procedure? car) color? ly:music?)
(music-map
(lambda (mus)
(if (music-is-of-type? mus 'event-chord)
(let* ((evt-chrd-nts (event-chord-notes mus)))
(if (> (length evt-chrd-nts) 1)
(let ((first-nh (which evt-chrd-nts)))
#{ \tweak #'color #color #first-nh #})
mus)
mus)
mus))
music)) % default #first #last is the top notehead
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boo =
#(define-music-function
(parser location color the-music)
(color? ly:music?)
#{
\temporary \override NoteHead.color = #color
#the-music
\revert NoteHead.color
#}) %\boo#blue {..}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SA = {d''4. d''8 d''8 <c''e''>8 <b'd''>8 f'8 |%m73
<<{\voiceOne a'2 a'4 f'8 e'8}\new Voice{\voiceTwo \boo#red {c'4 d'4 f'4 f'4} }>> \oneVoice |%m74
d'4. <g'b'>8 <f'b'>8 <g'b'>8 q4 |%m75
}
verseA = \lyricmode {
re re re mi re fa la la fa mi re so so so re
}
<<
\new Staff \with { \xup
} <<
\new Voice = "soprano" { \voiceOne \clors #first #red \SA }
>>
\new Lyrics
\lyricsto "soprano" \verseA
>>
<<
\new Staff \with { \xdown
} <<
\new Voice = "soprano" { \voiceOne \clors #first #blue \SA }
>>
\new Lyrics
\lyricsto "soprano" \verseA
>>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user