Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Piano: keys getting stuck #28

Open
4 of 7 tasks
neonfuz opened this issue Jul 28, 2022 · 11 comments
Open
4 of 7 tasks

BUG: Piano: keys getting stuck #28

neonfuz opened this issue Jul 28, 2022 · 11 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@neonfuz
Copy link
Collaborator

neonfuz commented Jul 28, 2022

Usually when I hit at least 3 keys together, at least one gets stuck playing on chrome

To reproduce:

  • Open site in chrom{e,ium}
  • Spam keys (press 3+ keys together)

Types of stuck notes fixed:

  • Hold key and click
  • Events dropped before audio worklet initialized
  • key held while input focused
  • multi touching a single key
  • Firefox sticks on single tap on page load (from hack initialize?)
  • Firefox sticks on double tap gesture spam around key
  • alt-tab, console, etc (fixable by pressing key again, maybe wontfix)
@neonfuz neonfuz added the bug Something isn't working label Jul 28, 2022
@neonfuz neonfuz changed the title BUG: Piano: keys get stuck on chrome BUG: Piano: keys getting stuck Jul 28, 2022
@neonfuz
Copy link
Collaborator Author

neonfuz commented Jul 28, 2022

Found a method to get keys stuck on firefox:

  • press and hold a note on physical keyboard
  • click any other key
  • when everything is released, the first note will continue to play

@44100hertz

@neonfuz
Copy link
Collaborator Author

neonfuz commented Jul 29, 2022

I haven't been able to reproduce keys sticking on the latest prod

@neonfuz
Copy link
Collaborator Author

neonfuz commented Jul 29, 2022

OK so I can still get keys stuck but it's a bit hard to say how to reproduce. I got keys stuck when my computer was lagging a bit, makes me think it may be related to a race condition, possibly key release before the keydown is done processing somehow?

Also, holding a key and alt-tabbing, or clicking a different tab gets keys stuck.

44100hertz added a commit that referenced this issue Jul 31, 2022
previous fix was bad. Second attempt.
@44100hertz
Copy link
Collaborator

Remaining problems:

  1. Alt tab, opening console, etc. causes problems.
  2. Should add a panic button to just stop all playing notes for cases that can't be helped.

@neonfuz
Copy link
Collaborator Author

neonfuz commented Aug 2, 2022

Another way to get keys stuck: it's pretty easy to get one stuck as the audio worklet is firing up. I think instead of dropping key events we need to queue them up, or at least not fire events that will leave the chip in an inconsistent state.

@neonfuz
Copy link
Collaborator Author

neonfuz commented Aug 2, 2022

And another: hold a key and click a knob to focus the input.

@neonfuz neonfuz reopened this Aug 2, 2022
@neonfuz
Copy link
Collaborator Author

neonfuz commented Aug 13, 2022

All documented ways of getting the stuck knob have been fixed besides wontfix issues.

@neonfuz neonfuz closed this as completed Aug 13, 2022
@neonfuz neonfuz reopened this Aug 13, 2022
@neonfuz
Copy link
Collaborator Author

neonfuz commented Aug 13, 2022

Testing showed firefox mobile still gets stuck on pressing one key after loading.

Also oxygen os triple touch gestures seemed to interfere with pointerup events

@44100hertz
Copy link
Collaborator

44100hertz commented Aug 19, 2022

The octave selector is now sort of a panic button. This can be put on backburner.

@neonfuz
Copy link
Collaborator Author

neonfuz commented Aug 22, 2022

Maybe we should name it "silence" instead of panic

neonfuz pushed a commit that referenced this issue Aug 26, 2022
previous fix was bad. Second attempt.
@neonfuz neonfuz added this to the 0.1 milestone Aug 27, 2022
@neonfuz neonfuz modified the milestones: 0.1, 0.2 Sep 3, 2022
@neonfuz neonfuz reopened this Sep 3, 2022
@neonfuz
Copy link
Collaborator Author

neonfuz commented Sep 3, 2022

Moving this to 0.2, we should fix firefox touch for that release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants