A convenience function that, given a list of pitch classes represented as integers
>>> a = pcToToneRow(range(12))
>>> matrixObj = a.matrix()
>>> print matrixObj
0 1 2 3 4 5 6 7 8 9 A B
B 0 1 2 3 4 5 6 7 8 9 A
...
>>> import random
>>> a = pcToToneRow([4,5,0,6,7,2,'a',8,9,1,'b',3])
>>> matrixObj = a.matrix()
>>> print matrixObj
0 1 8 2 3 A 6 4 5 9 7 B
B 0 7 1 2 9 5 3 4 8 6 A
...
A Stream representation of a tone row, or an ordered sequence of pitches.
inherits from: Stream, Music21Object
A Stream representation of a twelve-tone row, capable of producing a 12-tone matrix.
inherits from: ToneRow, Stream, Music21Object
TwelveToneRow attributes
- row¶
- A list representing the pitch class values of the row.
Attributes inherited from Stream: flattenedRepresentationOf, classNames, isFlat, isSorted
Attributes inherited from Music21Object: id, groups
TwelveToneRow properties
Properties inherited from Stream: measures, notes, pitches, duration, elements, flat, highestOffset, highestTime, isGapless, lily, lowestOffset, musicxml, mx, semiFlat, sorted
Properties inherited from Music21Object: offset, parent, priority
TwelveToneRow methods
- matrix()¶
Returns a TwelveToneMatrix object for the row. That object can just be printed (or displayed via .show())
>>> s37 = RowSchoenbergOp37().matrix() >>> print s37 0 B 7 8 3 1 2 A 6 5 4 9 1 0 8 9 4 2 3 B 7 6 5 A 5 4 0 1 8 6 7 3 B A 9 2 4 3 B 0 7 5 6 2 A 9 8 1 ...Methods inherited from Stream: append(), insert(), addGroupForElements(), allPlayingWhileSounding(), attachIntervalsBetweenStreams(), attributeCount(), augmentOrDiminish(), bestClef(), extendDuration(), extractContext(), findConsecutiveNotes(), findGaps(), getClefs(), getElementAfterElement(), getElementAfterOffset(), getElementAtOrAfter(), getElementAtOrBefore(), getElementBeforeElement(), getElementBeforeOffset(), getElementById(), getElementsByClass(), getElementsByGroup(), getElementsByOffset(), getInstrument(), getKeySignatures(), getMeasure(), getMeasureRange(), getMeasures(), getOffsetByElement(), getOverlaps(), getSimultaneous(), getTimeSignatures(), groupCount(), groupElementsByOffset(), index(), indexList(), insertAtNativeOffset(), isClass(), isSequence(), makeAccidentals(), makeBeams(), makeMeasures(), makeRests(), makeTies(), measureOffsetMap(), melodicIntervals(), pitchAttributeCount(), playingWhenAttacked(), plot(), pop(), prepareNotation(), remove(), repeatAppend(), repeatInsert(), replace(), scaleDurations(), scaleOffsets(), setupPickleScaffold(), shiftElements(), simultaneousAttacks(), splitByClass(), stripTies(), teardownPickleScaffold(), transferOffsetToElements(), transpose(), trimPlayingWhileSounding()
Methods inherited from Music21Object: addContext(), addLocation(), addLocationAndParent(), freezeIds(), getContextAttr(), getContextByClass(), getOffsetBySite(), getSiteIds(), getSites(), hasContext(), purgeLocations(), removeLocation(), searchParentByAttr(), setContextAttr(), setOffsetBySite(), show(), unfreezeIds(), unwrapWeakref(), wrapWeakref(), write()
An object representation of a 2-dimensional array of 12 pitches. Internal representation is as a Stream, which stores 12 Streams, each Stream a horizontal row of pitches in the matrix. This object is commonly used by calling the matrix() method of TwelveToneRow() (or a subclass).
>>> aMatrix = TwelveToneMatrix()
inherits from: Stream, Music21Object
A 12-tone row used in the historical literature. Added attributes to document the the historical context of the row.
inherits from: TwelveToneRow, ToneRow, Stream, Music21Object
HistoricalTwelveToneRow attributes
- composer¶
- The composers name.
- opus¶
- The opus of the work, or None.
- title¶
- The title of the work.
Attributes inherited from TwelveToneRow: row
Attributes inherited from Stream: flattenedRepresentationOf, classNames, isFlat, isSorted
Attributes inherited from Music21Object: id, groups
HistoricalTwelveToneRow properties
Properties inherited from Stream: measures, notes, pitches, duration, elements, flat, highestOffset, highestTime, isGapless, lily, lowestOffset, musicxml, mx, semiFlat, sorted
Properties inherited from Music21Object: offset, parent, priority
HistoricalTwelveToneRow methods
Methods inherited from TwelveToneRow: matrix()
Methods inherited from Stream: append(), insert(), addGroupForElements(), allPlayingWhileSounding(), attachIntervalsBetweenStreams(), attributeCount(), augmentOrDiminish(), bestClef(), extendDuration(), extractContext(), findConsecutiveNotes(), findGaps(), getClefs(), getElementAfterElement(), getElementAfterOffset(), getElementAtOrAfter(), getElementAtOrBefore(), getElementBeforeElement(), getElementBeforeOffset(), getElementById(), getElementsByClass(), getElementsByGroup(), getElementsByOffset(), getInstrument(), getKeySignatures(), getMeasure(), getMeasureRange(), getMeasures(), getOffsetByElement(), getOverlaps(), getSimultaneous(), getTimeSignatures(), groupCount(), groupElementsByOffset(), index(), indexList(), insertAtNativeOffset(), isClass(), isSequence(), makeAccidentals(), makeBeams(), makeMeasures(), makeRests(), makeTies(), measureOffsetMap(), melodicIntervals(), pitchAttributeCount(), playingWhenAttacked(), plot(), pop(), prepareNotation(), remove(), repeatAppend(), repeatInsert(), replace(), scaleDurations(), scaleOffsets(), setupPickleScaffold(), shiftElements(), simultaneousAttacks(), splitByClass(), stripTies(), teardownPickleScaffold(), transferOffsetToElements(), transpose(), trimPlayingWhileSounding()
Methods inherited from Music21Object: addContext(), addLocation(), addLocationAndParent(), freezeIds(), getContextAttr(), getContextByClass(), getOffsetBySite(), getSiteIds(), getSites(), hasContext(), purgeLocations(), removeLocation(), searchParentByAttr(), setContextAttr(), setOffsetBySite(), show(), unfreezeIds(), unwrapWeakref(), wrapWeakref(), write()