lilypond-user
[Top][All Lists]
Advanced

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

Re: ChordNames in Staff context


From: Keith OHara
Subject: Re: ChordNames in Staff context
Date: Mon, 14 Oct 2013 05:03:26 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Robert Schmaus <robert.schmaus <at> web.de> writes:

> The compiling resulted in hundreds of errors (after applying 
> convert-ly). It took some time to figure out, that the problem was the 
> statement
> 
> \context {
>      \Staff
>      \accepts "ChordNames"
> }
> 
> in the score block. A google search turned up this conversation from 
> March 2013 which took place on the lilypond-bugs list:
> http://lilypond.1069038.n5.nabble.com/programming-error-while-inserting-
quot-ChordNames-quot-in-quot-Staff-quot-td143559.html
> 

> May I ask what the reasons were for 
> removing that technique?

Probably, no-one watching the changes knew that this was a technique.

>From the email you linked, I can see the potential for a problem. The
Axis_group_engraver in ChordNames does the job of arranging all the
within the context into rows on the page. But if ChordNames is inside
a Staff, the Staff also has an Axis_group_engraver also trying to do
the same job, also collecting the same chord names into rows.

You can tell any particular instance of ChordNames to stop doing 
Axis_group_engraving, so that it stops fighting with the Staff.
Or, you can tell a particular instance of Voice (which fits nicely
in the Staff) to start doing Chord_name_engraving.  I do not know
which will work best for lead sheets.

<<
  \new ChordNames \chordmode { s1*3 ges4 bes1:m7 }
  \new Staff \with {\accepts ChordNames } <<
    \new ChordNames \with {
      \override ChordName #'Y-offset = #-1
      \remove Axis_group_engraver
    } { \chordmode { 
      \repeat percent 4 ces4 f2:m7.3-.5- bes:m7 es:m7 aes:m7
      s1*2 } }
    \new Voice {
      \key es\minor s1*3 
      \transpose c c' {bes,4 des ges bes \chordmode { bes,1:m7 } } } >> >>

<<
  \new ChordNames \chordmode { s1*3 ges4 bes1:m7 }
  \new Staff <<
    \new Voice \with {
      \consists Chord_name_engraver
      \override ChordName #'Y-offset = #-1
      \remove Note_heads_engraver 
    } { \chordmode { 
      \repeat percent 4 ces4 f2:m7.3-.5- bes:m7 es:m7 aes:m7
      s1*2 } }
    \new Voice {
      \key es\minor s1*3 
      \transpose c c' {bes,4 des ges bes \chordmode { bes,1:m7 } } } >> >>




reply via email to

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