Class: Part

music21.stream. Part

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 systems

Parameters:
Name Type Description
svg DOMObject
e Event
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
xPxScaled number <optional>
systemIndex number <optional>
Source:
Returns:
Type
music21.stream.Stream

<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 .left and .top attributes for all contained measures

Source:

<static> Part#systemIndexAndScaledY(y)

systemIndexAndScaledY - given a scaled Y, return the systemIndex
and the scaledYRelativeToSystem

Parameters:
Name Type Description
y number

the scaled Y

Source:
Returns:

Array systemIndex, scaledYRelativeToSystem

Music21j, Copyright © 2013-2018 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.5.5 on Wed Jul 4th 2018 using the DocStrap template.