On Sun, 2024-11-24 at 15:25 +0100, David Kastrup wrote:
> David Sumbler <da...@aeolia.co.uk> writes:
> 
> > I am setting a piece in 2/4 time.  Lilypond's default beaming
> > pattern
> > is to break beams at the mid-bar point, which is what one would
> > generally expect.  However, I would like it to use a single beam
> > for
> > the whole bar if, and only if, the bar consists of 4 quavers/half-
> > notes.
> 
> You mean, 4 quavers/eighth-notes.

Yes, I do, sorry!

> > Of course I can easily achieve this using square brackets in the
> > relevant places.  But it would be nice to automate this behaviour.
> >  Having spent a lot of time reading the relevant parts of the
> > Notation
> > Reference and various snippets, I still can't achieve what I want.
> >  One
> > of my attempts is shown below.
> > 
> > I want the first bar to have 2 beams (one for each half of the bar)
> > but
> > for the 2nd bar to have a single beam.
> > 
> > How can this be done?
> > 
> > \version "2.24.3"
> > \language "english"
> > 
> > \new Staff \relative {
> >   \time 2/4
> >   \set Timing.baseMoment = #(ly:make-moment 1/4) 
> >   \set Timing.beatStructure = 1,1
> >   \set Timing.beamExceptions = #'()
> >   \set Timing.beamExceptions = \beamExceptions { 8[ 8 8 8] }
> > c''8 c16 c c c c8
> > c8 c c c 
> > }

Thank you both for your suggestions, which amount to using:

\set Timing.beamExceptions = \beamExceptions { 8[ 8 8 8] | 16[ 16 16
16] 16[ 16 16 16] }

and imply that the baseMoment and beatStructure lines are not required,
probably since they are the default values in 2/4 time.

What I don't understand is why I need both the 8th-note and 16th-note
entries.  The name "beamExceptions" implies that one only needs to
specify the exceptional beaming - but the 16th note version is already
the default.  Is it the case that if any exception is described, then
one has to describe all cases?  If so, then the name beamExceptions is
a bit misleading.

Also I don't quite understand the underlying rules which mean (I
assume) that defining the 16th-note beaming as above, covers bars such
as | [8 16 16] [8 8] | and  | [16 8 16] [8. 16] |.

David

Reply via email to