lilypond-user
[Top][All Lists]
Advanced

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

Re: Need help displaying note names in 2.22


From: Silvain Dupertuis
Subject: Re: Need help displaying note names in 2.22
Date: Sun, 6 Aug 2023 16:49:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

Strange...
I tried a few things, but did not find a way to make it work.

I noticed  2 things :

1. In this association table :
chimenames =
#`(
    ("c" . "C")
    ("cis" . "C♯")
    ("d" . "D")
    ("es" . "E♭")
)
It only takes into account notes of names with one single character as the default-name, but it does print the new-note if it has more characters. I do not understand why...

2. In my version (2.24), I get a warning of a deprecated syntax for the _expression_
{\override NoteName #'stencil = #ChimeNoteNames }
saying it should be written with a dot notation
{\override NoteName.#'stencil = #ChimeNoteNames }
and the warning disappear with this notation


Le 06.08.23 à 01:11, Viktor Mastoridis a écrit :
Hello,

I have been using the syntax below for several years; the last code update I did was in December 2022, and it worked well since. 
Today I noticed that I can't get the sharp/flat note names properly.
C# & Eb are not displayed.
Can you please help?
-------------------


\version "2.22.1"
chimenames =
#`(
    ("c" . "C")
    ("cis" . "C♯")
   ("d" . "D")
      ("es" . "E♭")
   )

ChimeNoteNames =
#(lambda (grob)
    (let* ((default-name (markup->string (ly:grob-property grob 'text)))
           (new-name (assoc-get default-name chimenames)))
          (ly:grob-set-property! grob 'text new-name)
    (ly:text-interface::print grob)))

music = \relative c { c, cis d es }

\score
{
 <<
    \new TabStaff
    \with {
      stringTunings = #bass-tuning
    }          
      { \music  }
   
    \new NoteNames \with {\override NoteName #'stencil = #ChimeNoteNames }
    { \music }
  >>
  \layout { }  \midi { }
}


---
Viktor Mastoridis




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org

reply via email to

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