PitchArrayColumn

class pitchtools.PitchArrayColumn(cells=None)

Pitch array column.

Example 1. A pitch array column:

>>> array = pitchtools.PitchArray(
...     [
...         [1, (2, 1), (-1.5, 2)],
...         [(7, 2), (6, 1), 1],
...         ]
...     )
>>> print(array)
[  ] [d'] [bqf    ]
[g'     ] [fs'] [ ]
>>> print(format(array.columns[0]))
pitchtools.PitchArrayColumn(
    cells=(
        pitchtools.PitchArrayCell(
            width=1,
            ),
        pitchtools.PitchArrayCell(
            pitches=[
                pitchtools.NamedPitch("g'"),
                ],
            width=2,
            ),
        ),
    )
>>> print(array.columns[0])
[  ]
[g'     ]

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" [color=1, group=0, label=AbjadValueObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.abctools.AbjadValueObject.AbjadValueObject"; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_pitchtools { graph [label=pitchtools]; "abjad.tools.pitchtools.PitchArrayColumn.PitchArrayColumn" [color=black, fontcolor=white, group=2, label=<<B>PitchArrayColumn</B>>, shape=box, style="filled, rounded"]; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadValueObject.AbjadValueObject" -> "abjad.tools.pitchtools.PitchArrayColumn.PitchArrayColumn"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

append(cell) Appends cell to pitch array column.
cell_tokens Gets cells items of pitch array column.
cell_widths Gets cell widths of pitch array column.
cells Gets cells of pitch array column.
column_index Gets column index of pitch array column.
depth Gets depth of pitch array column.
dimensions Gets dimensions of pitch array column.
extend(cells) Extends cells against pitch array column.
has_voice_crossing Is true when pitch array column has voice crossing.
is_defective Is true when pitch array column depth does not equal depth of parent array.
parent_array Gets parent array that houses pitch array column.
pitches Gets pitches in pitch array column.
remove_pitches() Removes pitches from pitch array cells in pitch array column.
start_cells Gets start cells in pitch array column.
start_pitches Gets start pitches in pitch array column.
stop_cells Gets stop cells in pitch array column.
stop_pitches Gets stop pitches in pitch array column.
weight Gets weight of pitch array column.
width Gets width of pitch array column.
__copy__(\*args) Copies Abjad value object.
__eq__(arg) Is true when arg is a pitch array column with pitch array cells equal to those of this pitch array column.
__format__([format_specification]) Formats Abjad object.
__getitem__(arg) Gets item arg from pitch array column.
__hash__() Hashes pitch array column.
__ne__(arg) Is true when pitch array column does not equal arg.
__repr__() Gets interpreter representation of Abjad object.
__str__() Gets string representation of pitch array column.

Read-only properties

PitchArrayColumn.cell_tokens

Gets cells items of pitch array column.

Returns tuple.

PitchArrayColumn.cell_widths

Gets cell widths of pitch array column.

Returns tuple.

PitchArrayColumn.cells

Gets cells of pitch array column.

Returns tuple.

PitchArrayColumn.column_index

Gets column index of pitch array column.

Returns nonnegative integer.

PitchArrayColumn.depth

Gets depth of pitch array column.

Defined equal to number of pitch array cells in pitch array column.

Returns nonnegative integer.

PitchArrayColumn.dimensions

Gets dimensions of pitch array column.

Returns pair.

PitchArrayColumn.has_voice_crossing

Is true when pitch array column has voice crossing. Otherwise false.

Returns true or false.

PitchArrayColumn.is_defective

Is true when pitch array column depth does not equal depth of parent array. Otherwise false.

Returns true or false.

PitchArrayColumn.parent_array

Gets parent array that houses pitch array column.

Returns pitch array.

PitchArrayColumn.pitches

Gets pitches in pitch array column.

Returns tuple.

PitchArrayColumn.start_cells

Gets start cells in pitch array column.

Returns tuple.

PitchArrayColumn.start_pitches

Gets start pitches in pitch array column.

Returns tuple.

PitchArrayColumn.stop_cells

Gets stop cells in pitch array column.

Returns tuple.

PitchArrayColumn.stop_pitches

Gets stop pitches in pitch array column.

Returns tuple.

PitchArrayColumn.weight

Gets weight of pitch array column.

Defined equal to the sum of the weight of pitch array cells in pitch array column.

Returns nonnegative integer.

PitchArrayColumn.width

Gets width of pitch array column.

Defined equal to 1 when pitch array column contains cells.

Defined equal to 0 when pitch array column contains no cells.

Returns 1 or 0.

Methods

PitchArrayColumn.append(cell)

Appends cell to pitch array column.

Returns none.

PitchArrayColumn.extend(cells)

Extends cells against pitch array column.

Returns none.

PitchArrayColumn.remove_pitches()

Removes pitches from pitch array cells in pitch array column.

Returns none.

Special methods

(AbjadValueObject).__copy__(*args)

Copies Abjad value object.

Returns new Abjad value object.

PitchArrayColumn.__eq__(arg)

Is true when arg is a pitch array column with pitch array cells equal to those of this pitch array column. Otherwise false.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

PitchArrayColumn.__getitem__(arg)

Gets item arg from pitch array column.

Returns pitch arrach cell.

PitchArrayColumn.__hash__()

Hashes pitch array column.

Required to be explicitly redefined on Python 3 if __eq__ changes.

Returns integer.

PitchArrayColumn.__ne__(arg)

Is true when pitch array column does not equal arg. Otherwise false.

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

PitchArrayColumn.__str__()

Gets string representation of pitch array column.

Returns string.