lilypond-user
[Top][All Lists]
Advanced

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

Re: Manual "gotcha": beatStructure


From: Trevor Daniels
Subject: Re: Manual "gotcha": beatStructure
Date: Sat, 21 Mar 2015 15:59:25 -0000

James Harkins wrote Saturday, March 21, 2015 6:20 AM


>I just got slightly confused trying to use beatStructure, and a small edit to 
>the manual might help.
> 
> \version "2.18.2"
> \language "english"
> 
> five = {
>  \set Timing.beatStructure = #'(3 2)
>  \time 5/8
> }
> 
> seven = {
>  \set Timing.beatStructure = #'(3 2 2)
>  \time 7/8
> }
> 
> \new RhythmicStaff {
>  % \set Timing.beamExceptions = #'()
>  \set Timing.baseMoment = #(ly:make-moment 1/8)
>  \seven b8 b b b b b b
>  \five b8 b b b b
> }
> 
> The 7/8 bar shows with flags, not beams.
> 
> I think it must be that the variable implicitly creates a separate voice, and 
> the beatStructure applies only within the voice. 

No, that's not the reason.  The reason is that there is a separate 
beatStructure for each value of the time signature, and changes are applied to 
the time signature that is currently in force.  So \beatStructure in \seven 
amends the beat structure in the default time signature of 4/4 and the one in 
\five amends the beat structure in the then current 7/8, which for the short 
example you give fools you by looking correct.

So reverse the ordering of the \time and the \Timing.beatStructure commands and 
it will do what you expect.

> Replacing "Timing" with "Staff" fixes it. 

I think this is probably due to the way the beaming data structures are set up 
when they need to be created at the Staff (or Voice) level.  By default they 
exist only at the Score (Timing) level.  Best not rely on it.

> I don't see it mentioned in the manual that, if you \set 
> Timing.beatStructure, this must be in the same context where you write the 
> notes. The manual says "Beam setting changes can be limited to specific 
> contexts," but it doesn't say that they ARE limited to the nearest enclosing 
> context if you follow the syntax in most of the examples (using Timing).

That's not true.  By default the beam setting changes apply to all contexts 
(they're at the Score level) and the change can be specified in any context (as 
long as you get the order right ;)

However, the manual does not make it clear that the order of the \time and 
\Timing.beatStructure commands is important.  I'll have a look at improving 
that.

Trevor

reply via email to

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