Hello Craig, note that easy notes heads will make use of the note heads note-names property if set. This allows us to make an arbitrary NoteHead use arbitrary names.
So to achieve what you intend to do you could simply rewrite the key music function to also override this property on a Staff level (key affects the whole staff) as you can see in the appended file. A different option would be to write an engraver that acknowledges NoteHeads, derives the tonic from the context and sets the note-names property. Cheers, Valentin Am Samstag, 8. Oktober 2022, 01:27:53 CEST schrieb Craig Bakalian: > Hi Karlin, > > No, that's the issue. It would be a \markup of do, re, mi, fa, so, la, > and ti in each note head according to whatever key is declared. So, in > D major, where ever there is a d, d', or d, the syllable do would be in > the note head, where ever there is an a, a''', or a,,, it would be so, > ect... > > I guess the code would need to know what \key was declared. > > But, nothing to observe out there that I know of. I am being creative, > imaginative, or inventive. > > Craig Bakalian > > On 10/7/22 3:42 PM, Karlin High wrote: > > On 10/7/2022 2:35 PM, Craig Bakalian wrote: > >> Is there a way to get solfege syllables into the easy note system? > > > > Probably, although I expect you will have to further define the result > > you want. Is there an example of such a product anywhere the community > > could observe, either online or posted attachment?
#(define solfeggio-list (list "do" "re" "mi" "fa" "so" "la" "ti")) % adapted from ly/music-functions-init.ly key = #(define-music-function (tonic pitch-alist) ((ly:pitch? '()) (number-pair-list? '())) (_i "Set key to @var{tonic} and scale @var{pitch-alist}. If both are null, just generate @code{KeyChangeEvent}.") #{ \override Staff.NoteHead.note-names = #(list->vector (append (list-tail solfeggio-list (- 7 (ly:pitch-notename tonic))) (list-head solfeggio-list (- 7 (ly:pitch-notename tonic))))) #(cond ((null? tonic) (make-music 'KeyChangeEvent)) ((null? pitch-alist) (ly:parser-error (G_ "second argument must be pitch list") (*location*)) (make-music 'SequentialMusic 'void #t)) (else (ly:music-transpose (make-music 'KeyChangeEvent 'tonic (ly:make-pitch 0 0 0) 'pitch-alist pitch-alist) tonic))) #}) \layout { \override Staff.NoteHead.note-names = #(list->vector solfeggio-list) } { \time 8/4 \easyHeadsOn c' d' e' f' g' a' b' c'' \key d\major cis' d' e' fis' g' a' b' cis'' \key e\major cis' dis' e' fis' gis' a' b' cis'' }
signature.asc
Description: This is a digitally signed message part.