Hi, 2011/6/20 Benkő Pál <benko....@gmail.com>: > hi Janek, > > well, it was nastier than I thought because of the current pitch > representation, > so I haven't done it as a patch but a standalone hack; there's also a > non-standard (E31) example. > > [...] > 2011/6/21 Felipe Gonçalves Assis <felipeg.as...@gmail.com>: > Enharmonicity is just an equivalence relation respecting the abelian > group structure of intervals/transpositions. You can represent it by a > quotient map or by its kernel. > > Your approach is representing the kernel, via its generators. This > is complicated. > > A much simpler idea is to represent the quotient map, which is a > particularly simple kind of function. > > [...]
Wow, thank you both! I don't think i would be able to write this at so high level of abstraction myself. I think i understand your explanation and i can roughly see what is going on in your code, except what the last argument(s) is (are) doing - why is it #(ly:make-pitch 0 1 -1) (which equals deses' IIUC)? Is this the "switch" which can be used to choose whether i want natural or double-accidentaled notes? I hope to be able to modify this function so it would read scale from key signature. But before i'll do this, i'm afraid there is a problem: should double-sharped notes be transformed into themselves and not natural ones? Your examples contained the only one double-sharped note which is transformed to a enharmonic equivalent (aisis -> ces), all other double sharped notes remain the same - i.e. \enharmonizeMusic \esMinor { gisis' } #et12-class #et12-octaves outputs gisis' - shouldn't it output a'? many thanks, Janek _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel