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(canvas, e) → {Array}

Overrides the default music21.stream.Stream#findNoteForClick
by taking into account systems

Parameters:
Name Type Description
canvas 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#noteElementFromScaledX(scaledX, allowablePixels, systemIndex) → {music21.base.Music21Object|undefined}

Override the noteElementFromScaledX for Stream
to take into account sub measures...

Parameters:
Name Type Description
scaledX number
allowablePixels number
systemIndex Int
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 .left and .top attributes for all contained measures

Source:
Music21j, Copyright © 2013-2016 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.4.3 on Wed Jul 26th 2017 using the DocStrap template.