RootlessChordClass

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.pitch" { graph [label="abjad.pitch"]; node [color=1]; "abjad.pitch.IntervalSegment.IntervalSegment" [URL="../api/abjadext/tonality/../../abjad/pitch/IntervalSegment.html#abjad.pitch.IntervalSegment.IntervalSegment", label="Interval\nSegment", target=_top]; "abjad.pitch.Segment.Segment" [URL="../api/abjadext/tonality/../../abjad/pitch/Segment.html#abjad.pitch.Segment.Segment", label=Segment, shape=oval, style=bold, target=_top]; "abjad.pitch.Segment.Segment" -> "abjad.pitch.IntervalSegment.IntervalSegment"; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjadext/tonality/../../abjad/system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph "cluster_abjad.utilities" { graph [label="abjad.utilities"]; node [color=3]; "abjad.utilities.TypedCollection.TypedCollection" [URL="../api/abjadext/tonality/../../abjad/utilities/TypedCollection.html#abjad.utilities.TypedCollection.TypedCollection", label="Typed\nCollection", shape=oval, style=bold, target=_top]; "abjad.utilities.TypedTuple.TypedTuple" [URL="../api/abjadext/tonality/../../abjad/utilities/TypedTuple.html#abjad.utilities.TypedTuple.TypedTuple", label="Typed\nTuple", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" -> "abjad.utilities.TypedTuple.TypedTuple"; } subgraph "cluster_abjadext.tonality" { graph [label="abjadext.tonality"]; node [color=4]; "abjadext.tonality.RootlessChordClass.RootlessChordClass" [URL="../api/abjadext/tonality/RootlessChordClass.html#abjadext.tonality.RootlessChordClass.RootlessChordClass", color=black, fontcolor=white, label="Rootless\nChord\nClass", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=5]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } subgraph "cluster_collections.abc" { graph [label="collections.abc"]; node [color=6]; "collections.abc.Collection" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Collection", label=Collection, shape=oval, style=bold, target=_top]; "collections.abc.Container" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Container", label=Container, shape=oval, style=bold, target=_top]; "collections.abc.Iterable" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Iterable", label=Iterable, shape=oval, style=bold, target=_top]; "collections.abc.Reversible" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Reversible", label=Reversible, shape=oval, style=bold, target=_top]; "collections.abc.Sequence" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Sequence", label=Sequence, shape=oval, style=bold, target=_top]; "collections.abc.Sized" [URL="https://docs.python.org/3.6/library/collections.abc.html#collections.abc.Sized", label=Sized, shape=oval, style=bold, target=_top]; "collections.abc.Collection" -> "collections.abc.Sequence"; "collections.abc.Container" -> "collections.abc.Collection"; "collections.abc.Iterable" -> "collections.abc.Collection"; "collections.abc.Iterable" -> "collections.abc.Reversible"; "collections.abc.Reversible" -> "collections.abc.Sequence"; "collections.abc.Sized" -> "collections.abc.Collection"; } "abjad.pitch.IntervalSegment.IntervalSegment" -> "abjadext.tonality.RootlessChordClass.RootlessChordClass"; "abjad.system.AbjadObject.AbjadObject" -> "abjad.utilities.TypedCollection.TypedCollection"; "abjad.utilities.TypedTuple.TypedTuple" -> "abjad.pitch.Segment.Segment"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; "builtins.object" -> "collections.abc.Container"; "builtins.object" -> "collections.abc.Iterable"; "builtins.object" -> "collections.abc.Sized"; "collections.abc.Sequence" -> "abjad.utilities.TypedTuple.TypedTuple"; }

class abjadext.tonality.RootlessChordClass.RootlessChordClass(quality_string='major', extent='triad', inversion='root')

Rootless chord class.

Major triad in root position:

>>> abjadext.tonality.RootlessChordClass('major')
MajorTriadInRootPosition('P1', '+M3', '+P5')

Dominant seventh in root position:

>>> abjadext.tonality.RootlessChordClass('dominant', 7)
DominantSeventhInRootPosition('P1', '+M3', '+P5', '+m7')

German augmented sixth in root position:

>>> abjadext.tonality.RootlessChordClass('German', 'augmented sixth')
GermanAugmentedSixthInRootPosition('P1', '+M3', '+m3', '+A2')

Attributes Summary

__repr__ Gets interpreter representation of rootless chord-class.
cardinality Gets cardinality.
extent Gets extent.
extent_name Gets extent name.
from_interval_class_segment Makes new rootless chord-class from segment.
inversion Gets inversion.
position Gets position.
quality_string Gets quality string.
rotation Gets rotation.

Special methods

(TypedTuple).__add__(argument)

Adds typed tuple to argument.

Returns new typed tuple.

(TypedTuple).__contains__(item)

Is true if typed tuple contains item.

Coerces item.

Returns none.

(TypedCollection).__eq__(argument)

Is true when argument is a typed collection with items that compare equal to those of this typed collection.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

(TypedTuple).__getitem__(argument)

Gets item or slice identified by argument.

Returns item or new typed tuple.

(TypedTuple).__hash__()

Hashes typed tuple.

Returns integer.

(Segment).__illustrate__(markup_direction=Up, figure_name=None, **keywords)

Illustrates segment.

Returns LilyPond file.

(TypedCollection).__iter__()

Iterates typed collection.

Returns generator.

(TypedCollection).__len__()

Gets length of typed collection.

Returns nonnegative integer.

(TypedTuple).__mul__(argument)

Multiplies typed tuple by argument.

Returns new typed tuple.

(TypedTuple).__radd__(argument)

Right-adds argument to typed tuple.

__repr__()

Gets interpreter representation of rootless chord-class.

Returns string.

(Sequence).__reversed__()
(TypedTuple).__rmul__(argument)

Multiplies argument by typed tuple.

Returns new typed tuple.

(Segment).__str__()

Gets string representation of segment.

Returns string.


Methods

(TypedTuple).count(item)

Counts item in collection.

Coerces item.

Returns nonnegative integer.

(IntervalSegment).has_duplicates()

Is true if segment has duplicate items.

>>> intervals = 'm2 M3 -aug4 m2 P5'
>>> segment = abjad.IntervalSegment(intervals)
>>> segment.has_duplicates()
True
>>> intervals = 'M3 -aug4 m2 P5'
>>> segment = abjad.IntervalSegment(intervals)
>>> segment.has_duplicates()
False

Returns true or false.

(TypedTuple).index(item)

Gets index of item in collection.

Coerces item.

Returns nonnegative integer.

(IntervalSegment).rotate(n=0)

Rotates interval segment by index n.

Returns new interval segment.


Class & static methods

static from_interval_class_segment(segment)

Makes new rootless chord-class from segment.

>>> segment = abjad.IntervalClassSegment([
...     abjad.NamedInversionEquivalentIntervalClass('m3'),
...     abjad.NamedInversionEquivalentIntervalClass('m3'),
...     ])
>>> class_ = abjadext.tonality.RootlessChordClass
>>> class_.from_interval_class_segment(segment)
DiminishedTriadInRootPosition('P1', '+m3', '+d5')
>>> segment = abjad.IntervalClassSegment([
...     abjad.NamedInversionEquivalentIntervalClass('m3'),
...     abjad.NamedInversionEquivalentIntervalClass('M3'),
...     ])
>>> class_ = abjadext.tonality.RootlessChordClass
>>> class_.from_interval_class_segment(segment)
MinorTriadInRootPosition('P1', '+m3', '+P5')
>>> segment = abjad.IntervalClassSegment([
...     abjad.NamedInversionEquivalentIntervalClass('M3'),
...     abjad.NamedInversionEquivalentIntervalClass('m3'),
...     ])
>>> class_ = abjadext.tonality.RootlessChordClass
>>> class_.from_interval_class_segment(segment)
MajorTriadInRootPosition('P1', '+M3', '+P5')

Returns new rootless chord-class.

classmethod (IntervalSegment).from_selection(selection, item_class=None)

Makes interval segment from component selection.

>>> staff = abjad.Staff("c'8 d'8 e'8 f'8 g'8 a'8 b'8 c''8")
>>> abjad.IntervalSegment.from_selection(
...     staff,
...     item_class=abjad.NumberedInterval,
...     )
IntervalSegment([2, 2, 1, 2, 2, 2, 1])

Returns interval segment.


Read-only properties

cardinality

Gets cardinality.

>>> abjadext.tonality.RootlessChordClass('dominant', 7).cardinality
4

Returns nonnegative integer.

extent

Gets extent.

>>> abjadext.tonality.RootlessChordClass('dominant', 7).extent
7

Returns nonnegative integer.

extent_name

Gets extent name.

>>> abjadext.tonality.RootlessChordClass('dominant', 7).extent_name
'seventh'
inversion

Gets inversion.

>>> abjadext.tonality.RootlessChordClass('dominant', 7).inversion
0

Returns nonnegative integer.

(TypedCollection).item_class

Gets item class of collection.

Collection coerces items according to item_class.

Returns class.

(TypedCollection).items

Gets items in collection.

Returns list.

position

Gets position.

>>> abjadext.tonality.RootlessChordClass('dominant', 7).position
'root position'

Returns string.

quality_string

Gets quality string.

>>> abjadext.tonality.RootlessChordClass('dominant', 7).quality_string
'dominant'

Returns string.

rotation

Gets rotation.

>>> abjadext.tonality.RootlessChordClass('dominant', 7).rotation
0

Returns nonnegative integer.

(IntervalSegment).slope

Gets slope of interval segment.

The slope of a interval segment is the sum of its intervals divided by its length:

>>> abjad.IntervalSegment([1, 2]).slope
Multiplier(3, 2)

Returns multiplier.

(IntervalSegment).spread

Gets spread of interval segment.

The maximum interval spanned by any combination of the intervals within a numbered interval segment.

>>> abjad.IntervalSegment([1, 2, -3, 1, -2, 1]).spread
NumberedInterval(4)
>>> abjad.IntervalSegment([1, 1, 1, 2, -3, -2]).spread
NumberedInterval(5)

Returns numbered interval.