[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Function for rendering key textually in 3 languages
From: |
Olivier Biot |
Subject: |
Function for rendering key textually in 3 languages |
Date: |
Sun, 28 Oct 2012 15:54:43 +0100 |
Hi all,
I'd like to have a function to translate a key signature into the
textual representation of that key in 3 languages.
For instance, I'd write this in my score:
<raw>
header {
piece-key = "c#"
}
</raw>
and the rendering would look like this:
<raw>
\markup {"Cis moll." \italic { "Do dièse mineur." } "C sharp minor."}
</raw>
The logic I'm trying to implement, is (in pseudo-code):
1. key format = <key_name> [<accidentals>]
2. IF <key_name> is lowercase THEN key is minor ELSE key is major.
3. If accidentals are added, they pertain to the key name
How should I proceed?
Best regards,
Olivier
- Function for rendering key textually in 3 languages,
Olivier Biot <=