Chord

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.core" { graph [label="abjad.core"]; node [color=1]; "abjad.core.Chord.Chord" [URL="../api/abjad/core/Chord.html#abjad.core.Chord.Chord", color=black, fontcolor=white, label=Chord, target=_top]; "abjad.core.Component.Component" [URL="../api/abjad/core/Component.html#abjad.core.Component.Component", label=Component, shape=oval, style=bold, target=_top]; "abjad.core.Leaf.Leaf" [URL="../api/abjad/core/Leaf.html#abjad.core.Leaf.Leaf", label=Leaf, shape=oval, style=bold, target=_top]; "abjad.core.Component.Component" -> "abjad.core.Leaf.Leaf"; "abjad.core.Leaf.Leaf" -> "abjad.core.Chord.Chord"; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/core/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.core.Component.Component"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.core.Chord.Chord(*arguments)

Chord.

>>> chord = abjad.Chord("<e' cs'' f''>4")
>>> abjad.show(chord) 

Attributes Summary

__copy__ Shallow copies chord.
note_heads Gets note-heads in chord.
written_duration Gets written duration of chord.
written_pitches Written pitches in chord.

Special methods

__copy__(*arguments)

Shallow copies chord.

Returns new chord.

(Component).__format__(format_specification='')

Formats component.

Returns string.

(Component).__illustrate__()

Illustrates component.

Returns LilyPond file.

(Component).__mul__(n)

Copies component n times and detaches spanners.

Returns list of new components.

(Component).__repr__()

Gets interpreter representation of leaf.

Returns string.

(Component).__rmul__(n)

Copies component n times and detach spanners.

Returns list of new components.

(Leaf).__str__()

Gets string representation of leaf.

Returns string.


Read/write properties

note_heads

Gets note-heads in chord.

Gets note-heads in chord:

>>> chord = abjad.Chord("<g' c'' e''>4")
>>> abjad.show(chord) 
>>> abjad.f(chord.note_heads)
abjad.NoteHeadList(
    [
        abjad.NoteHead(
            written_pitch=abjad.NamedPitch("g'"),
            ),
        abjad.NoteHead(
            written_pitch=abjad.NamedPitch("c''"),
            ),
        abjad.NoteHead(
            written_pitch=abjad.NamedPitch("e''"),
            ),
        ]
    )

Sets note-heads with pitch names:

>>> chord = abjad.Chord("<g' c'' e''>4")
>>> abjad.show(chord) 
>>> chord.note_heads = "c' d' fs'"
>>> abjad.show(chord) 

Sets note-heads with pitch numbers:

>>> chord = abjad.Chord("<g' c'' e''>4")
>>> abjad.show(chord) 
>>> chord.note_heads = [16, 17, 19]
>>> abjad.show(chord) 

Set note-heads with any iterable.

Returns note-head list.

written_duration

Gets written duration of chord.

Get written duration:

>>> chord = abjad.Chord("<e' cs'' f''>4")
>>> abjad.show(chord) 
>>> chord.written_duration
Duration(1, 4)

Set written duration:

>>> chord = abjad.Chord("<e' cs'' f''>4")
>>> abjad.show(chord) 
>>> chord.written_duration = abjad.Duration(1, 16)
>>> abjad.show(chord) 

Set duration.

Returns duration.

written_pitches

Written pitches in chord.

Get written pitches:

>>> chord = abjad.Chord("<g' c'' e''>4")
>>> abjad.show(chord) 
>>> chord.written_pitches
PitchSegment("g' c'' e''")

Set written pitches with pitch names:

>>> chord = abjad.Chord("<e' g' c''>4")
>>> abjad.show(chord) 
>>> chord.written_pitches = "f' b' d''"
>>> abjad.show(chord) 
>>> chord.written_pitches
PitchSegment("f' b' d''")

Set written pitches with any iterable.

Returns tuple.