new Part()
Part -- specialized to handle Measures inside it
- Source:
Extends
Methods
-
<static> Part#estimateStaffLength() → {number}
-
Overrides the default music21.stream.Stream#estimateStaffLength
- Source:
Returns:
- Type
- number
-
<static> Part#findNoteForClick(svg, e) → {Array}
-
Overrides the default music21.stream.Stream#findNoteForClick
by taking into account systemsParameters:
Name Type Description svgDOMObject eEvent - Source:
Returns:
[clickedDiatonicNoteNum, foundNote]
- Type
- Array
-
<static> Part#fixSystemInformation(systemHeight) → {Array}
-
Divide a part up into systems and fix the measure
widths so that they are all even.Note that this is done on the part level even though
the measure widths need to be consistent across parts.This is possible because the system is deterministic and
will come to the same result for each part. Opportunity
for making more efficient through this...Parameters:
Name Type Description systemHeight- Source:
Returns:
- Type
- Array
-
<static> Part#getMeasureWidths() → {Array.<number>}
-
Find the width of every measure in the Part.
- Source:
Returns:
- Type
- Array.<number>
-
<static> Part#getStreamFromScaledXandSystemIndex(xPxScaled, systemIndex) → {music21.stream.Stream}
-
Returns the measure that is at X location xPxScaled and system systemIndex.
Parameters:
Name Type Argument Description xPxScalednumber <optional>
systemIndexnumber <optional>
- Source:
Returns:
-
<static> Part#numSystems() → {Number}
-
How many systems does this Part have?
Does not change any reflow information, so by default it's always 1.
- Source:
Returns:
- Type
- Number
-
<static> Part#setSubstreamRenderOptions()
-
overrides music21.stream.Stream#setSubstreamRenderOptions
figures out the
.leftand.topattributes for all contained measures- Source:
-
<static> Part#systemIndexAndScaledY(y)
-
systemIndexAndScaledY - given a scaled Y, return the systemIndex
and the scaledYRelativeToSystemParameters:
Name Type Description ynumber the scaled Y
- Source:
Returns:
Array
systemIndex, scaledYRelativeToSystem