-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
added pianoview context menu for first/last/base, fixed small reset v… #6259
base: master
Are you sure you want to change the base?
added pianoview context menu for first/last/base, fixed small reset v… #6259
Conversation
🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩
Linux
Windows
macOS🤖{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://output.circle-artifacts.com/output/job/2d2dc455-0e31-4e84-abff-8673cc789e8a/artifacts/0/lmms-1.3.0-alpha.1.223+g1ef676296-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17756?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/9617ba9d-361b-408f-b850-1254c9d6950b/artifacts/0/lmms-1.3.0-alpha.1.223+g1ef676296-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17758?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://output.circle-artifacts.com/output/job/84e43705-19b7-4e6d-aa46-54b09346a233/artifacts/0/lmms-1.3.0-alpha.1.223+g1ef676296-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17757?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/445fb3nhkmu00sd4/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/44129404"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/ann470ibqes4g0pw/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/44129404"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://output.circle-artifacts.com/output/job/cda2bec2-16fd-45ce-ba3b-ddb154d5a6dc/artifacts/0/lmms-1.3.0-alpha.1.223+g1ef676296-mac10.14.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/17759?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "38ff344d693aa6ba84f4a82893b3a99e8ad57af1"} |
I can understand why you didn't change the context menu of the black stripe, but let's brainstorm for a sec... The black stripe is where you click to move the arrow. So context menu that moves the arrow should intuitively be there too (besides on the piano key). There are other situations where a automatable control could benefit from special options in its context menu (for example the tempo box or time signature). I don't if there is a clean way to do this... |
Yes - it's where I started with the context menu first, but there is this functionality of getting the nearest marker for displaying the automation context menu. This gives us two possibilities:
I also wanted to display the key which gets to be selected in the header - I did this for the marker menu header so you see the marker key. So I tried 2) first, but I found it not very practical to use because it is relatively difficult to target the marker exactly with the right menu button. 1) on the other hand is difficult for displaying what is selected (marker) and what gets to be selected (key) and I wanted to avoid writing the key to each of the new entries (maybe a subheader would solve this) Another thing is that the selection of a key on the piano roll is easier than on the black bar. Of course we could remove the black bar restriction and show a combined context menu everywhere. So I get your argument, but I am not sure how to merge this two approaches (nearest marker and exact key including an intuitive selection) in one context menu in a clean way. |
@superpaik: thank you for the feedback. Yes - I also discovered the "cross key" behaviour, but it was already present so I didn't touch it. But I can fix it in the course of this PR. Regarding the black border: good idea. I will try if this improves the visibility. |
I understand the logic of having the context menu where the icon is displayed, but to me is better to have the context menu on the piano keys, because the action is "Set this exact key as... (base note, first, last key)". If context menu is on the black stripe that is no so clear. |
I think this PR is a big improvement. My concern is not that it is illogical with the new piano menu. Instead I think it may become so logical that users never realize that the black bar contains some extra features, because no one will ever click on it. Now people will argue that if you want to automate or MIDI-control base note you will know about this feature already. Still, could we "force" new users to discover these features, and not turn it into just another dev only feature? I'm trying to think of ways to find a middle ground. Problem that spawned this PR: Users can set base note but does not discover the note range setting. How about a TextFloat similar to the master volume? Print base note and note range. Whenever you click the black bar you'll see that there is a range setting possible. Problem created by this PR: Users spoiled with piano menu, will never click the black bar and discover all of its interactivity. What about forcing users to click it by removing the base note option from the menu? A bit of a regression yes, but is it really that different? With the new arrow it will still be an improvement, more visually clear that the bar is some form of control. |
@allejok96 : couldn't it be that the context menu on the piano roll would motivate people to try if there is also a context menu on the black bar? Or that they just click there because they don't expect that there would be a different context menu? And the question is generally if the new context menu can even solve the underlying problem that the first/last key including the automation menu is not very discoverable in the first place. For the automation menu the markers itself may need a different style so it would be more obvious that they are automatable controls - more 3D - like the usual knobs. |
Some proposals:
The "full" version: Or keep the white but with the thin "slider" line: Or simply classical but keep the text in the keys: |
The first proposal from @spechtstatt it's the best to me, though I know it may be not easy to move note names to keys. |
I have applied the changes so far - looks like this for now: I think it is more obvious now that these markers are a kind of control thing. The text rotation was a nightmare though :-) I also addressed the "crossing key" bug. It is not possible anymore to cross the first/last key with the mouse and also the key context menu disables the entry accordingly. And I added also the missing shortcut identifier for the "Set single key" menu. |
By the way: not sure if another master rebase was a good idea? |
Should I change this PR to "ready for review" or are there any change requests regarding the implementation? |
For some reason this PR includes the mixer rename commit. As I understand it, the only way you can push after a rebase is with |
So is it bad to do a master rebase from the lmms repo on the personal feature branch? I mean I could create a new branch and just sync my changes again (and add a new PR) if this is easier. How do you normally handle it if you want to update a branch? Because I am still not a git expert - far from it :-) |
I have no idea what's going on. It must be some github issue... |
Tested this git checkout master
git pull upstream master
git checkout -b messyPR
git rebase spechstatt/feature/pianoview-context-menu
git push --set-upstream origin/messyPR Tried making a PR. It included your commits followed by Broken datafile commit and the Clipboard rename commit (which shouldn't show as a part of the PR). So I removed those two and tried again:
Now your commit was the last one. Tried making a PR and everything seemed fine. |
Not in this situation. |
3f10d42
to
1945d97
Compare
I hope that I have fixed the commit issues - "files changed" looks now normal here. I repaired it like @allejok96 was suggesting. I used "git reflog" to identify the head xx number before the whole mess started. Then I used this number for the git "reset --hard HEAD@{xx}" command followed by a "git push -f" call. So this leads back to my question if I should set this PR "ready for review" now or if there are any further issues regarding my implementation? |
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.
Generally very good, just a few things that can be cleaned out.
Looks good. Go for it! Wait. I reviewed it anyway. 😄 doesn't matter you can change things later |
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 think we could trim it down just a bit more... I had this test code lying around.
Everything looks good, for what it's worth |
9484916
to
38a9172
Compare
@allejok96: this PR still shows that a change is requested from your side but I am not able to find the change request and I am also not able to resolve it. Is there anything you can do about it? |
Ah sorry, LGTM |
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.
Sorry for the massive delay in getting round to reviewing this again; allejok96 reminded me earlier today about it.
This basically all looks good to me now. I've left a few comments on things that could be cleaned up or tweaked, but nothing major.
…alue bug (use noteModel->displayName() instead of &title)
…alue bug (allekjok96's push instead of freeze approach)
…alue bug (applied DomClark's delegate/lampda suggestion)
38ff344
to
6d013fe
Compare
Does anyone have an idea how I can fix the mvsc errors? |
The MSVC builds were failing due to an upstream problem. It has now been fixed, so I've restarted them. They should hopefully pass without further changes. |
I tested this PR on Linux Mint 20.3, and everything seems to be working fine. However, I have one suggestion: if( n->selected() )
{
col = QColor( selCol );
}
const int borderWidth = borders ? 1 : 0; to this: if (n->selected())
{
col = QColor(selCol);
}
else if (!m_midiClip->instrumentTrack()->isKeyMapped(n->key()))
{
const int gray = qGray(col.rgb());
col.setRgb(gray, gray, gray, col.alpha());
}
const int borderWidth = borders ? 1 : 0; It will draw disabled notes as grayscale when they are not selected. |
This implements a context menu for the instrument piano view for setting the base note and the first/last key as discussed in the issue #6224. The context menu is only available in the key section of the PianoView. The automation context menu behavior in the black stripe above is not changed.
"Set single key" sets the first and last key so just a single key is left:
The menu entries are disabled accordingly if the operation would just set the same value as already set.
Additionally the shape of the base note marker is changed from a rectangle to an arrow:
A small bugfix is also applied - the value of the base note an the first/last key was set by a setInitValue call instead of setValue (seems to be the same bug as described in #6213). So the reset value reflects now the correct initial value as seen here:
The getNoteString method was moved to the PianoView an renamed to getNoteStringByKey to make it possible to use it from both the PianoRoll and the PianoView.