-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 harmonic keywheel ui #1695
Add harmonic keywheel ui #1695
Conversation
Neat idea. Can you post a screenshot? |
It looks odd to me to put F at the top. Every other diagram of the circle of fifths I have seen puts C at the top. |
I don't think the window needs its own Close button. There is already the window manager's close button. |
Not all window managers have a close button. Awesome for example does have one. Dialogs without close buttons are strange even stranger. It's existence also ensures the window handles key events correctly. |
You could make the dialog close when clicking on it like the cover art dialog.
What key events would this simple dialog need to handle? |
Thanks for working on this feature. I had not the chance to test the live code ( can´t build master with qt5 yet), so for now just some comments from looking at the screenshoot.
GIMP Palette
Name: Open Key Notation colors
Columns: 1
# Created for <https://mixxx.org/>
# Based upon Open Key Notation
# <https://www.beatunes.com/en/open-key-notation.html>
# licensed under CC0 1.0 Universal (CC0 1.0)
# <https://creativecommons.org/publicdomain/zero/1.0/>
252 73 73 1d/1m #FC4949
254 100 45 2d/2m #FE642D
249 140 39 3d/3m #F98C27
254 214 0 4d/4m #FED600
153 254 0 5d/5m #99FE00
66 254 62 6d/6m #42FE3E
10 213 143 7d/7m #0AD58F
10 231 231 8d/8m #0AE7E7
4 201 254 9d/9m #04C9FE
61 138 253 10d/10m #3D8AFD
172 100 254 11d/11m #AC64FE
253 63 234 12d/12m #FD3FEA
|
It can be a feature in the new three column library.It was designed exactly for such additional infos. |
I think we should be removing items from the menu bar so we can remove the menu bar entirely. Perhaps the place to this image would be somewhere in the library, but I don't want to make this little branch depend on the library redesign branch. So I think adding this design debt is okay for now. |
I didn't realize that the dialog responds to click events already. So I think the Close button is okay. |
@poelzi could you take care of the above issues in the next week? If so I think we could merge this for 2.2. |
Did not know there were official color wheel colors, thanks. I changed the svg to match those. @Be-ing The text is a simple replacement of the body in the template. I removed the traditional display so only on the custom setting something strange could be displayed. I don't see a way to easily ensure the text will fit the box. |
I'm confused. The last commit doesn't seem to change the behavior for me. However, I don't think it's a good approach. I want to see the diagram with traditional notation -- I just don't want to see all the keys listed multiple times in each sector. Thinking about it more, I'm a bit confused why this feature is even helpful with the numbered key notations because it is so easy to think of how keys are related with those notations. |
@Be-ing I think your custom settings are like traditional ? The reason for having also numbered wheel on it is to look up for example openkey or lancelot if you need it (b2b setting with someone using different notation). Also calculating the key pitch up/down will be in is not something I'm always 100% certain of while 140 bpm is hammering on your head. Ok, so, you want a extra layout just for traditional view without the static information used for orientation ? |
No, I checked that I am not using a custom notation.
Yes. |
Could this be used as editor for a |
clazy failed on Qt's autogenerated ui header?? |
Looks like it. Im changing it to a normal button now. |
A conflict has developed. Please merge upstream/main and resolve the conflict. |
@daschuer fixed |
src/dialog/dlgkeywheel.cpp
Outdated
} | ||
m_domDocument.setContent(&xmlFile); | ||
|
||
// FIXME(poelzi): try to prevent aspect ratio. This fails unfortunatelly |
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.
This is still an issue. I guess the close button shrinks the wheel too an egg.
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 don't see the View menu entry, F2 works.
I have left some more comments inline.
src/dialog/dlgkeywheel.cpp
Outdated
|
||
m_domDocument.save(stream, QDomNode::EncodingFromDocument); | ||
|
||
ui->graphic->load(str.toUtf8()); |
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.
You can omit the toUtf8()
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.
no, because a QString means load the file and we have the content here. I added a comment
src/dialog/dlgkeywheel.cpp
Outdated
QDomElement domElement; | ||
|
||
QDomNodeList node_list = m_domDocument.elementsByTagName(QStringLiteral("text")); | ||
for (int i = 0; i < node_list.count(); i++) { |
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.
Can this become a range based loop?
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.
no, the QDomNodeList API is very rudimentary.
@daschuer I moved the entry into the help menu, because it is more of a help then some feature that is switched in the view menu. |
The wheel still starts as flat. Once you grep the edge of it, it snaps into a round shape. I assume this happens, because the svg is loaded after the size is set. Maybe it is fixed if you swap it? |
Or maybe it helps to call resizeEvent() manually ...? |
@daschuer I tried that, does not work. I tried calling it on show(), after initialzation. I tried to actually resize the window on first show but this behaviour persists. I also don't understand why the left spacer only works when the window is very large, but not when the window is small. I think the SVG widget is just buggy in multiple places. |
I found one combination for at least 5.15 that seems to work |
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.
LGTM, Thank you for this nice addition.
Hopefully the users find the new menu entry.
we could put a color wheel icon in the tollbars so this is quickly available, also once we have switched to the hideable toolbar. |
If someone has time and willingness, the SVG could be replaced by a custom widget that draws the cicle and text. This way, it could become clickable and we could use it as a delegate in the key column. I found no way todetect which element was clicked. |
The keywheel widget is displayed blank. tested with 2.4.0-alpha-pre (build main r7757) macOS |
m_pViewKeywheel->setShortcut( | ||
QKeySequence(m_pKbdConfig->getValue( | ||
ConfigKey("[KeyboardShortcuts]", "ViewMenu_ShowKeywheel"), | ||
tr("F2", "Menubar|View|Show Keywheel")))); |
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.
This shortcut clashes with the existing shortcut for [Channel1],rate_perm_up
, see https://github.com/mixxxdj/mixxx/blob/main/res/keyboard/en_US.kbd.cfg#L43
thanks @esbrandt , fixes in pr |
Add a Dialog with the harmonic keywheel as a cheat sheet.
Clicking on the wheel will cycle through the different notations.
This is very useful on B2B cases when both DJs are using different notations.
Also it helps when using pitching to lookup the next key.
TODO: