lilypond-user
[Top][All Lists]

## Re: Help with beaming

 From: Jean Abou Samra Subject: Re: Help with beaming Date: Fri, 17 Dec 2021 21:31:34 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1



Le 17/12/2021 à 21:19, Paul McKay a écrit :

Hi

Can someone show me where I'm going wrong with the following. The piece is in 2/4. I would like the default beaming for some sections (where there are lots of eighth notes) to group them in whole bars but in sections where there are lots of faster notes, then a beam ought only to span a quarter note. In this example, if I ask for the first bars to be beamed in whole bars, an extra beam appears in the following bars which joins all the fast notes together. I would like the latter bars to continue to appear as they do in this example, but for the first ones to appear all joined up.

Paul McKay
%%%% example
\version "2.22.0"
\language "english"

firstTuplet = {
\once \override TupletBracket.bracket-visibility = ##t
\once \undo \omit TupletNumber
}
global = {
\key fs \minor
\numericTimeSignature
\time 2/4 \partial 8
\override TupletBracket.bracket-visibility = ##f
\omit TupletNumber
}
leftB = \relative {
\set Score.currentBarNumber = 65
\set Timing.beamExceptions = #'()
\set Timing.baseMoment = #(ly:make-moment 1/8)
\set subdivideBeams = ##t

% If you uncomment the next line, the beaming on the first 3 bars is correct but
    % there is an extra beam in the middle of the next three bars
%\set beatStructure = #'(4)



The problem is that you are missing the
context name here. Try

\set Timing.beatStructure = #'(4)

If you don't specify a context, the property
set applies to the bottom context, usually Voice,
or TabVoice, VaticanaVoice, Dynamics, etc. Here,
it's Voice. Then you revert the property for
Timing context, which means Score context here
because you didn't enable polymetry. \set operations
made in child contexts have precedence.
Since the property is still defined in Voice,
LilyPond won't go further in the context
hierarchy in quest of a value.

Best regards,
Jean