.. _moduleTreeNode: music21.tree.node ================= .. WARNING: DO NOT EDIT THIS FILE: AUTOMATICALLY GENERATED. PLEASE EDIT THE .py FILE DIRECTLY. .. automodule:: music21.tree.node ElementNode ----------- .. autoclass:: music21.tree.node.ElementNode .. rubric:: :class:`~music21.tree.node.ElementNode` bases - :class:`~music21.tree.core.AVLNode` - :class:`~music21.common.objects.SlottedObjectMixin` .. rubric:: :class:`~music21.tree.node.ElementNode` read-only properties .. autoattribute:: music21.tree.node.ElementNode.highestPosition .. autoattribute:: music21.tree.node.ElementNode.lowestPosition .. rubric:: :class:`~music21.tree.node.ElementNode` methods .. automethod:: music21.tree.node.ElementNode.updateEndTimes .. automethod:: music21.tree.node.ElementNode.updateIndices Methods inherited from :class:`~music21.tree.core.AVLNode`: .. hlist:: :columns: 3 - :meth:`~music21.tree.core.AVLNode.debug` - :meth:`~music21.tree.core.AVLNode.moveAttributes` - :meth:`~music21.tree.core.AVLNode.rebalance` - :meth:`~music21.tree.core.AVLNode.rotateLeftLeft` - :meth:`~music21.tree.core.AVLNode.rotateLeftRight` - :meth:`~music21.tree.core.AVLNode.rotateRightLeft` - :meth:`~music21.tree.core.AVLNode.rotateRightRight` - :meth:`~music21.tree.core.AVLNode.update` .. rubric:: :class:`~music21.tree.node.ElementNode` instance variables .. attribute:: ElementNode.endTimeHigh The highest endTime of any node in the subtree rooted on this node. .. attribute:: ElementNode.endTimeLow The lowest endTime of any node in the subtree rooted on this node. .. attribute:: ElementNode.payloadElementIndex The index in a stream of the element stored in the payload of this node. .. attribute:: ElementNode.subtreeElementsStartIndex The lowest element index of an element in the payload of any node of the subtree rooted on this node. .. attribute:: ElementNode.subtreeElementsStopIndex The highest element index of an element in the payload of any node of the subtree rooted on this node. Instance variables inherited from :class:`~music21.tree.core.AVLNode`: .. hlist:: :columns: 3 - :attr:`~music21.tree.core.AVLNode.balance` - :attr:`~music21.tree.core.AVLNode.height` - :attr:`~music21.tree.core.AVLNode.leftChild` - :attr:`~music21.tree.core.AVLNode.payload` - :attr:`~music21.tree.core.AVLNode.position` - :attr:`~music21.tree.core.AVLNode.rightChild` OffsetNode ---------- .. autoclass:: music21.tree.node.OffsetNode .. rubric:: :class:`~music21.tree.node.OffsetNode` bases - :class:`~music21.tree.node.ElementNode` - :class:`~music21.tree.core.AVLNode` - :class:`~music21.common.objects.SlottedObjectMixin` .. rubric:: :class:`~music21.tree.node.OffsetNode` read-only properties Read-only properties inherited from :class:`~music21.tree.node.ElementNode`: .. hlist:: :columns: 3 - :attr:`~music21.tree.node.ElementNode.highestPosition` - :attr:`~music21.tree.node.ElementNode.lowestPosition` .. rubric:: :class:`~music21.tree.node.OffsetNode` methods .. automethod:: music21.tree.node.OffsetNode.payloadEndTimes .. automethod:: music21.tree.node.OffsetNode.updateEndTimes .. automethod:: music21.tree.node.OffsetNode.updateIndices Methods inherited from :class:`~music21.tree.core.AVLNode`: .. hlist:: :columns: 3 - :meth:`~music21.tree.core.AVLNode.debug` - :meth:`~music21.tree.core.AVLNode.moveAttributes` - :meth:`~music21.tree.core.AVLNode.rebalance` - :meth:`~music21.tree.core.AVLNode.rotateLeftLeft` - :meth:`~music21.tree.core.AVLNode.rotateLeftRight` - :meth:`~music21.tree.core.AVLNode.rotateRightLeft` - :meth:`~music21.tree.core.AVLNode.rotateRightRight` - :meth:`~music21.tree.core.AVLNode.update` .. rubric:: :class:`~music21.tree.node.OffsetNode` instance variables .. attribute:: OffsetNode.payload The contents of the node at this point. Usually a list of ElementTimespans or PitchedTimespans. >>> score = tree.makeExampleScore() >>> scoreTree = tree.fromStream.asTimespans(score, flatten=True, ... classList=(note.Note, chord.Chord)) >>> print(scoreTree.rootNode.debug()) L: L: R: R: L: R: R: >>> scoreTree.rootNode.payload [>] >>> scoreTree.rootNode.leftChild.payload [>] >>> for x in scoreTree.rootNode.leftChild.rightChild.payload: ... x ... > > >>> scoreTree.rootNode.rightChild.payload [>] .. attribute:: OffsetNode.payloadElementsStartIndex The timespan start index (i.e., the first x where s[x] is found in this Node's payload) of only those timespans stored in the payload of this node. .. attribute:: OffsetNode.payloadElementsStopIndex The timespan stop index (i.e., the last x where s[x] is found in this Node's payload) of only those timespans stored in the payload of this node. Instance variables inherited from :class:`~music21.tree.node.ElementNode`: .. hlist:: :columns: 3 - :attr:`~music21.tree.node.ElementNode.endTimeHigh` - :attr:`~music21.tree.node.ElementNode.endTimeLow` - :attr:`~music21.tree.node.ElementNode.payloadElementIndex` - :attr:`~music21.tree.node.ElementNode.subtreeElementsStartIndex` - :attr:`~music21.tree.node.ElementNode.subtreeElementsStopIndex` Instance variables inherited from :class:`~music21.tree.core.AVLNode`: .. hlist:: :columns: 3 - :attr:`~music21.tree.core.AVLNode.balance` - :attr:`~music21.tree.core.AVLNode.height` - :attr:`~music21.tree.core.AVLNode.leftChild` - :attr:`~music21.tree.core.AVLNode.payload` - :attr:`~music21.tree.core.AVLNode.position` - :attr:`~music21.tree.core.AVLNode.rightChild`