Hello everybody, now I've got a "working" snippet showing the misbehaviour: two voices, one in black and the other in red, and inside a unisono measure where all note heads should have the same color, some note heads are black and others are red.
Obviously, this behaviour is influenced by a trick I used to tie notes across voices (see: http://old.nabble.com/moving-Tie_engraver-to-Score-td30491489.html http://old.nabble.com/moving-Tie_engraver-to-Score-td30491489.html ). I added notes like "e8*0" and "c8*0" to the end of the first voice to get the voices tied (see melodyAOne and melody ATwo in the following snippet). If I use the trick, the note heads are all red except one that is black. If I don't use it, all the note heads are red as expected. I also found out that using ties instead of slurs at the beginning of the second unisono measure also has influence on the note head color. Very strange!! Jürgen *********** snippet starts here *********** \version "2.12.3" setNotesColor = { \override NoteHead #'color = #red \override Stem #'color = #red \override Beam #'color = #red \override Slur #'color = #red \override Tie #'color = #red \override Dots #'color = #red \override Rest #'color = #red } melodyAOne = \relative c'' { e1 ~ e8*0 } % <--- trick to tie the e1 to the e8 in melodyBOne melodyATwo = \relative c'' { c1 ~ c8*0 } % <--- same melodyBOne = \relative c'' { e8 d4.( d2) | r4 r8 g,8 b8 c8 b8 a16( b16 | a1) } melodyBTwo = \relative c'' { c8 b4.( b2) | r4 r8 g8 b8 c8 b8 a16( b16 | a1) | } \score { \new Staff { \new Voice = "melody" { << \new Voice = "melodyAOne" { \voiceOne \melodyAOne } \new Voice = "melodyATwo" { \setNotesColor \voiceTwo \melodyATwo } >> \break << \new Voice = "melodyBOne" { \voiceOne \melodyBOne } \new Voice = "melodyBTwo" { \setNotesColor \voiceTwo \melodyBTwo } >> } } } \layout{ragged-right=##t} ************* End of snippet ****************** Phil Holmes-2 wrote: > > ----- Original Message ----- > From: "Jürgen Ibelgaufts" > To: > Sent: Monday, December 27, 2010 11:45 AM > Subject: Two voices in two different colors, which color wins in unisono > part? > > > > Hello everybody, > > I have two voices, \voiceOne printed in black, \voiceTwo printed in red. > There are two measures with identical notes, chords and lyrics, that are > unisono. Here, the two voices use the same note heads with black stems up > and red stems down. > > Now there is the funny effect that in the first measure, all note heads > are > black, while in the first measure (with identical notes, as I said), all > note heads are read, except one that shows red! > > Has anybody ever seen this before? Is there a way to determine in advance > which color shall win? Or, in other words, which voice to be printed > first, > and which voice to be printed on top of the other? > > Unfortunately, I could not manage to write a short demo, because no matter > what I tried, all the note heads always got printed black. > > Thanks in advance > Jürgen > -- > > When you said: > > "in the first measure, all note heads are > black, while in the first measure (with identical notes, as I said), all > note heads are read, except one that shows red!" > > Did you mean: > > "in the first measure, all note heads are > black, while in the _second_ measure (with identical notes, as I said), > all > note heads are _red_, except one that shows _black_!" > > ? > > > > -- > Phil Holmes > > > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > http://lists.gnu.org/mailman/listinfo/lilypond-user > > -- View this message in context: http://old.nabble.com/Re%3A-Two-voices-in-two-different-colors%2C-which-color-wins-in-unisono-part--tp30538611p30544160.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user