lilypond-user
[Top][All Lists]
Advanced

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

Re: ChordNames on Staff


From: Robert Hennig
Subject: Re: ChordNames on Staff
Date: Thu, 7 Feb 2019 13:50:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Dear Aaron and Valentin,
thanks for your efforts and tips.
I'm still looking for an solution to switch the ChordsOnStaff
on and off, because I need it casually..
The second Solution from Valentin looks like what I would prefer but
it prints the chord notes too, which is not was I'm looking for (only Chord Names).

The first example lacks the possibility to make musical annotations
like \f,\p and so one because I swich to chordmode:

\version "2.19.82"
\layout {
  \context {
    \name ChordsOnStaff
    \type "Engraver_group"
    \consists "Chord_name_engraver"
    \override ChordName.extra-offset = #'(0 . -1)
    \alias ChordNames
  }
  \context {
    \Staff
    \accepts "ChordsOnStaff"
  }
}
<<
  \new ChordNames \chordmode {
    c1 s1 s1 c1
  }
  \relative c' {
    c2 e2
    \context ChordsOnStaff \chordmode {
      c1 \mark "Text" c1
    }
    g2 c2
  }
>>

--------------
the second example is how I could imagine the switch could be done,
but it does not has the right effect, the VerticalAxisGroup setting
does not apply, the Chord name is printed twice...

\version "2.19.82"
\layout {
  \context {
    \name ChordsOnStaff
    \type "Engraver_group"
    \consists "Chord_name_engraver"
    %\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
    %   #'((basic-distance . 0)(minimum-distance . 0)(padding . -10))
    \override ChordName.extra-offset = #'(0 . -1)
    \alias ChordNames
  }
  \context {
    \ChordNames
    \accepts "ChordsOnStaff"
  }
}
<<
  \new ChordNames \chordmode {
    c1 \context ChordsOnStaff {
      c1 c1
    }
    c1
  }
  \new Voice \relative c' {
    c2 e2
    s1\p^"Text"
    s1\f
    g2 c2
  }
>>

Greetings,
Robert



reply via email to

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