bgr / mingus

Automatically exported from code.google.com/p/mingus
GNU General Public License v3.0
1 stars 1 forks source link

chromatic intervals #120

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a suggestion for the addition of chromatic intervals to 
mingus.core.intervals (to allow for chromaticism within a key):

Diminished intervals:
Diminished First (d1)   Negative one half step (ex. C to B)
Diminished Second (d2)  Zero half steps (the same note; ex. D to D)
Diminished Third (d3)   Two half steps (ex. G# to Bb)
Diminished Fourth (d4)  Four half steps (ex. C# to F)
Diminished Fifth (d5)   Six half steps (ex. D to Ab)
Diminished Sixth (d6)   Seven half steps (ex. C to Abb)
Diminished Seventh (d7) Nine half steps (ex. D to Cb)
Diminished Eighth (d8)  Eleven half steps (ex. C to Cb)

Augmented intervals:
Augmented First (A1)    One half steps (ex. C to C#)
Augmented Second (A2)   Three half steps (ex. F to G#)
Augmented Third (A3)    Five half steps (ex. E to Gx)
Augmented Fourth (A4)   Six half steps (ex. D to G#)
Augmented Fifth (A5)    Eight half steps (ex. C to G#)
Augmented Sixth (A6)    Ten half steps (ex. G to E#)
Augmented Seventh (A7)  Twelve half steps (ex. E to Dx)
Augmented Eighth (A8)   Thirteen half steps (ex. F to F#)

And, to be thorough, perhaps even:
If the octave is kept track of.
Perfect intervals:
Perfect Unison(P1)            Zero half (ex. C-4 to C-4)
Perfect Octave(P8)            Thirteen half steps (ex. C-4 to C-5)

If you are open to it, I'd very much like to contribute. I have a BM in music 
theory from SFSU and am in my final term studying computer science at CSU 
Chico. Since this is a fairly simple issue could I try to work on this for you? 
Thank you.

Original issue reported on code.google.com by OrtalisM...@gmail.com on 20 Feb 2013 at 7:53

GoogleCodeExporter commented 9 years ago
I looked at the intervals.py file and I see now that you have functions for 
major and minor unisons, fourths and fifths. I think perfect intervals 
(unisons, fourths, fifths, octaves) are generally considered to be made 
diminished (rather than minor) when making the interval a half-step less and 
augmented (rather than major) when making the interval a half-step more. There 
may be some different naming conventions, but I think many users (such as 
myself) would be expecting diminished and augmented in place of minor and major 
in these cases.

In any case, some of these other chromatic intervals are without functions.

Original comment by OrtalisM...@gmail.com on 26 Feb 2013 at 4:34

GoogleCodeExporter commented 9 years ago
I have made some changes to intervals.py to fix the issues above, particularly 
that perfect intervals may be made diminished or augmented not minor and major, 
I've also added doubly diminished, doubly augmented. Other additions are 
diminished and augmented for all other intervals and redundant functions of 
first and unison intervals of all qualities since people might use either name 
- although I would think only a perfect unison would be referred to as a 
unison, and all others would be firsts. I have also modified determine() to 
reflect these interval names (particularly for perfect intervals).

If possible, I would like to officially contribute this file.

Original comment by OrtalisM...@gmail.com on 16 Apr 2013 at 6:11

Attachments: