new Accidental(accName)
Parameters:
| Name | Type | Description |
|---|---|---|
accName |
string | number | an accidental name |
- Source:
Extends
Members
-
alter :number
-
Return or set the alteration amount (-1.0 = flat; 1.0 = sharp; etc.)
When set, updates name and modifier.
Type:
- number
- Source:
-
modifier :string
-
Return or set the modifier ('-', '#', '')
When set, updates alter and name.
Type:
- string
- Source:
-
name :string
-
Return or set the name of the accidental ('flat', 'sharp', 'natural', etc.);
When set, updates alter and modifier.
Type:
- string
- Source:
-
<readonly> unicodeModifier :string
-
Returns the modifier in unicode or
for double and triple accidentals, as a hex escapeType:
- string
- Source:
-
<readonly> vexflowModifier :string
-
Returns the modifier for vexflow ('b', '#', 'n')
Type:
- string
- Source:
Methods
-
<static> Accidental#set(accName) → {undefined}
-
Sets a parameter of the accidental and updates name, alter, and modifier to suit.
Parameters:
Name Type Description accNamenumber | string the name, number, or modifier to set
- Source:
Returns:
- Type
- undefined