NoteFormatter
Defined in: packages/pleco-xa/src/scripts/xa-display.js:892
Note formatter for converting frequency/pitch values to musical note names
Extends
Section titled “Extends”AxisFormatter
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new NoteFormatter(
options?):NoteFormatter
Defined in: packages/pleco-xa/src/scripts/xa-display.js:899
Parameters
Section titled “Parameters”options?
Section titled “options?”Formatter options
string = 'C:maj'
Key signature (default: ‘C:maj’)
octave
Section titled “octave”number = 0
Octave offset (default: 0)
unicode
Section titled “unicode”boolean = true
Use unicode sharp/flat symbols (default: true)
Returns
Section titled “Returns”NoteFormatter
Overrides
Section titled “Overrides”AxisFormatter.constructor
Properties
Section titled “Properties”key:
string
Defined in: packages/pleco-xa/src/scripts/xa-display.js:901
noteNames
Section titled “noteNames”noteNames:
string[]
Defined in: packages/pleco-xa/src/scripts/xa-display.js:905
octave
Section titled “octave”octave:
number
Defined in: packages/pleco-xa/src/scripts/xa-display.js:903
unicode
Section titled “unicode”unicode:
boolean
Defined in: packages/pleco-xa/src/scripts/xa-display.js:902
Methods
Section titled “Methods”call()
Section titled “call()”call(
value):string
Defined in: packages/pleco-xa/src/scripts/xa-display.js:915
Format MIDI note number to note name
Parameters
Section titled “Parameters”number
MIDI note number
Returns
Section titled “Returns”string
Note name (e.g., “C4”, “A♯3”)
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