tonal_higher_of
tonal_higher_of(x: tuple[int, ...], y: tuple[int, ...])Returns the higher pitch.
Examples
>>> tonal_higher_of((0,0,0), (0,11,-1)) # C, C-flat
(0, 0, 0)>>> tonal_higher_of((1, 1), (1, 3)) # D-flat, D-sharp | min2, Aug2
(1, 3)>>> tonal_higher_of((0,0,0),(0,10,0)) # C, C-flat
(0, 0, 0)On an enharmonic tie the higher diatonic position wins (a diminished fifth over an augmented fourth, C4 over B-sharp 3):
>>> tonal_higher_of((3, 6), (4, 6)) # aug4, dim5
(4, 6)
>>> tonal_higher_of((6, 0, -1), (0, 0, 0)) # B-sharp 3, C4
(0, 0, 0)