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

piano metronome fix #4344

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

piano metronome fix #4344

wants to merge 6 commits into from

Conversation

Commanderk3
Copy link
Contributor

metro.mp4

@pikurasa I found that while using the metronome, it records the last rest note also. So when you switch it ON again next time, it adds the previous rest duration. In this PR, a rest note is not added when you start playing the piano after switching the metronome ON. Please watch the video.
But imagine a case where a user wants to add rest before starting. The user can turn ON the metronome, he will wait for the right time, and then start playing the piano. Currently, there is no implementation for this. Do you think this would make sense?

@Commanderk3 Commanderk3 marked this pull request as draft February 4, 2025 11:56
@Commanderk3
Copy link
Contributor Author

Now I am working on the countdown.

@pikurasa
Copy link
Collaborator

pikurasa commented Feb 5, 2025

I think this is an improvement.

However, I'm still experiencing a mysterious issue where rests are inserted between notes. Do you experience that, too, @Commanderk3 ?

You can see the issue in this test:
test3.webm

@Commanderk3
Copy link
Contributor Author

Commanderk3 commented Feb 5, 2025

@pikurasa Yes, I have tested it.
I will fix it.

@Commanderk3
Copy link
Contributor Author

Commanderk3 commented Feb 5, 2025

But apart from that one thing, I want to ask, why can't notes overlap? Each note value corresponds to only one note. Look at this image :
image

Notice how E6 and D6 have the same starting time but has different end time. We can't do this in music keyboard. Is it because we can't perform such actions in blocks?
Also you cant record playing chords, I will fix that too, maybe in a different PR.

@walterbender
Copy link
Member

You can do the E6/D6 thing if you put the D6 note inside the E6 note.

@Commanderk3
Copy link
Contributor Author

You can do the E6/D6 thing if you put the D6 note inside the E6 note.

Yup, it's working. Thank you.

@Commanderk3
Copy link
Contributor Author

The latest commits resolve the issue. The following features were added :->

  1. Added count-down box before music keyboard starts recording.

  2. When the metronome is ON it will highlight its background giving feedback that it is ON.

  3. Enhanced the existing implementation of recording rest duration. Added a threshold value "EPSILON" which can be changed according to need. Now it won't record any unnecessary rest notes.

Have a look at the demo video :->

metrofix.mp4

@walterbender @pikurasa Please review this PR. Any kind of feedback is welcome!

@Commanderk3 Commanderk3 marked this pull request as ready for review February 6, 2025 22:08
@walterbender
Copy link
Member

@pikurasa

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

Successfully merging this pull request may close these issues.

3 participants