Class: WhiteKey

music21.keyboard. WhiteKey

new WhiteKey()

Defaults for a WhiteKey (width, height, keyStyle, keyClass)

Source:

Extends

Methods

addCircle(strokeColor) → {DOMObject}

Adds a circle (red) on the key (to mark middle C etc.)

Parameters:
Name Type Argument Default Description
strokeColor string <optional>
'red'
Inherited From:
Source:
Returns:
Type
DOMObject

addNoteName(labelOctaves) → {DOMObject}

Adds the note name on the key

Parameters:
Name Type Argument Default Description
labelOctaves Boolean <optional>
false

use octave numbers too?

Inherited From:
Source:
Returns:
Type
DOMObject

makeKey(startX) → {DOMObject}

Gets an SVG object for the key

Parameters:
Name Type Description
startX number

X position in pixels from left of keyboard to draw key at

Inherited From:
Source:
Returns:

a SVG rectangle for the key

Type
DOMObject

removeNoteName() → {undefined}

Removes the note name from the key (if exists)

Inherited From:
Source:
Returns:
Type
undefined
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.