Analysis brackets

Brackets can be used in musical analysis to indicate the structure of the pieces.

As demonstrated in the second measure, such analysis brackets can be nested.

\version "2.24.0"

\layout {
  \context {
    \Voice
    \consists "Horizontal_bracket_engraver"
  }
}
\relative c'' {
  c4\startGroup\startGroup
  d4\stopGroup
  e4\startGroup
  d4\stopGroup\stopGroup
}