#(define (accidental->markup alteration) ; voir chord-name.scm "Return accidental markup for ALTERATION." (if (= alteration 0) (make-line-markup (list empty-markup)) (conditional-kern-before (alteration->text-accidental-markup alteration) (= alteration FLAT) 0.2))) #(define (my-note-name->markup pitch) ; voir chord-name.scm "Return pitch markup for PITCH." (make-line-markup (list (make-simple-markup (vector-ref #("c" "d" "e" "f" "g" "a" "b") (ly:pitch-notename pitch))) (accidental->markup (ly:pitch-alteration pitch))))) %%%%%%%%%%%%%%%%%%%%%%%%%%% \layout { \context { \NoteNames \override NoteName #'font-size = #0 \override NoteName #'stencil = #(lambda (grob) ; nom de note en majuscule (let ((text (ly:grob-property grob 'text))) (ly:grob-set-property! grob 'text (string-upcase! text)) (ly:text-interface::print grob))) } \context { \ChordNames \override ChordName #'font-size = #-2 chordRootNamer = #my-note-name->markup % nom de la note "root" en minuscule } } global = { \time 3/4 \override NoteNames.NoteName #'extra-offset = #'( 0 . 2 ) } melodie = \relative { \partial 4 a' c2 d4 | e4. f8 e4 } basse = \relative {\partial 4 r a,4 s s e s s} accordsNotes = \relative { \partial 4 s4 s4 < e, a c> < e a c> s4 < e a c> < e a c> } accordsLettres = \chordmode {\partial 4 s s a:m a:m s a:m a:m} music = { << \new PianoStaff << \new Staff <<\melodie \global>> \new Staff << \clef bass \basse \accordsNotes >> >> \new ChordNames \accordsLettres \new NoteNames \basse >> } \score { \music } \score {\transpose a d' \music }