lilypond-user
[Top][All Lists]
Advanced

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

Re: chords under endings updated but now for staffgroup?


From: Mats Bengtsson
Subject: Re: chords under endings updated but now for staffgroup?
Date: Tue, 30 Nov 2004 10:55:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

You shouldn't read my old answers if Han-Wen has given some better
answers. As is also described in the section on "Repeat Syntax" in
the manual, the correct(!) way of handling such a situation is to
set the voltaOnThisStaff property. Unfortunately, the example file
linked from the manual is missing, so here comes a copy from the
old manual, updated to version 2.4.2:

\header {

    texidoc = "Volta brackets can be placed over chord names. This
requires adding an engraver to @code{ChordNames}, and setting
@code{voltaOnThisStaff} correctly."

}

\version "2.4.0"
\score {
    <<
  \new ChordNames \with {
      voltaOnThisStaff = ##t
  } \chordmode {
     c1 c
  }
  \new Staff \with {
      voltaOnThisStaff = ##f
  }  {
   \repeat volta 2 { c'1 } \alternative { c' }
  }
>>
}


   /Mats



Paul Scott wrote:
The code that Mats provided for 2.2.x to put chords under endings works in 2.4.2 in this form:

\score{
 <<
   \new ChordNames \chords{
     \repeat volta 2 {
       f1:maj f:7} \alternative{{bes:7}{c:maj}}
   }
   \new Staff \relative c'{
     \repeat volta 2 { c4 d e f g a b c } \alternative{{g2 e }{c1}}
   }
 >>
 \layout { %was paper
   \context {
     \Score %was ScoreContext
     \consists "Volta_engraver"
     \override VoltaBracket #'minimum-space = #0
   }
   \context {
     \Staff %was \StaffContext
     \remove "Volta_engraver"
   }
 }
}

but now I want a StaffGroup and I don't know enough about contexts and engravers yet to know why the following puts the chords over the endings again:

music = \relative c' {
 \repeat volta 2 { c4 d e f g a b c } \alternative{{g2 e }{c1}}
}

\score{
 <<
   \new ChordNames \chords{
     \repeat volta 2 {
       f1:maj f:7} \alternative{{bes:7}{c:maj}}
   }
   \new StaffGroup <<
     \new Staff << \music >>
     \new Staff << \music >>
   >>
 >>
 \layout { %was paper
   \context {
     \Score %was ScoreContext
     \consists "Volta_engraver"
     \override VoltaBracket #'minimum-space = #0
   }
   \context {
     \StaffGroup %was \StaffContext
     \remove "Volta_engraver"
   }
 }
}

Can anyone help me add the StaffGroup here correctly to get the chord names under the endings? I did just find Section 7.1 in the manual but may take me a while to digest that.

Thanks,

Paul Scott



_______________________________________________
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]