feat(keyboard_strip): add isNaturalKey predicate for piano-pattern overlay (S-VIEW-7)

This commit is contained in:
2026-07-27 13:26:08 -04:00
parent 3b9b78b82c
commit 858f736466
3 changed files with 70 additions and 1 deletions
+10
View File
@@ -118,4 +118,14 @@ ZoneBarHit zoneBarAtPoint(const StripLayout& layout, const int* lows, const int*
// key centre. Returns startNote unchanged for dxPixels==0.
int resolveDragNote(const StripLayout& layout, int startNote, int dxPixels);
// Returns true when `note` (0..127) is a NATURAL (white) key in standard 12-tone equal
// temperament; false when it is an ACCIDENTAL (black) key. Notes out of the [0,127]
// range are clamped to [0,127] before classification (i.e. this never throws/UBs on a
// bad input). The 12 semitone positions within an octave:
// Natural (white): 0(C) 2(D) 4(E) 5(F) 7(G) 9(A) 11(B)
// Accidental (black): 1(C#) 3(D#) 6(F#) 8(G#) 10(A#)
// Used by the shell to overlay the two-tone bright/dark piano-key pattern over the
// pastel spectral fill (S-VIEW-7). Pure — no layout required, no host types.
bool isNaturalKey(int note);
} // namespace reasampler::vst