Skip to content

Bug: Chord display gets stuck on screen when left hand is removed #3

Description

@Raghuvaranlokati

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 = "--";
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions