2011/6/23 Benkő Pál <benko....@gmail.com>: > >> 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? > > No, this tells what makes two notes enharmonic: > if their interval is a multiple of the enharmonic interval. > LilyPond represents intervals by pitches - a pitch represents > the interval from c' to the pitch, so deses' represents diminished second, > which is the standard E12 enharmonic interval.
Ah, i think i understand. >> 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'? > > there's no equivalent in the es minor scale, so it's untouched. > The basic idea is to use a set and change those pitches that have > an enharmonic equivalent in this set to that element - other pitches > are left as is. you can enhance the set to be complete like > { es f ges as bes ces des c d e g a }, > and then all notes will be transformed to one of these. Yes, i see! Clever. I want to test your code thoroughly, but many things keep me busy all the time... I hope to have more time in a few days. thanks, Janek _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel