-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix #269672: Show selected notes on the Piano Keyboard #3488
Conversation
Good start but
|
And all these things will take much more than 15 minutes I spent on this code. So don`t know when the request will be done. |
@yukisaw so you did 80% of work for 20% of time. Since it is not must have functionality, it is better to spend more (free) time to finish it later, isn't it? |
1 Skipped |
mscore/pianotools.cpp
Outdated
Chord* chord = static_cast<Note*>(elements.front())->chord(); | ||
for (auto e : elements) | ||
{ | ||
if (e->type() != Element::Type::NOTE || static_cast<Note*>(e)->chord() != chord) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in master we're using isNote()
and toNote()
instead, here and in other places of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no isNote() and toNote() methods at MuseScore 2.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, didn't notice this was o(only) for 2.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure now it is worse than it was. I mean bit shift.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shifting bits is even worse than using 'minus'. What is going on?
Last one. That`s totally stupid. Was very easy solution on 22 lines. |
In 3.0 piano code was fully reworked. So, it will be impossible to merge it to 3.0. And 3.0 has good methods like pressPitch() and releasePitch() without operations on ints. So, maybe implement it in 3.0? |
You may make it by you own. |
@yukisaw I assume the last comment was addressed to me. I meant, implement it ONLY in 3.0 and avoid such unclear code in 2.2. I still don't understand the reason why we're implementing it. |
I am sensing that there are still issues with this PR. So I would like to offer #3489 as an alternative. |
#3489 looks better. |
https://musescore.org/en/node/269672