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

Add possibility to play more than one key on piano #16

Open
felipefialho opened this issue Apr 17, 2018 · 8 comments
Open

Add possibility to play more than one key on piano #16

felipefialho opened this issue Apr 17, 2018 · 8 comments

Comments

@felipefialho
Copy link
Owner

No description provided.

@tota1099
Copy link
Contributor

@lfeh i'm trying developing this issue and i'm not to get success, because i cannot can get multiples keys events, just the last.

I believe that the idea from this issue is if the user press the keys "A" and "D" in the same time, so both piano keys should be pressed, but for now, just the last key is pressed.

Do you have some tip to do it? I'm searching about javascript event listener and for now, i don't have get success.

Thank you

@felipefialho
Copy link
Owner Author

Hey @tota1099, how are you?

Check if this example help you: http://jsfiddle.net/vor0nwe/mkHsU/

@tota1099
Copy link
Contributor

@lfeh i'm fine and you?

Sorry for arrive "out of thin air" but i'm trying start to make contributions in the github projects and i like your project and looks fine to start.

About your example, maybe i don't have understand right the idea:

The link when you click in the key "A" and "D" (example), the script just understand the "keydown" from the last key. If you remove the condictions if (!li) { [..] } and press both keys for some seconds, just the last key clicked that is added in the list.

You can see my example: https://jsfiddle.net/Tota1099/L86fec9j/1/

Press and hold the keys "A" and "D" in my example, just the last key clicked that will be showed.

I had understand that the idea from Piano is that the user can press two or more keys in the same time.
Do you can please explain better the idea? (if i have understand wrong)

Thank you :)

@felipefialho
Copy link
Owner Author

You are right.

I never try develop this issue and I can't think in a fast solution.

@fdaciuk Can you help us here?

@fdaciuk
Copy link

fdaciuk commented Feb 22, 2019

I can play a full accord =)
Is that the problem here?

@felipefialho
Copy link
Owner Author

@fdaciuk Do you know how to press multiple keys in same time using javascript?

@fdaciuk
Copy link

fdaciuk commented Feb 22, 2019

@felipefialho the same way you did on this project =)
I guess it is not a software limitation, but a hardware limitation. Some keyboards might have limitations about pressing more than one key at a time, but this project is working properly.

@felipefialho
Copy link
Owner Author

perfect, i had imagine it :/

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

No branches or pull requests

3 participants