Grouping Genres

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

kalex
Posts: 12
Joined: Fri Apr 14, 2006 2:27 pm
Location: Germany
Contact:

Grouping Genres

Post by kalex »

Hello everyone,

I'm new to MM and so far I really like it... however, one thing I seem to be unable to do is grouping of various genres. Maybe I just don't know how to do it.

I've read one or the other discussion here about the genres, and I do like to keep the genre diversified enough and not over-simplified.

What I'd like to achieve is, for example, create a group "Relaxed music" that includes tracks with the genre "Dub", "Lounge", "Chill Out", etc. (another one would be "Dance" that should includes "Trance", "Goa", "Psytrance", "Techno", etc.)

In the past I have done this in the physical file structure on my harddisk, but its not a definitive solution. For example, some goatrance compilations and albums consist of a "dance" CD and a "chill out" CD, for example. The tracks are tagged accordingly. I'd like to keep the album in one place on disk - but at the same time I want to be able to reach all the "relaxed" music (by my own definition) easily.

Can this be done somehow? Any help would be appreciated.
Lowlander
Posts: 56628
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

This can't be done thru genre's.

But you could create auto-playlists that include the genre's you'd like in a certain style. You'll need the Gold license to create auto-playlists.
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

You could probably utilize the 1 of the custom tags & magic nodes or possibly some other script depending on what you want to achieve.
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

This is the way to do it using MagicNodes (http://www.mediamonkey.com/forum/viewtopic.php?t=3358):

1) Rename all of your genres to "Group-Genre". For example, "Relaxed music-Dub", "Relaxed music-Lounge", "Dance-Techno", etc. This is the tedious part :) .

2) Create a Magic Node with the following mask:

Code: Select all

Genre by group|child of:genre|icon:top level\<genre|left of:->\<genre|right of:->\<album artist>\<album|sort by:max(year)>
(you can replace <album artist> by <artist> if you'd rather use artists than album artists). If you copy and paste, the mask has to fin into one line. Sometimes copying & pasting results in empty lines being pasted, which will make the mask checker complain!

This will allow to browse by groups then specific genres (then artists then albums sorted by year).
kalex
Posts: 12
Joined: Fri Apr 14, 2006 2:27 pm
Location: Germany
Contact:

Post by kalex »

Thanks for the input, everyone!

Well, renaming all my genres is a no-no for me... so maybe I'll go for a custom tag field eventually (about the same amount of work) to achieve that for the moment.

However, I'm dreaming of something much easier. :) Pick a genre/album/artist/compilation/whatever, drag it onto a selfmade super-genre, and drop it there. Something like that. Like the labels in Picasa, to say so.

Would it be technically possible to extend the Magic Nodes script so that it can combine multiple "hits" from one & the same field? Like <genre=dub|genre=lounge|genre=easy-listening> ...I'm hoping I'm not making a total fool out of myself, I have no idea about programming. :D
Lowlander
Posts: 56628
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

Coming back to auto-playlists. They can do that, just say which genre's you want to include.

Of course they would reside in the playlist node instead of the genre node, but would do exactly what you want.

Of course there are many improvement requests for genres including parent - child genre's.
kalex
Posts: 12
Joined: Fri Apr 14, 2006 2:27 pm
Location: Germany
Contact:

Post by kalex »

But wouldn't playlist just include all the matching files? I'd like to retain a hierarchiv view maybe.
Lowlander
Posts: 56628
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

That is true.
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

Yeah, could MagicNodes be improved to enable that?

If not, then maybe a custom DB table could be made to place genres in groups, and the use Magic Nodes.

Code: Select all

ID	GenreName           GroupName
-----------------------------------------
1	 Hard Rock           Rock
2	 Psychedelic Rock    Rock
3	 Rock/Pop            Rock
4	 Rock                Rock
5	 Trance              Trance
6	 Progressive Trance  Trance
7	 Melodic Trance      Trance
...
Obviously the SQL query would execute a bit faster if GenreID was used instead of GenreName. But this is just an example... (numbers wouldn't say very much)

Or a custom script could be made, but that seems a lot of useless work, as easier solutions seem to exist.


I thought this would work:

Code: Select all

Group Rock|SQL filter:Songs.IDAlbum IN (SELECT Songs.IDAlbum FROM Songs INNER JOIN Genres ON Songs.Genre = Genres.IDGenre WHERE (Genres.GenreName Like '*Rock*'))|show tracks:no\<Album Artist>\<Album>
But it 100%CPU's MediaMonkey! It's not a special SQL instruction, because MSAccess can do it in some milliseconds.

Does anyone see the problem?

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

If you use a custom field for the groups, then your magic node mask should be:

Code: Select all

Genre by group|child of:genre|icon:bottom level\<group>\<genre>\<album artist>\<album|sort by:max(year)> 
This assumes that you've named the corresponding custom field "group". Otherwise just use the name you gave it.
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

Steegy wrote: It's not a special SQL instruction, because MSAccess can do it in some milliseconds.

Does anyone see the problem?
This has happened a few times to me. SQL queries which run in nanoseconds in Access clog MM. It seems for some reason Access interprets the query in a smarter way and has to go over fewer tables (or less times over the same table).
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

OK, this "simplified" specification works, and I'm now using it as replacement for my auto-playlists (who have been working like this since I started using MM, except for the subnodes of course...):

Code: Select all

Group Rock|filter: Genre LIKE '%Rock%'|child of:genre|icon:top level\<Genre>\<Album Artist>\<Album>
It would be nice to have the customised tree like:
Library \ Genre Groups \ Rock \ <Genre> \ <Album Artist> \ <Album>
The "Genre Groups" and "Rock" levels would be manually specified like:

Code: Select all

Group Rock|filter: Genre LIKE '%Rock%'|child of:genre|icon:genre\Genre Groups\Rock\<Genre>\<Album Artist>\<Album>
While I'm busy, it would also be nice to be able to use "icon:genre" (like in the example above) or "icon:34" (where 34 is the icon index for the tree icons).


These are just some thoughts of course. If I find the time, maybe I'll try to implement these myself, if you (probably) have other work to do. But I would first have to study your long and beautiful script a bit.
SQL queries which run in nanoseconds in Access clog MM.
Even those which run in picoseconds can do that, you know. 8)

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

Steegy wrote: It would be nice to have the customised tree like:
Library \ Genre Groups \ Rock \ <Genre> \ <Album Artist> \ <Album>
The "Genre Groups" and "Rock" levels would be manually specified like:

Code: Select all

Group Rock|filter: Genre LIKE '%Rock%'|child of:genre|icon:genre\Genre Groups\Rock\<Genre>\<Album Artist>\<Album>
I'm not sure I understand what you propose. Do you want to have the ability to define individual subnodes one by one by using filters?

Steegy wrote: While I'm busy, it would also be nice to be able to use "icon:genre" (like in the example above) or "icon:34" (where 34 is the icon index for the tree icons).
Done. It'll be in the next release.
Steegy wrote: But I would first have to study your long and beautiful script a bit.
The script was becoming a mess, especially the procedure FillCustomNode which is where much of the action happens. I'm trying to clean it up a little bit so it's easier to understand and modify.
Steegy wrote: Even those which run in picoseconds can do that, you know. 8)
Probably even femtoseconds. But I'm still not sure why the Jet engine uses different (poorer) algorithms than Access. Doesn't make much sense to me.
Steegy wrote: Cheers
Cheers!
Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »

Correction to my wish:

Code: Select all

Genre Groups\Rock|filter: Genre LIKE '%Rock%'|icon:genre\<Genre>\<Album Artist>\<Album>
or

Code: Select all

Rock|filter: Genre LIKE '%Rock%'|child of:Library\Genre Groups|icon:genre\Genre Groups\Rock\<Genre>\<Album Artist>\<Album>
I would like that MagicNodes can create the "automatic part" of the node (this is <Genre>\<Album Artist>\<Album>) as child of a manually defined (existing or new) parent node (Library\Genre Groups).

This would be the same as using something like:
"child of:Library\Genre Groups"
or just "child of:Genre Groups"

I would like to be able to let the custom node start from a different (manually specified) parent node than these that are now already possible.


BTW: I've never seen an SQL instruction run in a yoctosecond, but if you have, please let me know... :P
If you are really sure that the problem is with MediaMonkey or the Jet Engine (and not your script), could you please let the dev's know about this (in case they don't know yet)?

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

Steegy wrote:I would like that MagicNodes can create the "automatic part" of the node (this is <Genre>\<Album Artist>\<Album>) as child of a manually defined (existing or new) parent node (Library\Genre Groups).
The problem is there's no way to access an arbitrary node. The script can easily specify a parent node if there's any way to get a reference to it, such as it does currently with the artist, album, etc, nodes.
It would be nice to be able to access a collection of all the current nodes, whether part of MM core or created by scripts. May be I should this to the scripting wishlist?
Steegy wrote:If you are really sure that the problem is with MediaMonkey or the Jet Engine (and not your script), could you please let the dev's know about this (in case they don't know yet)?
I've tried to just execute a SQL statement with SDB.Database.ExecSQL, resulting in 100% CPU in MM while the statement ran in access completes immediately. That's why I believe it's the JET engine.

In most if not all cases it is possible to rewrite the query so that it runs as fast as in Access. So I believe Access has some built-in protection against redundant code while JET doesn't.
Post Reply