In my short snippet below, even though my
final output is as expected, a C major scale
with some brackets underneath some pairs of note,
I get the error:

> Parsing...
> test_post01.ly:25:8: error: not a context mod
>
>        \Voice

Note that I am using "Analysis brackets".

The lilypond parser does not like the use
of my \Voice tag in the \layout block

Is there something I am doing wrong?

Yes, I getting my desired output, but
but the error message does disturb me,
and I would like to understand something
about what is considered best practice
in the \layout blocks.

When I remove:

    \Voice
    \consists Horizontal_bracket_engraver

the error goes away, but then, I do
not get my desired brackets in the final
output.


Thanks.



\version "2.24.1"
\language "english"

\score {

  \new Staff \with { \remove "Time_signature_engraver" }
  {
    \time 4/4
    \clef "treble"
     c'1 d'1 e'1\startGroup f'1\stopGroup g'1 a'1 b'1\startGroup c''1\stopGroup
  }


  \layout {

    \context {
       \Score
       \override BarLine.transparent = ##t
       \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1  8)
       \override Stem.transparent = ##t

       \Voice
        \consists Horizontal_bracket_engraver
    }
  }

}

Reply via email to