> On 22 Dec 2019, at 11:05, Malte Meyn <[email protected]> wrote: > > Am 22.12.19 um 10:51 schrieb Hans Åberg: >> To simplify the writing of note input names, they might be separated into >> separate parts for pitch and accidentals (or intervals). Testing this, I >> made C++ code where one first reads the longest pitch name available in a >> table, and then proceeds for a succession of accidentals, also the longest >> available in a separate table, and it looks like nice. > > I’m not sure if I understand correctly, but if I do that won’t work for all > languages: In German “fes” is f-flat, while “f es” is f and e-flat, you > cannot know whether “es” is the suffix “-flat” or the complete pitch name > “e-flat”. And how about “feses”? That could be “f es es”, “fes es” or “f > eses”.
I do it in a way that is upwards compatible, specifically, if one puts all note names into the table, as is the case now, and no separate accidentals, the result is exactly the same as currently. Also, rather than writing pitch and accidental names separately with a separator like a space, I split the note name that is parsed, so that is also upward compatible, and avoids having to tweak the lexer and parser. So "f es” is two notes as before, whereas “fes” a single note. In German, one could this keep it as it is, or define the note names c d e f g a b h, plus the accidentals is es, and the microtonal accidentals ih eh. Doing the latter, “feses” is split up as “f es es”, and their pitch and alterations values added. But one gets more combinations, for example “fisih” and “fihis” will be the same, as they are split up as “f is ih” and “f ih is”. Also, any number of accidental names can follow the note name.
