mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Feature: Proposal for a cool looking gui #805

Closed Gero5 closed 1 year ago

Gero5 commented 1 year ago

I fumbled a little bit with design elements for a cool looking gui that could make Mac users happy and windows users jealous. :-)

I put it in dark mode because I personally think it looks cooler and it made it a little easier for me to put the elements together but it would work in light mode as well.

Bildschirm­foto 2023-03-29 um 13 56 34

Bildschirm­foto 2023-03-29 um 17 07 23

over all view

Audio presentation:

Control Buttons Play, Stop aso:

EQ, Pitch, Mix

Loop Editor for patter audio

What else?

Here is the look of the audio player for patter music: Bildschirm­foto 2023-03-29 um 14 27 55

mpogue2 commented 1 year ago

Very nice!

Can the Light view be derived algorithmically from the Dark view (or vise versa?)

Gero5 commented 1 year ago

re: Can the Light view be derived algorithmically from the Dark view (or vise versa?)

You can have it that way. Except for VU meter and the waveform you can simply invert all colors. Result looks like that: image This is not too bad for just inverted colors. I think "Figure 3" should have a color close to red, the mixer and the clock need little color adjustments. But that is only because I copied pictures that weren't really matched to the dark mode colors. remember it this just a design sketch.

I personally like the color gradient better from light on the top to a darker color below. light from above. It is, after all, the direction from which we have expected light to come since the dawn of time. :-)

So with a few adjustments it looks like this: Bildschirm­foto 2023-03-30 um 18 28 37

But I think we are far into details. Which one do you like?

mpogue2 commented 1 year ago

I personally like the "light" mode better, but that's just a personal preference. I know a lot of people like "dark" mode.

Overall, I really like the design. It addresses some of the UX ideas we've had in the past, and it addresses them way better than we've looked at in the past:

One of the big challenges here will be to get Qt components that have the professional look and feel that you've shown here in your mockups. My thinking is that we'd need to reuse components from another project, and Mixxx is probably the best candidate. It's open source, uses a very similar aesthetic, and works with Qt (which we also use for GUI building).

Although Mixxx is quite mature as an project, it has some limitations:

If you haven't checked out Mixxx yet, you should! If you're only looking for a music player (no lyrics, no SD, etc), it does a lot of what SquareDesk does, it's free, and it does look very cool.

Gero5 commented 1 year ago

Well, my first thought: 60 % of CPU is not worth the price for just a better look. But I do not think that that is really needed. In mockup I am using simple forms like lines, rectangles, triangles and circles. That is all. The waveform only is an object that is more on the complex side. The color gradients add the more professional impression. There must be a framework out there that allow simple forms with color gradients.

I do not know anything about qt... but my google search found that it allows to use some kind of style sheets for 'qtWidgets'. And color gradients can be defined. Qt Graphical Effect LinearGradient If we can add this QML type to the graphical elements of the gui then there would be hope. I do not have time to dive deeper into at the moment. Probably you could tell right away if this possible or far away from a promising approach.

mpogue2 commented 1 year ago

Some things are easier than others... :-)

Mostly easy/straightforward:

Medium:

Much more difficult:

If you would like to take a cut at some of these, e.g. by supplying artwork, I'm willing to help out by sticking it in and making a version available to you for viewing/testing! If you want to start somewhere simple, start with updating the clock! Right now the clock is all done in code, not with PNG artwork, so there's some code rewriting that would need to be done, but it's not too bad.

mpogue2 commented 1 year ago

Also note that if we can extract some of the controls from Mixxx, that makes some of these much simpler (e.g. the Mixxx sliders are really nicely done!). But, that extraction might be challenging.

mpogue2 commented 1 year ago

I'm also OK with making incremental changes toward this nicer GUI design. (I can #ifdef many or most of these, so we can always easily go back to the current way, if needed.)

Font example:

Adding this code to main.cpp changes the font used for everything in the app.

    QFont font("Avenir Next");
    QApplication::setFont(font);

And, the result looks like this:

image

Comparing that to the current font we use:

image

mpogue2 commented 1 year ago

A couple more comments, in random order:

Gero5 commented 1 year ago

re: I actually like the frame around the status stuff I thought about that too re: Due to the way Qt works, UI controls cannot be placed above the line established by the bottom of the tab control. So we need a little extra space above. It looks like this: Bildschirm­foto 2023-03-31 um 09 20 48

re:Loop editor is also needed for intro/outro points in a singing call. Don't get it.

re:EQ is probably needed for Patter from time to time. The idea was that you can close the loop editor with button at the bottom. EQ is displayed.

re: Volume is actually not used that often. maybe it could go to the same place that the EQ controls went If it is saved for the specific song that is far better. But we have to be aware of the fact that space is limited.

re: Avenir Next takes up more vertical room than the default font. I would say that is because it is another font. (Sorry...) Try google Font Montserrat as an alternative. Can we use one font for the display and the Standard Font for tab buttons, list aso. (which I would prefer) or is it one font for everything?

mpogue2 commented 1 year ago

re:Loop editor is also needed for intro/outro points in a singing call. On the Lyrics tab, the In and Out buttons are used to set precisely where the OPENING starts, and the CLOSER ends (respectively). Doing so makes the label accurately transition in time from OPENER --> FIGURE 1 --> FIGURE 2 --> etc.

re:EQ is probably needed for Patter from time to time. Ah, I didn't see that button! Would there be a way to get EQ back?

re: Can we use one font for the display and the Standard Font for tab buttons, list aso. (which I would prefer) or is it one font for everything? We can set a separate font for each separate widget, each separate widget type, or everything at once. I think my preference would be to avoid mixing fonts, especially if one of those is the default font. But, we have definitely have options here. It looks like it's possible to embed a font into SquareDesk. When I get a chance, I'll see what Montserrat looks like!

I'm also wondering whether there's some "margin" that I can set on the table cells, or some property on the font itself, that would force it to not use up so much vertical space.

On Mac OS, the default font and the Avenir Next font both seem to me to have the same height for the glyphs, but the vertical spacing is definitely larger for Avenir Next. I don't understand why this is so.

mpogue2 commented 1 year ago

More info:

    QFont font1 = QApplication::font();
    QFontMetrics fm1(font1);
    qDebug() << "metrics:" << fm1.height() << fm1.leading() << fm1.boundingRect("THIS IS A TEST.");

    QFont font2("Avenir Next");
    QFontMetrics fm2(font2);
    qDebug() << "metrics:" << fm2.height() << fm2.leading() << fm2.boundingRect("THIS IS A TEST.");

returns:

metrics: 16 0 QRect(0,-13 93x15)
metrics: 16 0 QRect(0,-12 80x16)

So, it does appear that Avenir Next strings are substantially narrower, and a bit taller (unexpected for me) compared to the default font.

We might compensate just by choosing a correspondingly smaller point size? I actually like the fact that horizontally the Avenir Next string uses many fewer pixels. That might give us better readability for longer song titles.

Hmmm...that's backwards from what I measure with a ruler...the default font can fit more characters horizontally. Not sure why the fontMetrics say otherwise.

Gero5 commented 1 year ago

font: In theory you are right. a font of size 16pt should have the same height. But then there is the Didot-point system and the Pica point system and both have slightly different sizes.

re: We might compensate just by choosing a correspondingly smaller point size? Give it try and see how it looks. Can you make a screenshot with an auto title displayed also?

Yes, Avenir Next takes more space for the same words. Note that is copyrighted font. So please check wether it is available on Linux systems as well.

Gero5 commented 1 year ago

re:Loop editor is also needed for intro/outro points in a singing call. Now I understand. I have not realized it before. Is there really much demand for this? for me the default worked quite well.

Any way if we replace the clock by a pure digital clock this will give us some space. the loop/position editor can go the left h side when we move the VU meter. The "Test Loop" button dissaperars on singing audios. The clock/VU and position editor could also trade left/right places but then there would be two time counters close together wich I do not like. Bildschirm­foto 2023-03-31 um 13 59 49

kevinmcdaniel commented 1 year ago

re:Loop editor Yes there is demand for controlling when the loop starts and stops. There are many new sources of music that don't conform to "standard square dance" length and timing. Being able to control the loop timing and having it saved with the song data for recall with eq values, tempo and volume.

Gero5 commented 1 year ago

re: Yes there is demand for controlling the loop starts and stops. Of course. I use that it for almost all of my patter music. Mike was mentioning that there are saved positions for singing calls as well. You can define the in and out positions and color bars as well as the OPENER/FIgure1... display will adjust to that. I was not aware of that feature so far and never used it for my singing calls. the default works well enough for me. Therefore that on was missing in the gui mockup. Now there is a solution for that as well.

kevinmcdaniel commented 1 year ago

Got it. I've not used the lyrics in 0.9.5 to any extent yet and have not modified the intro/outro timings. Thanks.

mpogue2 commented 1 year ago

@Gero5 Here are three screenshots, with text in the song title field:

Default font (seems like the most condensed in the X direction):

image

Avenir Next (nice, but a bit wide):

image

Montserrat (I'm not a big fan of this one, and it's super-wide. BUT, it's much better on glyph height):

image

mpogue2 commented 1 year ago

Ah, I learned something today! I can style the buttons for both gradient AND rounded corners at the same time using stylesheets:

    QString toolButtonGradient("QToolButton{background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F0F0F0, stop: 1 #A0A0A0);border-style: solid;border-color: #909090;border-width: 2px;border-radius: 8px;}");

    ui->previousSongButton->setStyleSheet(toolButtonGradient);
    ui->nextSongButton->setStyleSheet(toolButtonGradient);
    ui->playButton->setStyleSheet(toolButtonGradient);
    ui->stopButton->setStyleSheet(toolButtonGradient);

gives us this in context (this is just a quick test, so button spacing is not changed here):

image

@Gero5 Gradients I prototyped here are top to bottom -- or were you looking to use upper left to lower right instead?

Gero5 commented 1 year ago

Gradients: In the mockup I used top to bottom for

diagonal gradients for

mpogue2 commented 1 year ago

@Gero5 re: digital clock -- check out the "Clock Coloring" feature. I use it all the time at my dances... Turn it on in SquareDesk Preferences > Experimental (although it's been there for 5 years, and is really not experimental any more!), then play some patter music. A couple mins later, play a singing call. The coloring around the outside edge matches the selected colors for patter and singing call in Preferences. Super useful for break timing, and knowing whether tips are starting/ending on time or not.

image

mpogue2 commented 1 year ago

Here's a partial view of the Mixxx default skin:

image

What I like:

What I'm not sure about:

What I don't like:

mpogue2 commented 1 year ago

I've got a couple of dark mode widgets working in a separate Qt sandbox now, that are based on the look and feel of the Mixxx widgets (which I like). I'm using "Avenir Next" as the font for the song title and time-in-song. The widgets look like this (shown with tooltip that appears when hovering over the midrange knob):

image

Shown in this prototype above are: title, time-in-song, song-duration, labels for EQ knobs, 3 EQ knobs with random colors, volume slider, and tempo slider.

Next step is to stick these into SquareDesk (in an experimental dark mode tab, I think), and start playing around with the exact arrangement of the controls using the QtDesigner (doing this layout stuff with code is quite painful). I'm not going to tackle the waveform display quite yet (it's quite a bit more difficult than these dials and sliders, I think), so I'll probably just stick in a regular horizontal slider with brackets for the loop points for now, and update it later.

The looks for these new knobs and sliders are based on a couple of Mixxx SVG files, that are editable using Inkscape. (I'm following the general design language, not always the exact pixels).

The other components needed for an initial layout, like dark mode buttons, are pretty straightforward. I still need to think some more about best to do dark mode VU meter and clock components. I can probably do those pretty much the same way as the knob and slider components (using a QGraphicsScene).

mpogue2 commented 1 year ago

TODO:

Current state of the prototype layout:

image

NOTES:

mpogue2 commented 1 year ago

OK, here's where I am on the look-and-feel prototype. The controls are all live, but there is nothing being controlled behind the UI right now.

image

TODO:

mpogue2 commented 1 year ago

image

NEW:

TODO:

mpogue2 commented 1 year ago

Changed:

image

mpogue2 commented 1 year ago

Buttons hooked up [DONE]:

Labels hooked up [DONE]:

These controls still need to be hooked up (bidirectionally):

New control that needs to be hooked up for the first time:

Old controls that have no place in the new Dark Mode yet:

mpogue2 commented 1 year ago

BUG: All mySliders seem broken, when trying to click in the vein to move the slider to THAT position, it moves as if it's a Page Forward/Backward instead of a Jump To This Point. When the heck did I break that??!

mpogue2 commented 1 year ago

TODO: Loop controls disabled until song is loaded.

mpogue2 commented 1 year ago

I tweaked the purple color, to have the same S and V, and just change H (using HSV, then converting to RGB Hex). I think this is better for patter in Dark Mode (note: these are user-selectable already, so this would be a change to the default colors, not forced upon the user):

image

mpogue2 commented 1 year ago

Note to self: should probably horizontally center the digital time in the clock. It was centered when the hour was hh, but it's not centered now that the hour is just h.

mpogue2 commented 1 year ago

Commit 3c614d4d66389018afd09fba86b107e5c3ace6e3 .

Introduces new controls based on some SVG assets from Mixxx (open source). Follows the general UI look and feel of Mixxx. Some controls are hooked up, but many are still mockups (live, and you can play with them, but not really hooked up internally). Useful for trying out layout ideas. See screenshots in #805 for pics without having to build it yourself. To turn on the Dark Mode tab, uncomment line 216 in mainwindow.h . If the Dark Mode tab is not enabled, SquareDesk should see no changes to the normal GUI.

Gero5 commented 1 year ago

I appreciate that this gets some progress now. Thank you for the effort. my comments:

What I like:

suggestions/stimuli (of course all a matter of personal taste):

mpogue2 commented 1 year ago

@gero thanks for the comments! A couple of responses:

My goal right now is to finish wiring up the dark mode controls (so everything actually works), and let users actually try it in practice (and I am doing the same!). It's a separate tab, so you can switch back and forth between the old style and the new style (although I don't have switching between Dark and Light mode yet, so the Old style is also a weird semi-dark mode right now...).

Thanks again!

mpogue2 commented 1 year ago

TODO: VU meter reading is lower than old VU meter [FIXED: 12bcac03496cf84ad50c9b78e72bcb603f1e6db7]

Gero5 commented 1 year ago

Values for Tempo/Pitch/Volume/T/M/B: please suggest some color here for the text?

Use a light grey instead of white. Maybe the same color as the numbers 12/3/6/9 on the clock dial to get not too many variations.

mpogue2 commented 1 year ago

Commit: 9cccfda73a215c9a88468ddcc01eb3db8ce366a2

mpogue2 commented 1 year ago

TODO: dark VU meter flashes at startup

mpogue2 commented 1 year ago

Commit: 2b0d469560660da0ba908adedbd52a692c4f193a

Dark Tempo and Pitch sliders now hooked up. Dark EQ knobs (T/M/B) now hooked up. Made some minor color changes, including the change to a light gray as per suggestion above. Added a box around the clock, for consistency. I guess I do like this better than no frame around it! Made current time-in-song slightly larger than the track-duration, similar to Mixxx UI.

mpogue2 commented 1 year ago

TODO:

mpogue2 commented 1 year ago

Commit: 6a3a0eabd44ae5a9240a8e16a056af1ca28b6c17

Loop controls hooked up now, except the loop time displays are editable (but editing them does nothing -- they are only displaying the loop times).

Current look, after the above changes:

image

mpogue2 commented 1 year ago

Feature to fix Elvira: A way to set "song start", similar to "start loop", but the Cmd-. always goes back to the songStart position rather than 0.0 . I always hate it when I have to wait 5 seconds after PLAY to start hearing sound. This happens on just a couple of songs though.

This is in place of the unreliable "auto silence detection" experiment in #236 .

Gero5 commented 1 year ago

suggestions/stimuli:

loop time boxes are not hooked up yet. I wonder if I will ever use them, given that the beat/measure detection is working so well now!?

Nice if it does. So far I am adjusting the loop times for all of my patter music. Note that 80 % of the music I use for patter calls are not square dance productions but "normal" radio dance hits or EDM. Some of them have a long intro that I do not want to include in the loop. I do not think that this can be detected automatically. So I need to set individual loop times, please do not kill that. example: - loop starts at 0:41:353 https://www.youtube.com/watch?v=VuGQnP8ur6M

mpogue2 commented 1 year ago

Comments:

mpogue2 commented 1 year ago

Commit: 2c982fe431c2914245632cf2b9a3e0c678e12ff0

Minor updates to colors for consistency, including the clock hands (will likely make this user-selectable later). Enabled dark loop controls same as original loop controls on the Cuesheet tab. Added "#" column back in, as per original songTable.

Gero5 commented 1 year ago

Loop Times

a) retain the spin boxes for times? I think. you would say "yes"

YES, I do say yes. I need the hundredths of a second to adjust the the times. I am very picky that the loop jumps exactly on beat measurements and the jump is unheard by the dancers.

If you do not like the spin boxes on the surface: this is another "needed at prep time only" thing for me. So maybe a pop up window with the time settings will do? So it does not overload the gui with things that are not needed at calling times. It needs time boxes for start song, start loop, end loop, set buttons for each of them and the "test loop" button. Or a button / combination of keys to expand or fold the loop adjustment tool panel on the gui?

b) the "long intro" problem, which is the case with the song "Elvira"

Uh, I did not understand what the "Elvira" problem was a bout so far. If it is really 5 seconds of silence (level 0) without noise an automatic detection would be possible as well. I think the late start influences the time for the intro/figure indicators as well or doesn't it?

I'm considering ADDING a control, for a total of 3: song start (new), loop start (existing), loop end (existing). I think with your Mozart song (which I really like BTW!) would put the song start to 41.353, and the loop start could be sometime AFTER that point.

Actually, the Mozart song starts at 0 when I call it. When the beat comes up after 40 seconds it is always a nice surprise for the dancers. it gets some "Ah"s and "Oh"s comments from the floor. However there are other patter songs where I find a start time to be helpful. So far I truncate those songs in my DAW to make them fit for square dance purposes.

Gero5 commented 1 year ago

colors in general

I am trying to generally follow the Mixxx style, which I think is pretty well-designed.

As ever: Beauty is in the eyes of the beholder. Honestly it wouldn't be my first choice for a gui design model. what I consider to be a calm and clear design might be too boring for others. SVG files are much easier than putting up a whole developer's environment. Maybe I do find the time one far day...

mpogue2 commented 1 year ago

@Gero5

re: spin boxes I think you will like the beat/bar detection that will be in the next release. It works so well, I was questioning the need for the spin boxes. It detects the location of the beats, and the beats within a measure, and when you set the loop points, it will snap to the nearest beat (or to the nearest beat 1 of a measure), if snapping is enabled. I am also pretty picky about loop points, and this feature has eliminated 99% of my loop point fiddling, because it almost always gets it right (that is, the loop back is audibly seamless to me).

re: Elvira Yes, this song has 5 seconds of silence at the front. Adding a "start here" point will not affect the loop points. It will only effect where playback starts (if you don't force it back to the zero point). So, with Elvira, I will set it to 4.75s, and eliminate the long wait (during which I am wondering if it's crashed...it never has, but I always wonder during that long long 5 seconds!)

re: Mozart Ah, I see. Yes, some of those "edit in the DAW"s might be eliminated, if all you're doing is chopping off the front part of the song (like the situation I have with Elvira). If you are doing Fade Ins or Normalization or some other editing operations, this feature would not eliminate your DAW work.

re: beauty Yes, we all have different taste in design.... :-) The other nice thing about SVG's is that you can edit them with a text editor, if all you're doing is changing colors. I use Inkscape (free), and it works great, especially for changing colors, because I can immediately see the effect. I've also used the HSV color picker to change the color (hue), while leaving saturation and brightness alone. That was handy, and it's harder to do that kind of thing with just a text editor.

Gero5 commented 1 year ago

@mpogue2

re: beat/bar detection That sounds pretty cool. You've got me on the hook for the next beta. :-)

re: Normalization As you mention it: I was thinking if an auto normalization like streaming services have would be a feature for Square Desk. The motivation for that is that I adjust my modern music (radio dance music) to 80 - 90 percent volume otherwise my singing call are too low in volume. On the other hand my singing calls music files are already normalized to 0 dB. But those old productions are recorded differently compared to modern songs where every piece passed several compressors and limiters so the overall loudness impression is much higher. So rather than "auto normalization" it should be a "Adaptive Volume Level Adjust to Human Loudness Reception". I have no idea wether there are ways to calculate that. Even if there was one - adjusting the volume level of a patter music in comparison to the singing call that is played AFTER it is probably a big challenge.

mpogue2 commented 1 year ago

Re: normalization Check out "ReplayGain". I think it is exactly what you described. I had an implementation, but it did not work well, so I removed it. Perhaps I did not implement it correctly?