tonal_invert

tonal_invert(x: tuple[int, ...], y: tuple[int, ...] = (0, 0))

Returns the inversion of x on y.

The inversion is the value which is as far below y as x is above y.

Examples

>>> tonal_invert((2,4)) # The inversion of a Major Third is a Minor Sixth
(5, 8)
>>> tonal_invert((3,6)) # The inversion of a tritone is a tritone with a different name.
(4, 6)
>>> tonal_invert((4,7), (2,4)) # G is a min 3rd up from E. Down a min 3rd from E is C#.
(0, 1)
>>> tonal_invert((0,1,0))
(0, 11, 0)
>>> tonal_invert((0,1,0)) == tonal_sum((0,0,0), _negative_tuple((0,1,0)))
True