Example #1
0
def get_base_chord(text):
    temp_str = ""
    for i in text:
        if not i == " " or not i == "\n":
            temp_str += i
        elif temp_str in all_chords:
            return get_tone(temp_str)
    return None
Example #2
0
def get_chord(base, dist):
    t = (tones_indexed[get_tone(base)] + dist) % 12
    return tones_indexed.keys()[t]
Example #3
0
def semitone_distance(first_chord, second_chord):
    "Возвращаем число полутонов от первого до 2-го аккорда"
    return (tones_indexed[get_tone(second_chord)] - tones_indexed[get_tone(first_chord)]) % 12