lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two voices in two different colors, which color wins in unisono part


From: Jürgen Ibelgaufts
Subject: Re: Two voices in two different colors, which color wins in unisono part?
Date: Tue, 28 Dec 2010 16:57:46 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7



Am 28.12.2010 16:43, schrieb Jan Warchoł:
Hi Jurgen,

the strange coloring interested me, but your snippet failed to produce
any output on my computer... Also it collapsed into a continous stream
of characters (see below) which renders it totally unreadable :(
Perhaps something is wrong with your e-mail client?

cheers,
Janek

Hello Janek, this is what I intended to post. I apologize. I used the Old 
Nabble forum which is a mirror of this mailing list. Now I see that I rather 
use my mail client. Here is my posting again, I hope it is readable now.

Jürgen


----------------------------------

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). 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 ******************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]