Using other input language causes wrong ChordNames and the impossibilty to get english ChordNames
Since
commit 965a6070
Author: Valentin Villenave valentin@villenave.net
Date: Sat Feb 23 10:27:22 2019 +0100
Fix #1367: NoteNames context in any language
This substantially rewrites the Note_name_engraver,
offloading most of the translation to a Scheme
callback with several new user-exposed context properties.
A regtest and a new NR unnumberedsubsection have also been added.
the output for ChordNames in other languages may be wrong:
\language "deutsch"
\new ChordNames \chordmode { heses b h his hisis }
Hb is nonsense, should be B. Additionally it doesn't match the output of
\language "deutsch"
\new ChordNames \chordmode { \germanChords heses b h his hisis }
Which is wrong, too. Here Bb is nonsense should be Heses (not caused by above cited patch, though).
Afaict, there's no documentation that setting a different input language has impact on the ChordName.
Additionally, before this patch the ChordNames were per default always printed in english. Now there is no possibility to enter chords using an arbitrary language and get english chord-names. Thus I suggest to add the following to our source:
(define-public (note-name->english-markup pitch lowercase?)
(make-line-markup
(list
(list-ref '("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch))
(accidental->markup (ly:pitch-alteration pitch)))))
Example:
\language "deutsch"
\new ChordNames \chordmode {
\set chordRootNamer = #note-name->english-markup
heses b h his hisis
}
So we have a defect, a doc-issue and a feature-request.
Remark for users:
note-name->english-markup
as proposed here uses internal procedures. If you want to test it you need to place it in chord-name.scm or, in a ly-file, use the brute-force:
#(define-public (note-name->english-markup pitch lowercase?)
(make-line-markup
(list
(list-ref '("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch))
((@@ (lily) accidental->markup) (ly:pitch-alteration pitch)))))