Class: Accidental

music21.pitch. Accidental

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 escape

Type:
  • 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
accName number | string

the name, number, or modifier to set

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.