ChromaFormatter
Defined in: packages/pleco-xa/src/scripts/xa-display.js:1024
Chroma formatter for pitch class labels
Extends
Section titled “Extends”AxisFormatter
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ChromaFormatter(
options?):ChromaFormatter
Defined in: packages/pleco-xa/src/scripts/xa-display.js:1030
Parameters
Section titled “Parameters”options?
Section titled “options?”Formatter options
string = 'C:maj'
Key signature (default: ‘C:maj’)
unicode
Section titled “unicode”boolean = true
Use unicode sharp/flat symbols (default: true)
Returns
Section titled “Returns”ChromaFormatter
Overrides
Section titled “Overrides”AxisFormatter.constructor
Properties
Section titled “Properties”key:
string
Defined in: packages/pleco-xa/src/scripts/xa-display.js:1032
noteNames
Section titled “noteNames”noteNames:
string[]
Defined in: packages/pleco-xa/src/scripts/xa-display.js:1035
unicode
Section titled “unicode”unicode:
boolean
Defined in: packages/pleco-xa/src/scripts/xa-display.js:1033
Methods
Section titled “Methods”call()
Section titled “call()”call(
value):string
Defined in: packages/pleco-xa/src/scripts/xa-display.js:1045
Format pitch class to note name
Parameters
Section titled “Parameters”number
Pitch class (0-11)
Returns
Section titled “Returns”string
Note name
Overrides
Section titled “Overrides”AxisFormatter.call
format()
Section titled “format()”format(
value,index):string
Defined in: packages/pleco-xa/src/scripts/xa-display.js:849
Make formatter callable (JavaScript equivalent of Python’s call)
Parameters
Section titled “Parameters”number
Tick value
number
Tick index
Returns
Section titled “Returns”string
Formatted label
Inherited from
Section titled “Inherited from”AxisFormatter.format