Hello Bogi,
On 23.11.2015 00:50, Bogi Lützen wrote:
Please help me with this little problem.
This is just one of my efforts, but in all of them I miss the stem on the
first g'2:
\version "2.18.0"
{
<<{c''1^~|\stemUp c''2 c''4 c''| c''1}{\stemDown g'2 a' |g' a'4 a'|
g'1}>>
\bar "|."
}
first: your code example can be made much easier to read if you add some
spaces and line breaks, and get indenting right (this is done
automatically by Frescobaldi, a great program for working with LilyPond
files <http://frescobaldi.org>):
%%%%%%%%%%%
{
<<
{
c''1^~ |
\stemUp c''2 c''4 c'' |
c''1
}
{
\stemDown g'2 a' |
g' a'4 a' |
g'1
}
>>
\bar "|."
}
%%%%%%%%%%%
If you run your snippet, you should get three warnings in the log, one
of them saying that ‘maybe your input should specify polyphonic voices’.
And that is the problem here: your code only produces only one ‘voice’
(in the LilyPond sense of the word) and you need two of them.
The most basic way to achieve that is inserting \\ between the music
expressions:
%%%%%%%%%%%
{
<<
{
c''1^~ |
\stemUp c''2 c''4 c'' |
c''1
}
\\
{
\stemDown g'2 a' |
g' a'4 a' |
g'1
}
>>
\bar "|."
}
%%%%%%%%%%%%
This will work in this small example. In any more complex situations,
you should create voices explicitly with \new Voice, and distinguish
them by \voiceOne, \voiceTwo etc.
Did you read the Learning Manual
<http://lilypond.org/doc/v2.18/Documentation/learning> already? It gives
a great, ‘must-read’ introduction into working with LilyPond.
H(ope)T(hat)H(elps),
Simon
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user