Lineage¶
-
class
abjad.core.Lineage.
Lineage
(component=None)¶ Lineage of a component.
>>> score = abjad.Score() >>> staff = abjad.Staff( ... r"""\new Voice = "Treble Voice" { c'4 }""", ... name='Treble Staff', ... ) >>> score.append(staff) >>> bass = abjad.Staff( ... r"""\new Voice = "Bass Voice" { b,4 }""", ... name='Bass Staff', ... ) >>> score.append(bass)
>>> for component in abjad.inspect(score).lineage(): ... component ... <Score<<2>>> <Staff-"Treble Staff"{1}> Voice("c'4", name='Treble Voice') Note("c'4") <Staff-"Bass Staff"{1}> Voice('b,4', name='Bass Voice') Note('b,4')
>>> bass_voice = score['Bass Voice'] >>> for component in abjad.inspect(bass_voice).lineage(): ... component ... <Score<<2>>> <Staff-"Bass Staff"{1}> Voice('b,4', name='Bass Voice') Note('b,4')
Attributes Summary
__getitem__
Gets argument
.__len__
Gets length of lineage. component
The component from which the lineage was derived. components
Gets components. Special methods
-
(
AbjadObject
).__format__
(format_specification='')¶ Formats Abjad object.
Set
format_specification
to''
or'storage'
. Interprets''
equal to'storage'
.Returns string.
-
__getitem__
(argument)¶ Gets
argument
.Returns component or tuple.
-
__len__
()¶ Gets length of lineage.
Returns int.
-
(
AbjadObject
).__repr__
()¶ Gets interpreter representation of Abjad object.
Returns string.
Methods
Read-only properties
-
component
¶ The component from which the lineage was derived.
-
components
¶ Gets components.
Returns tuple.
-