lilypond-user
[Top][All Lists]
Advanced

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

Re: how to get "h" instead of "b" in notenames


From: Stefan Thomas
Subject: Re: how to get "h" instead of "b" in notenames
Date: Wed, 5 Nov 2014 08:53:05 +0100

Dear Jay,
thanks!
The code does exactly what I want!
Apparently, in the NoteNames context it defaults to Dutch. You can use the
following code to get what you want I think. b has been redefined to h in
the definition of newnames and the myNoteNames override to NoteName.stencil
makes this substitution.
 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.2"
\language "deutsch"
 e' { e1 g h d f }


newnames =
#`(("c" . "c")
   ("d" . "d")
   ("e" . "e")
   ("f" . "f")
   ("g" . "g")
   ("a" . "a")
   ("b" . "h")
   )




myNoteNames =
#(lambda (grob)
   (let* (
           ;; bindings
           (default-name (ly:grob-property grob 'text))
           (new-name (assoc-get default-name newnames))
           )
     ;; body
     (ly:grob-set-property! grob 'text new-name)
     (ly:text-interface::print grob)
     )
   )

\score {
  <<
    \new Staff \onthelines
    \new NoteNames \with { \override NoteName.stencil = #myNoteNames }
{\onthelines}
  >>
}

reply via email to

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