lilypond-user
[Top][All Lists]
Advanced

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

Is it possible to adapt Numbers as easy note heads [0.07143] to solfege


From: MING TSANG
Subject: Is it possible to adapt Numbers as easy note heads [0.07143] to solfege ( d r m f s l t)?
Date: Mon, 29 Apr 2013 12:35:15 -0700 (PDT)

Hi lily users:

I like to print solfege ( d r m f s l t) on to the note-head.  The following snippet print numbers onto the note-head. Is it possible to adapt the following snippet to print solfege onto the note-head?

Thank for the help,
Ming.


Numbers as easy note heads [0.07143] - snippet


\version "2.16.2"
#(define Ez_numbers_engraver
(list
(cons 'acknowledgers
(list
(cons 'note-head-interface
(lambda (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))))))))
EzNum = {
\easyHeadsOn
\override Staff.StaffSymbol #'staff-space = #1.5 %1.4
\override Staff.StaffSymbol #'line-thickness = #1.5 %1.4
\override Staff.NoteHead #'font-size = #+3.2 %=3.0
\override Staff.Clef #'font-size = #+1.35 %1.25
\override Staff.TimeSignature #'font-size = #+1.35 %1.25
\override Staff.Accidental #'font-size = #+1.35 %1.25
\override Voice.NoteHead #'font-size = #-5.25 %-5.0
}
global = \key f\major \time 4/4
mux = \relative c' { \global \EzNum
c4 d e f g a b }
\score {
\new Staff { \mux}
\layout {
\context {
\Voice
\consists \Ez_numbers_engraver
}
}
}

reply via email to

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