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: Fri, 8 Feb 2019 08:50:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Wow Harm,
that is great! I will use this versatile aproach, thank you very much!
greetings,
Robert

Am 08.02.2019 um 00:40 schrieb Thomas Morley:
\version "2.19.82"

gotoCtx =
#(define-music-function (strg)(string?)
#{
   \change Staff = #strg
   #(if (string=? strg "staff") ;; Staff needs to be named equal to this
        #{ \override ChordName.Y-offset = #-1 #}
        #{ \revert ChordName.Y-offset #})
#})

\score {
   \new StaffGroup
   <<
     \new ChordNames = "chrds-up"
       %% keep it alive!
       \chordmode { s1*8 }
     \new Staff = "staff" \with { \accepts ChordNames }
       <<
         \new ChordNames  \with { \override ChordName.Y-offset = #-1 }
           \chordmode {
             s1*0
             \gotoCtx "chrds-up"
             c1
             \gotoCtx "staff"
             dis:m
             ees/g
             \gotoCtx "chrds-up"
             f
             \gotoCtx "staff"
             gis:m
             \gotoCtx "chrds-down"
             e:7
             \gotoCtx "chrds-up"
             f
             \gotoCtx "chrds-down"
             f
           }
         { s2_"Text" a'2 s1^"Text" e'''4 e'''_"Text" c'2 a'1 s1 s s }

       >>
     \new ChordNames = "chrds-down"
       %% keep it alive!
       \chordmode { s1*8 }
   >>
}

Attachment: chordNamesOnStaff4.png
Description: PNG image


reply via email to

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