1

I'm running into this issue, hopefully user error, with both the stable (2.24.4) and development (2.25.21) branches of LilyPond. In the first measure of music, I need the beam to be subdivided every three 16th notes, but whatever numbers I try, it doesn't work. Here's the most recent thing I tried. What is the correct syntax for the current versions of LilyPond?

\version "2.24.4"
#(set-default-paper-size "legallandscape")

upperOne = \relative c' {
  \clef treble

%%%%% Time signature for first measure

  \compoundMeter #'((3 8) (3 8) (3 8))
  \accidentalStyle forget
  ees8.[( fis a~] \tuplet 5/3 { a[ aes8] } a!8.[ c] \bar "!" \break

%%%%% Time signature for second measure

  \compoundMeter #'((3 8) (3 8) (3 8) (3 16) (3 8) (3 8))

  e,[ g] bes8[ a gis] \tuplet 5/3 { g!8.[ fis8] } e8. \tuplet 5/3 { d[ e8 ] } gis4.~gis16.[ a f8.])
}

upperTwo = \relative c {
  \clef bass
  \accidentalStyle forget

%%%%% Attempt to subdivide beams - THIS is what the question is about

  \set subdivideBeams = ##t
  \set baseMoment = #(ly:make-moment 3/16)
  \set beatStructure = #'(1 1 1 1)
  \tuplet 5/3 { r16 cis([ d f e }
  \tuplet 5/3 { g f g aes bes }
  \tuplet 5/3 { b! g c d ees \clef treble }
  \tuplet 5/3 { f e! f g8 }
  \tuplet 5/3 { a!16 b c d ees }
  \tuplet 5/3 { d f e! d cis }
  \tuplet 5/3 { c! ees d c b }
  \tuplet 5/3 { bes des c bes aes] }

 %%%% Change the subdivision - this works correctly

  \set baseMoment = #(ly:make-moment 1/8)
  \tuplet 3/2 { g[ b a } \tuplet 3/2 { f e d } cis8]
  \tuplet 5/3 { \clef bass c16[ b bes a g] }
  \set subdivideBeams = ##f
  f32[ e d c b bes]
  \tuplet 5/3 { a16[ f e' g f,] }
  \set subdivideBeams = ##t

 %%%%% This also results in correct output

  \set baseMoment = #(ly:make-moment 3/16)
  \tuplet 4/3 { e[ d c' e }
  \tuplet 4/3 { c, aes' c fis,]~ }
  \tuplet 4/3 { fis[ c' ees a }
  \tuplet 4/3 { g b \clef treble g' b]) }
}


\score {
      \new PianoStaff \with { \omit TimeSignature }
  <<
    \new Staff = "upper1" \upperOne
    \new Staff = "upper2" \upperTwo
  >>
}

For anyone who's curious, this is a bit of Sorabji's First Organ Symphony, the topic of my dissertation. :)

I read the documentation and Urs Liska's article on this topic. However, it's not sticking with me. I think this feature of the software needs to be made way more intuitive, without the user having to know as much about how LilyPond handles time and how to tweak that. Most of the other features of LilyPond don't require this kind of knowledge of how to change those presets.

7
  • 2
    There’s a lot going there (much of which isn’t related to this issue); can you simplify the code to a minimal working example (MWE). Also, if Urs Liska's article on this topic is relevant, can you please add link to it. Commented Nov 5 at 8:55
  • 1
    Perhaps some insight in LilyPond: Subdivided beam grouping for compound time signatures.
    – Aaron
    Commented Nov 5 at 9:38
  • A guess: might be something about how \set interacts with following lines that are or aren't inside a " {... }" group. Commented Nov 5 at 14:49
  • @elements if there's anything else I might trim, please let me know. I don't want to make any assumptions as to what code might be conflicting with the desired behavior and I am not too experienced with LilyPond.
    – Richard
    Commented Nov 6 at 1:55
  • 1
    @Richard The whole point of an MWE is to discover what's causing the behavior and what's not. Take away something small. Is the problem still present? Then take away something else. When the problem goes away, put that part back and take away something else. Do this until you can't take anything away without the problem going away. I'd start with eliminating the measures that don't have a problem.
    – ksnortum
    Commented Nov 6 at 23:45

2 Answers 2

2

The issue here is not compound time signatures. Is that the logic for automatic subdivisions is a heuristic that depends on the time signature. In your case the time signature is 18/16, and there this heuristic just fails, as you can see with this simplified example:

{
  \time 18/16
  \set subdivideBeams = ##t
  \set baseMoment = \musicLength 8.
  \set beatStructure = #'(6)
  \tuplet 5/3 8. {
    \repeat unfold #(* 18 5/3) { 16 }
  }
}

So unless this heuristic is improved you’ll need to manually specify the subdivisions (which I think is fair, since this is quite non-trivial music.

{
  \time 18/16
  \set subdivideBeams = ##t
  \set baseMoment = \musicLength 8.
  \set beatStructure = #'(6)
  \tuplet 5/3 8. {
    \repeat unfold 5 {
      16 16 16 16 \once\set stemRightBeamCount = #1 16 \once\set stemLeftBeamCount = #1
    }
    16 16 16 16 16
  }
}

This can of course be simplified a bit:

endSD = \once\set stemRightBeamCount = #1
newSD = \once\set stemLeftBeamCount = #1

{
  \time 18/16
  \set subdivideBeams = ##t
  \set baseMoment = \musicLength 8.
  \set beatStructure = #'(6)
  \tuplet 5/3 8. {
    \repeat unfold 5 {
      16 16 16 16 \endSD 16 \newSD
    }
    16 16 16 16 16
  }
}

Note that setting these parameters is equivalent to setting Stem.beaming to the correct value (a pair of lists giving beam positions for left and right).

1

The solution was to manually force the beaming of the LH section as follows:

  \tuplet 5/3 8. { r16 cis([ d f \set stemRightBeamCount = 1 e
                \set stemLeftBeamCount = 1 g f g aes \set stemRightBeamCount = 1 bes
                \set stemLeftBeamCount = 1 b! g c d \set stemRightBeamCount = 1 ees \clef treble
                \set stemLeftBeamCount = 1 f e! f \set stemRightBeamCount = 1 g8
                \set stemLeftBeamCount = 1 a!16 b c d \set stemRightBeamCount = 1 ees
                \set stemLeftBeamCount = 1 d f e! d \set stemRightBeamCount = 1 cis
                \set stemLeftBeamCount = 1 c! ees d c \set stemRightBeamCount = 1 b
                \set stemLeftBeamCount = 1 bes des c bes aes] }

Thanks to Leo from the GNU LilyPond mailing list for making me aware this is possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.