Hi, David,

Thank you for your info of adaption to generate number-pitch.
Questions:
1.  How do I put the number-pitch above the staff?
2.  How to make the font size smaller?
3.  How to align all number-pitch horizontally?


Below is a snippet & png:

\version "2.15.0" 
\include "english.ly"
namer =
#(make-engraver
(acknowledgers
((note-head-interface engraver grob source)
(let* ((event (ly:grob-property grob 'cause))
(pitch (ly:event-property event 'pitch))
(newgrob (ly:engraver-make-grob engraver 'TextScript event))
(name (format #f "~a~a"
(string-ref "1234567" (ly:pitch-notename pitch))
(assoc-ref 
'((-1/2 . "b") (0 . "") (1/2 . "#"))
(ly:pitch-alteration pitch)))))
(if (string= name "Hb")
(set! name "B"))
(set! (ly:grob-property newgrob 'text) name))))) 
mbk = \break
global = {\key c\major  \time 4/4  \tempo 4 = 100}
sopranonotes = \relative c''
{ \global 
%  r2.^\markup{\box A}  r8 e,8-3 | c'4.-1 ( b8-7) a4-6 b8-7 c8-1 | b4.-7 g8-5 
g2-5 | a4.-6 a8-6 g8-5 f8-4 e8-3 d8-2 | c4.-1 d8-2 e4.-3 e8-3 |\mbk
r2.^\markup{\box A}  r8 e,8 | c'4. ( b8) a4 b8 c8 | b4. g8 g2 | a4. a8 g8 f8 e8 
d8 | c4. d8 e4. e8 |\mbk
\bar "||"  \label #'lastPage
} 
harmonies = {
\chordmode {
s1 a1:m  e1:m  f2 g2  c2 e:7
}
}
SSlyricsA = \lyricmode { \set fontSize = #'1.0
%\set stanza = #"1. " 
願  聖  靈  此  刻  充  滿  我, 觸  摸  心  裡  的  一  切  苦  楚, 真
}
\score {
\new ChoirStaff <<
<<
\context ChordNames { 
\harmonies 
}
>> 
\new Staff << 
\global 
\new Voice = "soprano"  \with {\consists #namer }<< 
{           \sopranonotes        }
>>
>>
\new Lyrics \lyricsto "soprano" { \SSlyricsA   }
>>
\layout {
\context {          }
}
\midi {
\context {             }
}
}
 
Blessing in+,
Ming.


>________________________________
> From: David Kastrup <[email protected]>
>To: MING TSANG <[email protected]> 
>Cc: "[email protected]" <[email protected]> 
>Sent: Saturday, July 28, 2012 9:00:30 AM
>Subject: Re: lilypond-user Digest, Vol 116, Issue 62
> 
>MING TSANG <[email protected]> writes:
>
>> David Kastrup,
>>
>> Thank you for the link.  I only knew English and Chinese, no German;
>> but I manage to copy the namer.  It works.  I am a cobol programmer
>> and not able to adapt this "namer" to print number-pitch.   Appreciate
>> if you can help modify it to print number-pitch. 
>
>Well, there is a string "CDEFGAH" in the code.  Replacing that with
>"1234567" should likely do what you want.
>
>-- 
>David Kastrup
>
>
>

<<attachment: 2012-07-28_222243.png>>

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to