lilypond-user
[Top][All Lists]
Advanced

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

Re: Inserting Numbers into Noteheads


From: Neil Puttock
Subject: Re: Inserting Numbers into Noteheads
Date: Thu, 4 Aug 2011 19:49:17 +0100

On 3 August 2011 20:26, Bjorn <address@hidden> wrote:

> I need to insert numbers into the noteheads
> of sheet music and went to your help page:
> http://kainhofer.com/~lilypond/Documentation/notation/note-heads.html

This is a mirror of the latest documentation build.  I'd advise
bookmarking the official documentation instead:
http://lilypond.org/manuals.html

> It showed me how to insert the numbers for scales (1-7),
> but I was looking to insert them 1-12, from
> middle c up to Space 5 G for educational music
> I use at elementary schools.  Please help me to bypass the
> 7 number limit and use a scale of 12.  Thank
>  you for your help on this matter.

\version "2.14.2"

#(define ez_twelve_engraver
   (list
    (cons 'acknowledgers
          (list
           (cons 'note-head-interface
                 (lambda (engraver grob source-engraver)
                   (let* ((grob-pitch
                           (ly:event-property (event-cause grob) 'pitch))
                          (step (ly:pitch-steps grob-pitch))
                          (note-names
                           (make-vector 7 (number->string (1+ step)))))
                     (set! (ly:grob-property grob 'note-names)
note-names))))))))

#(set-global-staff-size 26)

\layout {
  \context {
    \Voice
    \consists \ez_twelve_engraver
  }
}

\relative c' {
  \easyHeadsOn
  c4 d e f
  g4 a b c
  d4 e f g
}

Cheers,
Neil



reply via email to

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