lilypond-user
[Top][All Lists]
Advanced

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

Re: Ok, I thought voices work but now trouble with beams


From: Mats Bengtsson
Subject: Re: Ok, I thought voices work but now trouble with beams
Date: Sun, 22 Oct 2006 22:23:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1

Kirill wrote:

Hello.

Mats, the voices code now works (those who were not following, see
gmane.comp.gnu.lilypond.general/25233), but now I want to make sure the beams
work fine as well.
Here is an example to illustrate what goes wrong:
1) This is the original Sibelius excerpt: http://sidosoft.ru/01sib.png
2) I press a button and my plugin generates the following code:

Chitarra = << {\new Voice { \relative c{
<e d' a' f'>2\fermata r8 <b'' e>16->\ff <b e>-> %1
\voiceOne e8 \oneVoice d c \voiceOne b \oneVoice c d %2
\voiceOne c \oneVoice b a \voiceOne gis \oneVoice a \times 2/3{b16( gis a} %3
}}}
{\new Voice {\voiceTwo \relative c{
s1*3/4 %1
<a c>8 s1*1/4 <e gis>8  s1*1/4 %2
<e a>8 s1*1/4 <b f'>8  s1*1/4 %3
}}} >>

3) We compile the .ly and here is what we get: http://sidosoft.ru/01ly.png

The beams in the second bar aren't nice because, well, the first 1/8 is in
\voiceOne (beams up) and the second and third are in \oneVoice (beams down,
because those noted are D and C above H, and we have instructed lilypond to
disregard voice two, right?), hence ugly angle.

Now the question: what is the right strategy for me now?
I understand that I can easily make the beams look right by either putting
something (r1 kind rests) into appropriate places in voice 2 (which contradicts
the intentions of the user) or I could inhibit generation of \oneVoice command
in those places (better). But now I need to come up with the logic for that.

What do you recommend?
In this specific example, it's fairly obvious for a human
typesetter to keep the \voiceOne for the upper notes
over the full sequence and insert spacing notes in the
lower voice, as you have already done. However, it's
probably hard to automate this completely. One possible
strategy could be to wait with the \oneVoice until the current
beam ends, but I'm sure you can find som other example where
that strategy produces ugly results.

Regards

  /Mats




reply via email to

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