Skip to content
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

Grouped crates #13978

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Grouped crates #13978

wants to merge 10 commits into from

Conversation

Eve00000
Copy link
Contributor

@Eve00000 Eve00000 commented Dec 4, 2024

This is the solution I proposed in #5634, as it continued spinning in my head since sunday, I had to create it, I couldn't concentrate on anything else. A sideproject.
I hope I can make somebody happy with it.

In this PR I made an extra library feature by analogy to 'history' playlists.
In history playlists, playlists are 'grouped' on the year in creationdate.

For grouped crates you can select in options->preferences->library->grouped crates
to group crates based on a fixed length or a variable length with a delimiter (eg /////)

Grouped crates will make a 'group' for all crates starting with the same defined string.

This is NOT nested crates or multilevel crates, This adds 1 level, a grouping level to the cratesfeature.
For me this 1 level is more than enough but I can imagine that other people need a multilevel structure.

eg: if you have crates like
Pop - 60's
Pop - 70's
Pop - 80's
Pop - 90's
you can choose to group on 6 characters, the result will be:
group: Pop -
crates: 60's / 70's / 80's / 90's

or you can choose to use variable length with delimiter ' - ' the result will be:
group: Pop
crates : 60's / 70's / 80's / 90's

the advantage with variable length with delimiter is that the crates
Rock - 60's
Rock - 70's
Rock - 80's
Rock - 90's
New-Wave - 60's
New-Wave - 70's
New-Wave - 80's
New-Wave - 90's
will be processed in the same handling, the result will be
group: Rock
crates: 60's / 70's / 80's / 90's

group: New-Wave
crates: 60's / 70's / 80's / 90's

all crate functions stay the same
groups with only 1 crate (all unique names with no similarity in the beginning of the name) are NOT displayed as a group, but as the crate itself, so you get a mixxx of crates and groups.

20241112 - Eve Mixxx
20241212 Grouped crates - ungrouped
20241212 Grouped crates - grouped

-> with variable length (mask) groups crates can be multileveled grouped, (sub)groups are only created if group has more then 1 crate, tracks in crates are displayed in all parent (sub)groups, group decoration when track is in one of the (sub)groups member crates.

Eve00000 and others added 4 commits October 13, 2024 13:28
* 20241011 Cues & Loops & Widget for Stems

---------

Co-authored-by: Evelynne <Evelynne@Evelynne-Veys.com>
@Eve00000 Eve00000 changed the title Grouped crate Grouped crates Dec 4, 2024
@acolombier
Copy link
Member

I haven't had a chance to look at the code but I love the idea! This is basically why I haven't used crate as much as I wanted to. I particularly like the fact that this can be based off the name and doesn't need some complex parenting mecanism. Just one early feedback, I think it would be grate to have that as part of the main Crate feature and enable on demand, like you've done, instead of duplicating the library feature. Also, it would be amazing to allow multiple level

@Eve00000
Copy link
Contributor Author

Eve00000 commented Dec 5, 2024

it would be amazing to allow multiple level

thank you. Can you give me an example where more levels are absolutely needed (I mean it giving an extra value), because that implies more clicking to. I never had crates / music maps / music boxes / playlists divided in more then 1 level.
I can imagine something like
Rock / England / 60's
...
Pop /USA / 80's
..
or techno / industrial / 125-129 / 130 - 134 / ... but I would prefer having that on 1 level.
When a sublevel would only have 2 crates or 5 crates with each 2 songs the click (or extra controller action) isn't worth it or the last level name would not be meaning a lot (like only bpm), then you'd better look at the bpm field (or soon smarties )

That would mean eg Crates name Techno ///// Industrial //// 125-129 etc would become
Group Techno
SubGroup Industrial
Crate 125 - 129

@fwcd
Copy link
Member

fwcd commented Dec 5, 2024

Like the idea too, probably the easiest easiest/most backwards-compatible way of adding support for nested crates. Making it opt-in to avoid surprises with any particular delimiters is a good idea.

Can you give me an example where more levels are absolutely needed (I mean it giving an extra value), because that implies more clicking to. I

I think it would be really useful to make this configurable, i.e. have an option to support arbitrarily deep nesting. My library heavily relies on this for subgenres, but I can see why this would make the UI too hard to navigate for others.

Also, one thought that occurred to me, what do the groups/"folders" present when selected in the library? Do they show the union of all crates below (IMO that would be most useful)?

@Eve00000
Copy link
Contributor Author

Eve00000 commented Dec 5, 2024

Making it opt-in to avoid surprises with any particular delimiters is a good idea.

You'd prefer a selection between possible delimiters? Can you list some?

My library heavily relies on this for subgenres

Can you write / screenshot some examples?

Do they show the union of all crates below (IMO that would be most useful)?

I was wandering about this to, iTunes makes the Union. But this means recalculating the groups elements each time, even when it's just passing by with up/down ... could be a lot for slower machines and it would make some users unhappy when their machine gets slow.

@fwcd
Copy link
Member

fwcd commented Dec 5, 2024

You'd prefer a selection between possible delimiters? Can you list some?

No, I think a text box is just fine. What I meant is that we should leave this setting off by default to avoid surprising users that e.g. already use "/" or "-" as part of an intentionally flat crate hierarchy.

Can you write / screenshot some examples?

Genres
  House
    Big Room House
    Deep House
    Tech House
    ...

For ballroom dances I do something similar:

Dancing
  Standard
    Slow Waltz
    Quickstep
    Tango
    ...
  Latin
    Cha-Cha-Cha
    Rumba
    ...

I was wandering about this to, iTunes makes the Union. But this means recalculating the groups elements each time, even when it's just passing by with up/down ... could be a lot for slower machines and it would make some users unhappy when their machine gets slow.

I think it might be worth benchmarking that. If we can compute the union in a single SQL query, this doesn't necessarily have to be slow, SQLite is pretty good at churning through huge datasets. And given that we're probably "just" dealing with libraries on the order of tens of thousands of tracks (in the common case), I don't see why this should be much more of a performance issue than in other programs like iTunes.

@Eve00000
Copy link
Contributor Author

Eve00000 commented Dec 5, 2024

No, I think a text box is just fine. What I meant is that we should leave this setting off by default to avoid surprising users that e.g. already use "/" or "-" as part of an intentionally flat crate hierarchy.

Top

Rumba ...

I understand, I would have merged some group titles but I do know that it's important that people find themselves 'at ease' .
How do you use the library at the moment?
Crates Like
Dancing // Standard // Slow Waltz
Dancing // Latin // Cha-Cha-Cha
How many levels would you like, I see you use the root level + 2 sublevels.
I propose using the same delimiter (to make it not to complicated) and use it only with the variable length with delimiter.

This wil result in an extra sqlsearch like ' select .... where id = 'idOf1stGroupmember' or ... id = 'idOfLastGroupmember'.
I"m already using this in smarties for some crates / playlists (also history), the difference: in smarties I gave the locked the meaning of cached.
Let's try it :-)

@fwcd
Copy link
Member

fwcd commented Dec 5, 2024

IMO we shouldn't limit the depth (or at the very least make it configurable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants