-
Notifications
You must be signed in to change notification settings - Fork 821
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
Multiple Bug Fixes and Enhancements to Music Keyboard #2849
Multiple Bug Fixes and Enhancements to Music Keyboard #2849
Conversation
Whoa. Why is the hertz getting mixed with the letter names? That is a regression. |
@walterbender could you please share some more details? Do you mean for the hertz block in the clamp? Is it supposed to stay at top? |
Nothing to do with the clamp... On the keyboard itself, the D key was shifted over to the right to make room for the 262 hz. This is a serious regression. The keyboard layout is fixed. D has to always be next to C... |
@walterbender oh I see it now, apparently this was present from the start but somehow got unnoticed. Looking into it. Thanks Screen.Recording.2021-02-17.at.10.43.33.PM.mov |
I suspect that I only fixed it for when you launch, not when you add. But I suspect it is an easy fix. |
@walterbender Yes, that seems to be the case, works fine when relaunched but not updates properly. Apparently the issue was how the layout was being sorted. It seems to be fixed. But there's a similar regression when adding pitches too. Working on fixing that as well. Thanks Screen.Recording.2021-02-17.at.11.14.15.PM.mov |
@ksraj123 notice that you have introduced a minor regression, now new hertz keys added don't have keyboard keys designated to them after the first one is added. |
@ricknjacky I don't think this is a regression introduced by recent changes. Please see the |
Yes you're right.. although i was talking about the behaviour that's there on master i.e. musicblocks website, over there each key added gets a letter assigned to it.
Looking forward to this. |
The mapping of the computer keyboard to the virtual piano keyboard is never going to be perfect. But I suggest the following: An alternative approach could be to assume two octaves and use zxcvb and querty for white keys and asdfg and 12345 for black keys and ignore hertz. But either way, we'll eventually run out of keys. C'est la vie. |
Interesting, thanks for the insight. I had a query though, if at a certain point of time we're gonna run out of keyboard shortcuts... wouldn't it be erratic user experience to have shortcuts for some and not for the rest. As we run out of them.. is addkeyboardshortcut method unavoidable? Wouldn't we be better off without this method? speaking from my experience of working and using this widget... using mouse is fluent and intuitive. I presume thats what most users would prefer and use when using this widget. Also, most of add on functionalities like add button, modifying duration, change note type etc. are accessed using mouse. Your thoughts on this? |
We don't use short cuts for widget buttons right now, but we probably should. But I think that can live in parallel with the keyboard mapping described above. I think it is unusual for a user to have more than an octave or two but I do think being able to use the mapping is useful. |
…e on addition of pitch or hertz blocks
…hing widgetWindow
611d020
to
d14d3d0
Compare
@walterbender Can you please have a look, most of the issues have been fixed. The PR's starting comment updated to document the regressions fixed in this. Please point out if any regressions still remain. Thanks |
Thanks for your persistence. I think it is all working much better now -- more predictable and intuitive behavior. |
Updated
Bugs
Bug 1
When hertz blocks are added to the music keyboard widget then the hertz blocks get mixed up with notes. Ideally all heartz blocks should be present in the right most side arranged in increasing order of frequency. Relaunching the widget fixes this issue but that leads to bad user experience.
Screen.Recording.2021-02-17.at.10.43.33.PM.mov
Bug 2
When adding pitches, leftover pitches in the current octave are skipped and pitches from the next octave are included. Ideally it should move to pitches in the next octave after exhausting the current octave.
Screen.Recording.2021-02-18.at.5.59.05.AM.mov
In the video above we already had C, D, E, F and G in the 4th octave. If a next pitch is to be added then it should be A4 but we get G5 instead. We can see that everytime we close and reopen the widgetWindow and try to add a pitch then instead of the next pitch in the same octave, a pitch from the next octave is added.
Bug 3
There seems to be some issue with the fillChromaticGap function. When the noteList spans over more than 1 octave then C# is missing. This leads to some strange bugs when there are more than one octaves.
Bug 4
On adding pitches consecutively through the add menu of music keyboard, regression is encountered.
mbregression.mp4
Bug 5
On hitting corresponding key form the keyboard, non-existent accidental key appears.
Enhancements
Enhancement 1
When new pitches are added then the on screen keyboard and the matrix does not update. Ideally both the keyboard and table should update to include the newly added pitch.
Screen.Recording.2021-02-18.at.5.59.05.AM.mov
Enhancement 2
Key mapping between virtual and physical keyboard should be improved. QWERTY should be mapped to black keys and ASDF to white and numbers to hertz keys. Since the bindings are updated, corresponding on the physical keyboard are now displayed on the black keys as well.