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: Jan Warchoł
Subject: Re: Two voices in two different colors, which color wins in unisono part?
Date: Tue, 28 Dec 2010 17:28:10 +0100

Hi,

2010/12/28 Jürgen Ibelgaufts <address@hidden>:
>
> Hello Janek, this is what I intended to post. I apologize.

No problem :) Now it works perfectly.

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

That's funny, because i have different results.
When i compile the snippet you sent into pdf, all notes in 3rd measure are red.
When i compiled it into a png, one note (last one) was black, but now
it isn't! (or i had hallucinations)
In both cases i get a warning:

C:/Users/Janek/Desktop/test2.ly:14:34: warning: ignoring too many
clashing note columns
melodyAOne = \relative c'' { e1 ~
                                  e8*0 }

And there's more to it - when i delete the "trick" from the code:

\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
}

melodyBOne = \relative c'' { e1 ~ \break e8 d4.( d2) | r4 r8 g,8 b8 c8
b8 a16( b16 | a1) }
melodyBTwo = \relative c'' { c1 ~ \break c8 b4.( b2) | r4 r8 g8 b8 c8
b8 a16( b16 | a1) | }

\score {
 \new Staff {
   \new Voice = "melody" {
<<
         \new Voice = "melodyBOne" {
           \voiceOne \melodyBOne
         }
         \new Voice = "melodyBTwo" {
           \setNotesColor
           \voiceTwo \melodyBTwo
         }
>>
   }
 }
}

\layout{ragged-right=##t}

I get the exact same pdf as previously, but the png is yet another
variation - the first note in measure 3 is black!
Thats really funny.
I'm using LilyPond version 2.13.44.

> 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!!

Do you mean using ties between 3rd and 4th measure? Doing so doesn't
make sense to me at all...


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

Attachment: test2.pdf
Description: Adobe PDF document

Attachment: test2.png
Description: PNG image

Attachment: test2withouttrick.png
Description: PNG image


reply via email to

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