lilypond-user
[Top][All Lists]
Advanced

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

Re: Analysis brackets


From: Mats Bengtsson
Subject: Re: Analysis brackets
Date: Mon, 16 Aug 2004 09:52:54 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

If you check out Documentation -> Program reference -> Translation
-> Contexts -> ...
you will find out what engravers live in what contexts.
For example, you will find that the engravers for rests, note heads
and stems, for example, appear in the Voice context, not in the
Staff or RhythmicStaff.

   /Mats


Hamish Allan wrote:

Hello again,

So, my latest attempt to put proper analysis brackets underneath both staves is to use an extra invisible RhythmicStaff like this:

\context RhythmicStaff \with {
  \remove "Bar_engraver"
  \remove "Staff_symbol_engraver"
  \remove "Time_signature_engraver"
  \remove "Rest_engraver"
  \consists "Horizontal_bracket_engraver"
} {
  r16\startGroup\startGroup\startGroup r r r\stopGroup
  r\startGroup r r r\stopGroup\stopGroup
  r\startGroup\startGroup r r r\stopGroup
  r\startGroup r r r\stopGroup\stopGroup\stopGroup
}

However, the \remove "Rest_engraver" seems to be having no effect. Nor does trying to remove note head and stem engravers when using notes instead of rests.

Could somebody please tell me what I'm doing wrong?

Also, even if it worked, this would definitely be a sub-optimal solution from a spacing point of view, so I'd still like to know if there's a better way (as I start to glimpse the power of tinkering with lower levels of lilypond, I think there must be!)

I would be most grateful for any response - I'd love to have more time to play, but I've got to hand in a dissertation (with this analysis in it) in two week's time!

Thanks,
Hamish

On Aug 14, 2004, at 6:20, Hamish Allan wrote:

Hi,

As this is my first post, I'd like to say thank you very much to the developers for creating Lilypond -- I've just yesterday started having to typeset music within LaTeX documents; I had a quick play with MusiXTeX, but thankfully shortly afterwards found Lilypond and immediately became very glad of its existence!

My query is about analysis brackets. I'm trying to show nested metrical structure in Bach's Prelude No. 1 from the Well-Tempered Clavier (see source code below). I want two brackets per bar, then brackets round pairs of those, etc. I'm using the PianoStaff so I've got two staves. If I put the groups around notes in the top stave. the brackets appear between the staves, wheras I want them either below or above both staves. If I put the groups around the notes in the bottom stave, the brackets don't stretch far enough (because the notes in the bottom stave are longer - but I want the brackets effectively to cover both staves). I tried adding eight s16 invisible rests to the chord at the bottom but the brackets would still only stretch as far as the visible notes.

Is there any way either to have the brackets upside down above the top stave, or to have them cover more of the bottom stave?

Whilst we're here, can I use the square bracket shorthand for \startGroup and \stopGroup without changing the time signature? I tried it out, but of course it just extended the beams over the rest. Also, how might I use the triangular grouping engraver?

Many thanks in advance,
Hamish

--------

\paper {
  linewidth = 413\pt
  indent = 0.0\mm
  raggedright = ##t
  #(paper-set-staff-size (* 18.0 pt))
  \context {
    \StaffContext \consists "Horizontal_bracket_engraver"
  }
}

\score {
  \notes \context PianoStaff <<
    \context Staff = "up" {
      \relative c'' {
r8\startGroup\startGroup\startGroup\startGroup g16 c e g, c e\stopGroup
        r8\startGroup g,16 c e g, c e\stopGroup\stopGroup
        r8\startGroup\startGroup a,16 d f a, d f\stopGroup
        r8\startGroup a,16 d f a, d f\stopGroup\stopGroup\stopGroup
        r8\startGroup\startGroup\startGroup g,16 d' f g, d' f\stopGroup
        r8\startGroup g,16 d' f g, d' f\stopGroup\stopGroup
        r8\startGroup\startGroup g,16 c e g, c e\stopGroup
r8\startGroup g,16 c e g, c e\stopGroup\stopGroup\stopGroup\stopGroup
      }
    }
    \context Staff = "down" {
      \clef bass
      \relative c' {
        << c2 \\ { r16 e8. ~ e4 } >>
        << c2 \\ { r16 e8.~ e4 } >>
        << c2 \\ { r16 d8. ~ d4 } >>
        << c2 \\ { r16 d8.~ d4 } >>
        << b2 \\ { r16 d8. ~ d4 } >>
        << b2 \\ { r16 d8.~ d4 } >>
        << c2 \\ { r16 e8. ~ e4 } >>
        << c2 \\ { r16 e8.~ e4 } >>
      }
    }
  >>
}



_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user





_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
        Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================




reply via email to

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