The tuning system this note belongs to.
Steps from A4 (= 0). Can be negative (below A4) or positive (above).
Optional_name: stringOptional explicit name including octave (e.g. "Db4"). When provided,
overrides the computed name from the tuning system. Used by the parser to preserve
the original user notation (e.g. "Db4" vs "C#4").
Optional_preferFlats: booleanOptional flat/sharp preference for computed names. Propagated by
transpose() and set by Scale.getNotes() / Chord.getNotes() based on key context.
Ignored when _name is provided (the explicit name takes precedence).
Steps from A4 (= 0). Can be negative (below A4) or positive (above).
The tuning system this note belongs to.
Interval from A4 to this note in cents.
Frequency of this note in Hz.
The full note name including octave number (e.g. "C4", "Bb3", "F#5").
In 12-TET, the octave follows scientific pitch notation: C4 = middle C.
Uses the flat/sharp preference set at construction.
For an explicit override use getName({ preferFlats: true/false }).
Octave number relative to A4. A4–G#4 = octave 0, A5–G#5 = octave 1, A3–G#3 = octave −1.
Step position within one period (0 to octaveSteps - 1).
Equivalent to pitch class in 12-TET (0 = A, 3 = C, etc.).
The flat/sharp preference for this note's computed name.
Derived from the explicit _name (true if it contains a flat accidental)
or from the stored _preferFlats flag (false by default).
This value is propagated by transpose().
Octave number of the written name, in scientific pitch notation: C4 is middle C,
B3 is the note below it, and B#3 (same pitch as C4) keeps octave 3. Not the same as
octave, which counts from A4. Null when the name carries no octave.
Returns true if this note has the same pitch as other, within a tolerance.
Maximum allowed frequency difference in cents (default: 1¢).
Returns the full note name including octave (e.g. "C4", "Bb3"), optionally overriding
the stored flat/sharp preference.
If an explicit name was set at construction, it is returned as-is (no re-spelling).
Otherwise, uses _preferFlats if set, then falls back to options.preferFlats, then sharps.
Optionaloptions: { preferFlats?: boolean }The same note in another tuning: the step of tuning that stands for the same 12-TET
note (TuningSystem.retuneStep). The written name and flat/sharp preference are kept.
The note in tuning, or null when this note stands for no 12-TET note or
tuning has no step for it.
Returns a new note transposed by the given number of steps in the same tuning system.
By whole octaves an explicit name keeps its letter (D#4 → D#5). Otherwise the name is
computed again, with the flat/sharp preference of _name or _preferFlats.
A single pitch in a given tuning system.
Position is stored as
stepsFromBase, an integer offset from A4 (step 0) within the tuning. The same step number means different frequencies in different tuning systems.