lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Changed bar lines to follow snap size

Open BoredGuy1 opened this issue 2 years ago • 9 comments

Overview Vertical lines now appear or disappear depending on quantization value.

Vertical lines between bars are 1 pixel wide with no emboss. Vertical lines at the end of bars are now 2 pixels wide with 1 pixel emboss to make them stand out. (MIN_PIXELS_PER_BAR has been increased from 2 to 4 to compensate.)

To account for small quantization values, vertical lines between bars will automatically disappear as the user zooms out. (Vertical lines at the end of bars will not disappear.)

Related Threads #5111, #6420

Screenshots 2 bar quantization (big lines appear every other bar) 2 bar 1/2 bar quantization (big lines appear every bar, one small line appears within each bar) half bar 1/16 bar quantization (big lines appear every bar, 15 small lines appear within each bar) 16th bar

BoredGuy1 avatar Dec 29 '23 00:12 BoredGuy1

Good job. Nice to have this feature implemented but it would help if you could change the defaults too acc to #6420. IMO, 1/16 should be the default snapping with a bit of zoom in. That's what most daws follow these days.

Rossmaxx avatar Dec 29 '23 05:12 Rossmaxx

Alright, I'll do that.

BoredGuy1 avatar Dec 29 '23 18:12 BoredGuy1

Changed the colors a bit to make the coarse grid stand out more. The coarse grid, fine grid, and horizontal line colors can all be individually configured as QSS properties. The line widths are defined as constants in TrackContentWidget.cpp. image

BoredGuy1 avatar Dec 31 '23 01:12 BoredGuy1

The coarse grid width, fine grid width, emboss width, and horizontal line width are all configurable now as QSS properties, as well as the offset of the emboss. The default themes have been updated accordingly.

This does break backwards compatibility with old 1.2 themes, but I assumed that that was going to happen sooner or later with 1.3.

image

BoredGuy1 avatar Jan 17 '24 06:01 BoredGuy1

Requesting review from @michaelgregorius

Rossmaxx avatar Apr 16 '24 13:04 Rossmaxx

Hi @BoredGuy1,

thanks for your PR! I really like that the Song Editor now defaults to a more zoomed in view!

I'd like to propose to use a default quantization of 1/4 for the Song Editor though because it makes it look less "busy". It would also coincide with the tempo which is BPM, i.e. 1/4 notes per minute.

Heres a visual comparison of the two options:

SongEditor-1-16 SongEditor-1-4

Using 1/4 is also the default in REAPER to compare against another DAW:

SongEditor-REAPER-Comparison

michaelgregorius avatar Apr 16 '24 14:04 michaelgregorius

Hey @michaelgregorius, thanks for the review. And sorry for the late response (been busy).

I agree, default 1/4 definitely looks cleaner than 1/16. That should be an easy change. I think I'll be able to add that (along with all the requested changes) in the coming week.

BoredGuy1 avatar May 06 '24 07:05 BoredGuy1

OK, everything should be good now.

BoredGuy1 avatar May 07 '24 20:05 BoredGuy1

Ready for review again.

BoredGuy1 avatar May 09 '24 19:05 BoredGuy1

Ready for review again.

Still looks good to me. @DomClark, @zonkmachine and @Rossmaxx: Is it also good for you? There only seem to be resolved comments now.

michaelgregorius avatar May 16 '24 18:05 michaelgregorius

Yeah it's fine with me. Tbh 1/16 was too cluttered to begin with. Thanks to Michael to suggest the 1/4 snapping. I didn't know that 1/4 was supposed to be better.

LGTM

Rossmaxx avatar May 17 '24 02:05 Rossmaxx

Pull request #7271 fixes some performance problems that got introduced by this pull request due to missing initialization of some variables.

michaelgregorius avatar May 20 '24 13:05 michaelgregorius