Le dimanche 06 août 2023 à 18:36 +0200, Robin Bannister a écrit :

> David Kastrup wrote:
> 
> 
> > Note names have changed to use ♯ and ♭ characters, so you need to look
> > up "c♯" instead of "cis".
> 
> 
> I got no hits that way.


That's because the sharp sign is printed with \markup \accidental in the text 
property, i.e., (ly:grob-property grob 'text), but \accidental does not yet 
have a markup->string handler giving Unicode accidental characters.

Michael's solution works, but it will nullify the effect of certain 
NoteNames-specific properties like printOctaveNames.

I think the best solution here is

```
\version "2.24.1"

\layout {
  \context {
    \NoteNames
    noteNameFunction =
      #(lambda args
         #{ \markup \with-string-transformer #(lambda (layout props str) 
(string-upcase str))
                    #(apply note-name-markup args) #})
  }
}

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

\score {
 <<
    \new TabStaff \with {
      stringTunings = #bass-tuning
    }          
    { \music  }
    \new NoteNames { \music }
  >>
  \layout { }
  \midi { }
}
```

Best

Jean

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to