lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Analysis Brackets


From: Trevor Bača
Subject: Re: Analysis Brackets
Date: Mon, 12 Feb 2007 15:43:20 -0600

On 2/12/07, Matthew Kaner <address@hidden> wrote:
thank you very much!

I was trying that but had the \override command with the actual music, and
not in the layout/context part.

Hi Matt,

Actually, you can stick an override in the note entry of the music
itself if you want to.

In fact, there are three override locations. All three override
locations are equivalent:

1. In a \context block (which lives within the a \layout block)
2. In a \with block (which follows context instantiation immediately)
3. In the note entry of the actual music


1. Here's an override in a \context block, as before:

    \score {
      \relative c'' {
        c4\startGroup\startGroup
        c4\stopGroup
        c4\startGroup
        c4\stopGroup\stopGroup
      }
      \layout {
        \context {
          \Staff \consists "Horizontal_bracket_engraver"
          \override HorizontalBracket #'direction = #up
    }}}


2. Here's an override in a \with block:

\score {
  \new Staff \with {
     \consists "Horizontal_bracket_engraver"
     \override HorizontalBracket #'direction = #up
   } {
     \relative c'' {
        c4\startGroup\startGroup
        c4\stopGroup
        c4\startGroup
        c4\stopGroup\stopGroup
      }
  }
}


3. And here's an override in the note entry of the music itself:

\score {
  \new Staff \with {
     \consists "Horizontal_bracket_engraver"
  } {
     \override Staff.HorizontalBracket #'direction = #up
     \relative c'' {
        c4\startGroup\startGroup
        c4\stopGroup
        c4\startGroup
        c4\stopGroup\stopGroup
      }
  }
}


Gurus, are there any other override locations? Or just these three?

Use whichever override location you prefer. (I prefer method #2 with a
\with block, because this leaves context settings with the context and
layout settings in \layout. Other users prefer other override
locations as a matter of style.)

No matter which override location you pick, you *must* first determine
the context of the grob you wish to override. In this case the
HorizontalBracket grob lives in the Staff context. You absolutely have
to determine this; otherwise you might write something like \override
Voice.HorizontalBracket #'direction = #up, which is absolutely correct
syntactically but will have no effect whatsoever because you've
misspecified the context.




On 2/12/07, Trevor Bača <address@hidden> wrote:
> On 2/12/07, Matt <address@hidden> wrote:
> > Hi there,
> >
> > could someone please tell me how to get analysis
> > brackets to appear above the stave?
>
> Hi Matt,
>
> 8.5.6 "Analysis brackets" mentions HorziontalBracket. So we override
> the direction of that grob.
>
> %%% BEGIN %%%
>
>      \score {
>        \relative c'' {
>          c4\startGroup\startGroup
>          c4\stopGroup
>          c4\startGroup
>          c4\stopGroup\stopGroup
>        }
>        \layout {
>          \context {
>            \Staff \consists "Horizontal_bracket_engraver"
>           \override HorizontalBracket #'direction = #up
>      }}}
>
> %%% END %%%
>
> Note no apostrophe before numbers, colors or directions like #up and
#down.
>
>
>
> --
> Trevor Bača
> address@hidden
>
>




--
Trevor Bača
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]