Segment¶
-
abstract class
abjad.pitch.Segment.
Segment
(items=None, item_class=None)¶ Abstract segment.
Attributes Summary
__illustrate__
Illustrates segment. __str__
Gets string representation of segment. from_selection
Makes segment from selection. has_duplicates
Is true when segment has duplicates. 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.
-
__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.
-
(
AbjadObject
).__repr__
()¶ Gets interpreter representation of Abjad object.
Returns string.
-
(
TypedTuple
).__rmul__
(argument)¶ Multiplies
argument
by typed tuple.Returns new typed tuple.
-
__str__
()¶ Gets string representation of segment.
Returns string.
Methods
-
(
TypedTuple
).count
(item)¶ Counts
item
in collection.Coerces
item
.Returns nonnegative integer.
-
abstract
from_selection
(selection, item_class=None)¶ Makes segment from selection.
Returns new segment.
-
abstract
has_duplicates
()¶ Is true when segment has duplicates.
Returns true or false.
-
(
TypedTuple
).index
(item)¶ Gets index of
item
in collection.Coerces
item
.Returns nonnegative integer.
Read-only properties
-
(
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.
-