chordtools.Chord

Inheritance diagram of abjad.tools.chordtools.Chord.Chord.Chord

class abjad.tools.chordtools.Chord.Chord.Chord(*args, **kwargs)[source]

Abjad model of a chord:

abjad> Chord([4, 13, 17], (1, 4))
Chord("<e' cs'' f''>4")

Return chord instance.

Read-only Properties

Chord.duration_in_seconds

Note

Inherited from leaftools.Leaf

Chord.fingered_pitches[source]

Read-only fingered pitches:

abjad> staff = Staff("<c''' e'''>4 <d''' fs'''>4")
abjad> glockenspiel = instrumenttools.Glockenspiel()(staff)
abjad> instrumenttools.transpose_notes_and_chords_in_expr_from_sounding_pitch_to_fingered_pitch(staff)
abjad> f(staff)
\new Staff {
    \set Staff.instrumentName = \markup { Glockenspiel }
    \set Staff.shortInstrumentName = \markup { Gkspl. }
    <c' e'>4
    <d' fs'>4
}
abjad> staff[0].fingered_pitches
(NamedChromaticPitch("c'"), NamedChromaticPitch("e'"))

Return tuple of named chromatic pitches.

Chord.format

Note

Inherited from leaftools.Leaf

Chord.leaf_index

Note

Inherited from leaftools.Leaf

Chord.marks

Read-only tuple of marks attached to component.

Note

Inherited from componenttools.Component

Chord.multiplied_duration

Note

Inherited from leaftools.Leaf

Chord.override

Read-only reference to LilyPond grob override component plug-in.

Note

Inherited from componenttools.Component

Chord.parent

Note

Inherited from componenttools.Component

Chord.preprolated_duration

Note

Inherited from leaftools.Leaf

Chord.prolated_duration

Note

Inherited from componenttools.Component

Chord.prolation

Note

Inherited from componenttools.Component

Chord.set

Read-only reference LilyPond context setting component plug-in.

Note

Inherited from componenttools.Component

Chord.sounding_pitches[source]

Read-only sounding pitches:

abjad> staff = Staff("<c''' e'''>4 <d''' fs'''>4")
abjad> glockenspiel = instrumenttools.Glockenspiel()(staff)
abjad> instrumenttools.transpose_notes_and_chords_in_expr_from_sounding_pitch_to_fingered_pitch(staff)
abjad> f(staff)
\new Staff {
    \set Staff.instrumentName = \markup { Glockenspiel }
    \set Staff.shortInstrumentName = \markup { Gkspl. }
    <c' e'>4
    <d' fs'>4
}
abjad> staff[0].sounding_pitches
(NamedChromaticPitch("c'''"), NamedChromaticPitch("e'''"))

Return tuple of named chromatic pitches.

Chord.spanners

Read-only reference to unordered set of spanners attached to component.

Note

Inherited from componenttools.Component

Read/write Properties

Chord.duration_multiplier

Note

Inherited from leaftools.Leaf

Chord.note_heads[source]

Get read-only tuple of note heads in chord:

abjad> chord = Chord([7, 12, 16], (1, 4))
abjad> chord.note_heads
(NoteHead("g'"), NoteHead("c''"), NoteHead("e''"))

Set chord note heads from any iterable:

abjad> chord = Chord([7, 12, 16], (1, 4))
abjad> chord.note_heads = [0, 2, 6]
abjad> chord
Chord("<c' d' fs'>4")
Chord.written_duration

Note

Inherited from leaftools.Leaf

Chord.written_pitch_indication_is_at_sounding_pitch

Note

Inherited from leaftools.Leaf

Chord.written_pitch_indication_is_nonsemantic

Note

Inherited from leaftools.Leaf

Chord.written_pitches[source]

Get read-only tuple of pitches in chord:

abjad> chord = Chord([7, 12, 16], (1, 4))
abjad> chord.written_pitches
(NamedChromaticPitch("g'"), NamedChromaticPitch("c''"), NamedChromaticPitch("e''"))

Set chord pitches from any iterable:

abjad> chord = Chord([7, 12, 16], (1, 4))
abjad> chord.written_pitches = [0, 2, 6]
abjad> chord
Chord("<c' d' fs'>4")

Methods

Chord.append(note_head_token)[source]

Append note_head_token to chord:

abjad> chord = Chord([4, 13, 17], (1, 4))
abjad> chord
Chord("<e' cs'' f''>4")
abjad> chord.append(19)
abjad> chord
Chord("<e' cs'' f'' g''>4")

Sort chord note heads automatically after append and return none.

Chord.clear()[source]

Clear chord:

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

Return none.

Chord.extend(note_head_tokens)[source]

Extend chord with note_head_tokens:

abjad> chord = Chord([4, 13, 17], (1, 4))
abjad> chord
Chord("<e' cs'' f''>4")
abjad> chord.extend([2, 12, 18])
abjad> chord
Chord("<d' e' c'' cs'' f'' fs''>4")

Sort chord note heads automatically after extend and return none.

Chord.pop(i=-1)[source]

Remove note head at index i in chord:

abjad> chord = Chord([4, 13, 17], (1, 4))
abjad> chord
Chord("<e' cs'' f''>4")
abjad> chord.pop(1)
NoteHead("cs''")
abjad> chord
Chord("<e' f''>4")

Return note head.

Chord.remove(note_head)[source]

Remove note_head from chord:

abjad> chord = Chord([4, 13, 17], (1, 4))
abjad> chord
Chord("<e' cs'' f''>4")
abjad> chord.remove(chord[1])
abjad> chord
Chord("<e' f''>4")

Return none.

Special Methods

Chord.__and__(arg)

Note

Inherited from leaftools.Leaf

Chord.__contains__(arg)[source]
Chord.__delattr__()

x.__delattr__(‘name’) <==> del x.name

Note

Inherited from __builtin__.object

Chord.__delitem__(i)[source]
Chord.__eq__(arg)

True when id(self) equals id(arg).

Return boolean.

Note

Inherited from abctools.AbjadObject

Chord.__ge__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

Chord.__getitem__(i)[source]
Chord.__gt__(arg)

Abjad objects by default do not implement this method.

Raise exception

Note

Inherited from abctools.AbjadObject

Chord.__hash__() <==> hash(x)

Note

Inherited from __builtin__.object

Chord.__le__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

Chord.__len__()[source]
Chord.__lt__(arg)

Abjad objects by default do not implement this method.

Raise exception.

Note

Inherited from abctools.AbjadObject

Chord.__mul__(n)

Note

Inherited from componenttools.Component

Chord.__ne__(arg)

True when id(self) does not equal id(arg).

Return boolean.

Note

Inherited from abctools.AbjadObject

Chord.__or__(arg)

Note

Inherited from leaftools.Leaf

Chord.__repr__()

Note

Inherited from leaftools.Leaf

Chord.__rmul__(n)

Note

Inherited from componenttools.Component

Chord.__setattr__()

x.__setattr__(‘name’, value) <==> x.name = value

Note

Inherited from __builtin__.object

Chord.__setitem__(i, arg)[source]
Chord.__str__()

Note

Inherited from leaftools.Leaf

Chord.__sub__(arg)

Note

Inherited from leaftools.Leaf

Chord.__xor__(arg)

Note

Inherited from leaftools.Leaf

Table Of Contents

This Page