Dear Paul, all, thanks for your great contribution of passing the tonic as an argument.
> It’s possible to create a custom engraver (with scheme) that can access this > property and do something with it. (There’s not all that much documentation > on this, but maybe look in the LSR for examples? “make-engraver” is the > function.) I’m not sure how a custom engraver would work with chordRootNamer > and chordNoteNamer, just because I’m unfamiliar with the chord name > mechanisms. In the documentation, under 1.1.4 – Note heads – Easy notation, there is a snippet printing the scale degree inside the note head. The make-engraver code reads out the root and calculates the scale degree. What's left now is to isolate this function and put it into the other code we already have. Then Nashville chord symbol support will be harmonically complete. What's left are the rhythmic markings, but that's a whole different matter. Regards, Amy #(define Ez_numbers_engraver (make-engraver (acknowledgers ((note-head-interface engraver grob source-engraver) (let* ((context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-name (ly:pitch-notename tonic-pitch)) (grob-pitch (ly:event-property (event-cause grob) 'pitch)) (grob-name (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-name tonic-name) 7)) (note-names (make-vector 7 (number->string (1+ delta))))) (ly:grob-set-property! grob 'note-names note-names)))))) #(set-global-staff-size 26) \layout { ragged-right = ##t \context { \Voice \consists \Ez_numbers_engraver } } \relative c' { \easyHeadsOn c4 d e f g4 a b c \break \key a \major a,4 b cis d e4 fis gis a \break \key d \dorian d,4 e f g a4 b c d } -- Dr. Amelie Zapf (a...@ameliezapf.com) Pianist, Bassist, Guitarist, Composer, Friedrich-Ebert-Str. 25, 14548 Caputh, Germany http://www.ameliezapf.com/ PGP public key ID: 4E0A7F00 "When the power of love overcomes the love of power, the world will know peace." - Jimi Hendrix _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user