MING TSANG <[email protected]> wrote:
>
> This is my third post on the same subject. First time on Oct 14,
> Second time on Oct 19.  In the past, I get reply on the same day, and
> sometime 2 to 3 day later.  I don't know what happpen.
>
> Appreciate someone acknowledge receipt of the post.  Even better tell
> me is there any solution or it can't be done.

You subscribe to the list, right?  Then you should be able to see that
the message went through.  A lack of response usually means no one had
an immediately obvious answer.  People don't jump in to say "I don't
know", because it's not useful to have 50 such responses.


> I am seeking to print number beneath the note.  Refer to the png. 
> On Key C seems correct on "AA" "BB".
> On Key G only "AA" is correct and "BB" is wrong
> On Key E-flat, again "AA" is correct, and "BB" is wrong.
>
> Is it possible to resolve the \numer?

The code you have simply changes C to 1, and D to 2, etc.  It does not
look at the key signature.  What the code needs to do is subtract the
key signature base pitch from the pitch of the note being engraved,
modulo 7, and use that as a lookup to the string.  I am not sufficiently
versed in the Lilypond object model to know where the base pitch of the
current key signature lives.  Is it just the tonic property of the
pitch?  So the numbr code will look something like:

        (let* ...
             (scalestep (modulo
                       (- (ly:pitch-notename pitch) (...base of key
signature...)) 7))
             (name (format #f "~a~a"
                    (string-ref "1234567" (scalestep))...

assuming someone can point out what to substitute for my unknown quantity.

-- 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.

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

Reply via email to