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"
> onthelines = \relative 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}
>   >>
> }
>
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to