bug-lilypond
[Top][All Lists]
Advanced

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

Beam setting surprises because of processing order


From: Mats Bengtsson
Subject: Beam setting surprises because of processing order
Date: Fri, 11 Feb 2011 20:46:14 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Hi,

Consider the following three examples. Would you expect them to produce the same result or different and in that case, which are the same?

\version "2.13.49"
% First test:
\score{
\relative c' <<
\new Staff {
  \time 2/2
  \set Timing.baseMoment = #(ly:make-moment 1 4)
  c8 d e f g f e d
  }
\new Staff {
  \time 2/2
  c8 d e f g f e d
  }
>>
}
% Second test:
\score{
\relative c' <<
\new Staff {
  \time 2/2
  c8 d e f g f e d
  }
\new Staff {
  \time 2/2
  \set Timing.baseMoment = #(ly:make-moment 1 4)
  c8 d e f g f e d
  }
>>
}
% Third test:
\score{
\relative c' <<
\new Staff {
  \time 2/2
  \set Timing.baseMoment = #(ly:make-moment 1 4)
  c8 d e f g f e d
  }
\new Staff {
  \time 2/2
  \set Timing.baseMoment = #(ly:make-moment 1 4)
  c8 d e f g f e d
  }
>>
}


Trying it in LilyPond, it turns out that the processing order plays a trick here. In the first test, the baseMoment setting is done after the \time command, so it should be effective, however it turns out that the setting is processed before the \time command in the second stave. So, the only safe thing is to do all beam related settings in every single stave of the score in order to be sure that a \time command in other staves doesn't overwrite the settings. You could argue that it's sufficient to have the \time command in a single stave, but since the time signature is typeset in every stave, it's very likely that a LilyPond user includes it in all the staves. On the other hand, you don't really want to repeat all beam related settings all over the place.

Am I the first one to run into this problem? I couldn't find it mentioned in the mailing list archives.
Adding a sentence like:
"Note that these settings have to be made in all staves of the score, to avoid the risk that the setting is overridden by a \time command in another stave." Hmm, at second thought, this is probably gibberish to most readers. If you can find a better formulation, please use that instead.

     /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.s3.kth.se/~mabe
=============================================




reply via email to

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