[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: enharmonic problem with \transpose - should we modify it?
From: |
Benkő Pál |
Subject: |
Re: enharmonic problem with \transpose - should we modify it? |
Date: |
Thu, 23 Jun 2011 10:55:08 +0200 |
>> 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 <address@hidden>:
>> 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.
>>
>> [...]
First of all, thank you, Felipe!
> 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.
> 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.
I hope I'll find some time in the weekend to deal with all these.
p
- enharmonic problem with \transpose - should we modify it?, Janek Warchoł, 2011/06/16
- Re: enharmonic problem with \transpose - should we modify it?, Benkő Pál, 2011/06/16
- Re: enharmonic problem with \transpose - should we modify it?, Janek Warchoł, 2011/06/16
- Re: enharmonic problem with \transpose - should we modify it?, Benkő Pál, 2011/06/16
- Re: enharmonic problem with \transpose - should we modify it?, Benkő Pál, 2011/06/20
- Re: enharmonic problem with \transpose - should we modify it?, Felipe Gonçalves Assis, 2011/06/21
- Re: enharmonic problem with \transpose - should we modify it?, Janek Warchoł, 2011/06/22
- Re: enharmonic problem with \transpose - should we modify it?,
Benkő Pál <=
- Re: enharmonic problem with \transpose - should we modify it?, Janek Warchoł, 2011/06/26
- Re: enharmonic problem with \transpose - should we modify it?, Benkő Pál, 2011/06/26