systems.wsmn.tonal.tonal_arithmetic

tonal_arithmetic

Add and subtract intervals, chromae, notes.

These functions operate on tuples of the form (d, c, o), where d is a required integer representing a diatonic value, c is a required integer representing a chromatic value, o is an optional integer representing an octave designation.

Functions

Name Description
tonal_sum Returns the value of x augmented by y.
tonal_diff Returns the value of x diminished by y.
tonal_invert Returns the inversion of x on y.
tonal_abs Returns the absolute distance in half steps from the origin (Middle C).
tonal_int Returns the directed (+/-) distance in half steps from the origin (Middle C).
tonal_higher_of Returns the higher pitch.
tonal_lower_of Returns the lower pitch
tonal_larger_of Returns the larger interval.
tonal_smaller_of Returns the smaller interval.
abs_interval Returns the smaller of: the given interval and its inversion.
tonal_abs_diff Returns an tuple representing the smallest difference between two tonal primitives.
abs_int_diff Returns the smallest number of half-steps between two tonal primitives.
tonal_nearest_instance Returns the location of an octave adjusted y that is closest to x.