lilypond-user
[Top][All Lists]
Advanced

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

Re: Why do chords print below staff?


From: Erik Sandberg
Subject: Re: Why do chords print below staff?
Date: Fri, 20 May 2005 00:16:26 +0200
User-agent: KMail/1.8

On Wednesday 18 May 2005 17.45, Mats Bengtsson wrote:
> Tricky one! I send a copy to bug-lilypond, both since the
> difference between \chords and \chordmode is completely undocumented
> (except for the NEWS file for 2.4) and since I don't realize why
> the chords end up below the stave.
>
>
> I stripped down your example to the following, where the chords
> still are printed below the staff.
>
> \version "2.4.0"
>
> melody = \relative c'' {
>    a4 a8 a g4 g |
>    f2 f |
> }
>
> guitar = \new ChordNames \chordmode {
>    f2 c |
>    f1 |
> }
>
> \score {
>    <<
>    \new ChordNames {
>  \set chordChanges = ##t
>  \guitar
>   }
>
>    \new Staff \context Voice = mel {
>  \melody
>  }
>
> }
>
>
> Note that I replaced '\chords' with '\new ChordNames \chordmode'
> (which is equivalent) in an attempt to understand what's going on.
>
> The chords will move up above the stave if you do at least one of
> the following:
>
> - Replace 'guitar = \new ChordNames \chordmode' with
>    'guitar = \chordmode'
>
> - Move the property setting of chordChanges into
>    guitar = \new ChordNames \chordmode {...}
>
>     /Mats

If you expand the guitar variable, you might see what's going on:

\score {
  <<
    \new ChordNames {
      \set chordChanges = ##t
      \new ChordNames \chordmode {
        f2 c |
        f1 |
      }
    }

    \new Staff \context Voice = mel {
      \melody
    }
  >>
}

The second '\new ChordNames' will create a _new_ ChordNames context. The \set 
chordChanges=##t command will only be effective in the context from the 
_first_ \new ChordNames (which will contain no notes).

Erik





reply via email to

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