def transpose_notename(n, t): assert isinstance(n, basestring) assert isinstance(t, int) # 1 2 sekund # 3 4 ters # 5 6 kvart # 7 kvint # 8 9 sekst # 10 11 septim return int_to_octave_notename(notename_to_int(n) + t)
def compare_notenames(n1, n2): return notename_to_int(n1) - notename_to_int(n2)