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(canvas, e) → {Array}
-
Overrides the default music21.stream.Stream#findNoteForClick
by taking into account systemsParameters:
Name Type Description canvasDOMObject 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#noteElementFromScaledX(scaledX, allowablePixels, systemIndex) → {music21.base.Music21Object|undefined}
-
Override the noteElementFromScaledX for Stream
to take into account sub measures...Parameters:
Name Type Description scaledXnumber allowablePixelsnumber systemIndexInt - Source:
Returns:
- Type
- music21.base.Music21Object | undefined
-
<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: