lilypond-user
[Top][All Lists]
Advanced

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

Again: stemBoth problem


From: Robin Bannister
Subject: Again: stemBoth problem
Date: Thu, 5 Mar 2009 14:43:52 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hu Haipeng wrote: 
> I don't know whether this gives two stems

No, it doesn't. 
It is just a chord, and a chord (in one voice) has only one stem. 

In this case the still active \stemUp makes its stem go in a 
different direction to the following \stemDown notes and so the 
accompanying (automatic) beaming looks rather silly. 

If you apply \stemDown to the chord too, the beamimg looks better, 
but the "I" scale gets (a notehead but) no stem on reaching this chord. 

\stemBoth provokes the silly beamimg here too. You need something like 
  stemBothTwoOne = #(define-music-function (parser location m) (ly:music?)
  #{ << \voiceTwo $m \new Voice { \voiceOne $m } >> \oneVoice #}) 
to improve things in this particular case. 

And you must know that \stemBoth doubles up not just the notes 
but everything else as well - e.g. the "II" indication. 


To modify only the second d of the prime chord, you would need to use 
the \tweak command. But it can't modify stems, as noted in NR 5.3.4 
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/The-tweak-command 


Maybe these are trivial difficulties compared to those you constantly 
cope with, but, as a general priciple, I would have thought you would be 
better off going with the flow: 
  not fighting Lilypond but rather 
  letting Lilypond do its graphic thing as much as possible. 
This would mean accepting 
>  separate voices with plenty of confusing spacer notes
as the lesser of two evils. 


musicI  = \relative c' { c8(^"I" d e f g a b c | d) s2.. | s1 }
musicII = \relative c' { s1 | d'8(_"II" c b a g f e d) | s1 }
<< \voiceOne \musicI \\ \voiceTwo \musicII >> 


Cheers,
Robin





reply via email to

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