TonalSystem

TonalSystem(name: str, description: str, universal: bool = False)

A named system of tones, pitches, and intervals (see TemporalSystem for the temporal counterpart).

Every Tone and Interval reports its system through tonal_system, so that code combining them can refuse to mix systems. A universal system is one whose members belong to no system in particular (a SilentTone) and may be combined with anything.

To fully implement a TonalSystem:

  • Instantiate a TonalSystem with a name and description.
  • Subclass Tone along with PitchRepresentation
  • Subclass Interval along with IntervalRepresentation
  • Return the TonalSystem instance from their tonal_system property
  • Optionally, create a symbols module that instantiates and assigns commonly used Tones and Intervals to meaningfully named variables.

To implement a complete musical system, you might also create:

  • A TemporalSystem, using base classes defined in values.time.
  • Chords or other harmonic structures, subclassing ToneCollection.
  • Unpitched (percussion) tones, subclassing UnpitchedTone.
  • Structural units such as measures and sections; base classes for these do not exist yet.

All of these elements of a complete musical system are optional, and are decoupled from each other (there is no MusicalSystem class), so you are free to implement only what you need, as well as mix-and-match (for example, combining a TonalSystem from one musical culture with the TemporalSystem from another).

>>> lute = TonalSystem("Lute tablature", "Courses and frets")
>>> lute.name, lute.universal
('Lute tablature', False)
>>> from openmusickit.systems.wsmn.tonal.wsmn import WSMN
>>> WSMN.name
'Western Standard Music Notation'

Attributes

Name Description
name
description
universal

Methods

Name Description
compatible_with True if members of the two systems may be combined:

compatible_with

compatible_with(other: TonalSystem)

True if members of the two systems may be combined: the same system, or either one universal.

>>> from openmusickit.systems.wsmn.tonal.wsmn import WSMN
>>> WSMN.compatible_with(TonalSystem("Other", "..."))
False
>>> WSMN.compatible_with(ANY_TONAL_SYSTEM)
True