bgr / mingus

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

Some minor code issues in progressions.py #119

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

I'm not a python head but as I am porting this to C++ I am finding a few 
logical errors here and there. I will report as I go along.

progressions.py

line 302 if ignore_suffix is True any elif will be ignored

    # Minor to major substitution
    if suff == 'm' or suff == 'm7' or (suff == '' and roman in ["II", "III", "VI"]) or ignore_suffix:
        n = skip(roman, 2)
        a = interval_diff(roman, n, 3) + acc
        if suff == 'm' or ignore_suffix:
            res.append(tuple_to_string((n, a, 'M')))
        elif suff == 'm7' or ignore_suffix:
            res.append(tuple_to_string((n, a, 'M7')))
        elif suff == '' or ignore_suffix:
            res.append(tuple_to_string((n, a, '')))
    return res

line 281..not really an issue but...

if r != None:
    suff = suff if suff == '7' else ''<--this does nothing no?
    res.append(tuple_to_string((r, acc, suff)))

Original issue reported on code.google.com by andreas....@gmail.com on 10 Feb 2013 at 2:27