Support multiple variation of a chord
yuma-m opened this issue · comments
As discussed in #54, some notes of a chord can be omitted as customary.
>>> note_to_chord(["C", "E", "G", "Bb", "D", "F"])
[<Chord: C11>]
# omit thrid
>>> note_to_chord(["C", "G", "Bb", "D", "F"])
[<Chord: C11>]
However, a quality can have only one combination of notes in the current implementation. It should support multiple combinations or omittable notes.
'11', [(0, 4, 7, 10, 14, 17), (0, 7, 10, 14, 17)]),
'11', Quality((0, 4, 7, 10, 14, 17), omittable=[4])),
Theoricallly you cannot say aht 0, 7, 10, 14, 17 is a 11th chord since it depend on what scale you are playing. If in your scale 3rd is minor 0, 7, 10, 14, 17 is in fact a m11 chord.
You can also choose to omit the 5th degree if it is neither diminished nor augmented. Omit some notes is just a choice of the player or the composer. Anyway, on a 11th chord you must play the 11th degree.
I would like to implement some classes related to all these aspect of the music theory in pychord. We can discuss on these subject while implementing these aspect if you are ok with that.
Anyway there is another problem to know in which scale you are playing. Let's say that by default, you are playing in the same scale that the time before the current time. If you want to change the scale or tone you must play the notes or one note which do not belong to the previous tone (or scale). But there is no mandatory rule, the composer or general the musician is free to do everything he wants. It may be very clever or interesting not use play immediately these notes (which do not belong to the previous scale) in order to make the transition more seamless/natural
Omittable notes
- Generally, note 7 (5th degree) is often omittable
- note 3 and 4 (3rd degree) are on a modal degree. 3rd degree is the most important degree which make the minor or major feeling. If you omit the 3rd degree you are introducing some blur about minor/major feeling. It is interesting if this is what you want to do. Some people may like it but others not.
- note 6 (degree 4 or 5) and 8 (degree 5 or 6) are generally not omittable since you want to listen to them (but once again, there is no real mandatory rule)
- degree 6 is a modal degree. Generally, you should not omit it otherwise you do not hear the 6th feeling
- degree 7 is generally not omittable
- If you play sus4 chord or 11th chord you cannot omit degree 4 or 11
- You cannot omit degree 13 (like degree 6)
So I'm not sure it's really possible to implement something consistent about omittable notes
Your example:
- (0, 4, 7, 10, 14, 17) is the real quality 11
- (0, 7, 10, 14, 17) may be called 11 or m11. It depends on the context around. It depends on which 3rd degree you are playing nearby (note 3 => Quality(m11), note 4 => Quality(11))
If you plan to be able to change QUALITY_DICT and/or other constants structure later, it is wise to implement them as a class as soon as possible in order to make future changes as seamless as possible
@koto-wheel I'm very sorry to take a long time to respond to this issue. I created pull-request #59 to provide a way to modify the default quality components.