alphaTab.model.SpelledPitch
A pitch as it is written in notation: a diatonic step with an accidental in an octave.
Enharmonic spellings like F#3 and Gb3 share the same value but are distinct pitches.
Pitches are immutable, in JSON they are written as text like F#3.
class SpelledPitchPropertiesโ
alterโ
The accidental of the pitch in semitones: -2 = double flat, -1 = flat, 0 = natural, 1 = sharp, 2 = double sharp.
- JavaScript
- C#
- Kotlin
readonly alter: number;double Alter { get; }val alter: Doublechromaโ
The pitch class of the pitch in the range 0-11 (C = 0, C#/Db = 1 ... B = 11).
- JavaScript
- C#
- Kotlin
readonly chroma: number;double Chroma { get; }val chroma: Doubleoctaveโ
The octave of the written step in scientific pitch notation (C4 is the middle C).
The accidental does not change the octave: B#3 sounds like C4 and Cb4 sounds like B3.
- JavaScript
- C#
- Kotlin
readonly octave: number;double Octave { get; }val octave: Doublestepโ
The diatonic step (letter) of the pitch: 0 = C, 1 = D, 2 = E, 3 = F, 4 = G, 5 = A, 6 = B.
- JavaScript
- C#
- Kotlin
readonly step: number;double Step { get; }val step: Doublevalueโ
The MIDI value of the pitch (C4 = 60).
- JavaScript
- C#
- Kotlin
readonly value: number;double Value { get; }val value: DoubleMethodsโ
toNameStringโ
The written name of the pitch without octave, like C, F# or Bbb.
- JavaScript
- C#
- Kotlin
toNameString(): stringstring ToNameString()fun toNameString(): StringtoStringโ
The written name of the pitch with octave, like C4, F#3 or Bbb2.
- JavaScript
- C#
- Kotlin
toString(): stringstring ToString()fun toString(): String