I found a small visual bug where the HUD gets out of sync with the audio.
If you play a chord and then drop your left hand out of the camera frame, the audio correctly stops, but the letters for the last played chord (e.g., C(I)) stay permanently stuck on the screen.
In the requestAnimationFrame loop, the chordDisplayEl.textContent is only updated if (currentChord) exists.
Suggested Fix: Add an else block to clear the text content when no chord is detected:
javascript
if (currentChord) {
const chordName = getChordName(currentChord, isMajorMode);
chordDisplayEl.textContent = ${chordName}(${currentChord});
} else {
chordDisplayEl.textContent = "--";
}
I found a small visual bug where the HUD gets out of sync with the audio.
If you play a chord and then drop your left hand out of the camera frame, the audio correctly stops, but the letters for the last played chord (e.g., C(I)) stay permanently stuck on the screen.
In the requestAnimationFrame loop, the chordDisplayEl.textContent is only updated if (currentChord) exists.
Suggested Fix: Add an else block to clear the text content when no chord is detected:
javascript
if (currentChord) {
const chordName = getChordName(currentChord, isMajorMode);
chordDisplayEl.textContent =
${chordName}(${currentChord});} else {
chordDisplayEl.textContent = "--";
}