int(0) array(11) { [0]=> string(44) "Running as unit: run-p323596-i323597.service" [1]=> string(60) "Changing working directory to: `/tmp/lilywiki-tmp26407ad3ca'" [2]=> string(48) "Processing `/tmp/lilywiki-tmp26407ad3ca/file.ly'" [3]=> string(10) "Parsing..." [4]=> string(21) "Interpreting music..." [5]=> string(34) "Preprocessing graphical objects..." [6]=> string(36) "Finding the ideal number of pages..." [7]=> string(26) "Fitting music on 1 page..." [8]=> string(18) "Drawing systems..." [9]=> string(30) "Layout output to `file.svg'..." [10]=> string(43) "Success: compilation successfully completed" } Subdividing beams - LilyPond wiki Jump to content

Subdividing beams

From LilyPond wiki

The beams of consecutive 16th (or shorter) notes are, by default, not subdivided. That is, the three (or more) beams stretch unbroken over entire groups of notes. This behavior can be modified to subdivide the beams into sub-groups by setting the property subdivideBeams. When set, multiple beams will be subdivided at intervals defined by the current value of baseMoment by reducing the multiple beams to the number of beams that indicates the metric value of the subdivision. If the group following the division is shorter than the current metric value (usually because the beam is incomplete) the number of beams reflects the longest possible subdivision group. However, if there is only one note left after the division this restriction isn't applied. Note that baseMoment defaults to one over the denominator of the current time signature if not set explicitly. It must be set to a fraction giving the duration of the beam sub-group using the ly:make-moment function, as shown in this snippet. Also, when baseMoment is changed, beatStructure should also be changed to match the new baseMoment:

\version "2.24.0"

\relative c'' {
  c32[ c c c c c c c]
  \set subdivideBeams = ##t
  c32[ c c c c c c c]

  % Set beam sub-group length to an eighth note
  \set baseMoment = #(ly:make-moment 1/8)
  \set beatStructure = 2,2,2,2
  c32[ c c c c c c c]

  % Set beam sub-group length to a sixteenth note
  \set baseMoment = #(ly:make-moment 1/16)
  \set beatStructure = 4,4,4,4
  c32[ c c c c c c c]

  % Shorten beam by 1/32
  \set baseMoment = #(ly:make-moment 1/8)
  \set beatStructure = 2,2,2,2
  c32[ c c c c c c] r32

  % Shorten beam by 3/32
  \set baseMoment = #(ly:make-moment 1/8)
  \set beatStructure = 2,2,2,2
  c32[ c c c c] r16.
  r2
}