IntervalRepresentation

IntervalRepresentation()

The representation of an Interval in a human-readable context, normally attached as an attribute of an Interval.

The methods required here are only a start, and each system will likely want to expose a specific API for various forms of notation and text output.

For an example implementation, see TonalVector._IntervalRepresentation:

>>> from openmusickit.systems.wsmn.tonal.tonal_vector import TonalVector
>>> interval = TonalVector((2, 4)).interval
>>> isinstance(interval, IntervalRepresentation), interval.unicode, interval.abbr
(True, 'major 3', 'maj3')

Attributes

Name Description
unicode The unicode representation.
ascii The ascii representation.