|
From: | Mats Bengtsson |
Subject: | Re: Possible bug with multiple voices, slurup and rests? |
Date: | Tue, 17 Jan 2012 09:24:24 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
Hi all, I seem to be having trouble with rest alignment. The specific case I have is pretty specific: 1. I have a multiple-voice section 2. I have /slurUp 3. I have a rest, with no rests before this point In this case, the rest seems to still be high rather than centered, as if another voice still existed. If there is a rest anywhere before the /slurUp command, the problem does not exist. Is this a known issue or am I doing something stupid? \version "2.14.2" { % Problem here << { f' e' g' g' } \\ { e' d' d' d' }>> \slurUp d' r4 } { % This is fine r4<< { e' g' g' } \\ { d' d' d' }>> \slurUp d' r4 } { % This is fine << { f' e' g' g' } \\ { e' d' d' d' }>> r4 \slurUp r4 }
This is one example of the problems that are related to the "A word of warning" in the Learning Manual, Sect. 3.1.1 "Introduction to the LilyPond file structure". If you explicitly tell LilyPond that you want to create a voice of music, then the problem disappears:
\new Voice { << { f' e' g' g' } \\ { e' d' d' d' } >> \slurUp d' r4 }What happens with the <<{...} \\ {...}>> construct is that LilyPond creates two Voice contexts, called "1" and "2" and then goes back to the main Voice that existed before the polyphonic part. However, if this happens at the start of the score, then LilyPond has not had any opportunity to create a main Voice context and then it keeps the "1" Voice also for the following music. The simple solution is, as shown in my example, to explicitly create a Voice context before the <<...\\...>> section.
/Mats -- ============================================= Mats Bengtsson Signal Processing School of Electrical Engineering Royal Institute of Technology (KTH) SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: address@hidden WWW: http://www.ee.kth.se/~mabe =============================================
[Prev in Thread] | Current Thread | [Next in Thread] |