Hi lilyponders,
How to have the number inside ez-noteheads as the note head was magnified
the mme ::::::::::
\version "2.25.18"
\language "english"
#(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))))))
global = {
\key a \major
\numericTimeSignature
\time 4/4
\tempo "Moderate ma con moto" 4 = 81
}
sopranoVoice = \relative c'' {
\global
\dynamicUp
\override Score.BarNumber.break-visibility = ##(#t #t #t)
\set Score.currentBarNumber = #21
% Music follows here.
%%\repeat unfold 20 s1 \break
\easyHeadsOn
R1 R1 R1 |r2 r8 e,8 a8 b8 | \break %% 21-24
<>^\markup\box"B" cs8 cs8 cs16( d8) cs16( cs4) b8 a8 |b8 b8 a16(gs8) fs16( fs8) fs8 b8 cs8 |d8 d8 d16( e8) d16( d4) cs8 a8 |\break %% 25-27
}
verse = \lyricmode {
% Lyrics follow here.
齊 頌 讚
主 的 大 能 高 過 諸 天 遍 地 齊 頌 讚 主 的 智 慧 判 斷
}
\score {
\new Staff \with { \magnifyStaff #(magstep 5)
instrumentName = "Soprano"
shortInstrumentName = "S."
%% midiInstrument = "choir aahs"
} { \sopranoVoice }
\addlyrics { \verse }
\layout { %%%#(layout-set-staff-size 60)
ragged-right = ##t
\context {
\Voice
\consists \Ez_numbers_engraver
}
}
% \midi { % \tempo 4=81 %}
}
%% end of mme
Thank you for your help,
Ming Tsang