Page 1 of 2
Grouping Genres
Posted: Fri Apr 14, 2006 3:01 pm
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.
Posted: Fri Apr 14, 2006 4:00 pm
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.
Posted: Fri Apr 14, 2006 6:29 pm
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.
Posted: Fri Apr 14, 2006 6:57 pm
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).
Posted: Sat Apr 15, 2006 2:31 am
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.

Posted: Sat Apr 15, 2006 9:21 am
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.
Posted: Sat Apr 15, 2006 11:09 am
by kalex
But wouldn't playlist just include all the matching files? I'd like to retain a hierarchiv view maybe.
Posted: Sat Apr 15, 2006 11:28 am
by Lowlander
That is true.
Posted: Sat Apr 15, 2006 12:44 pm
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
Posted: Sat Apr 15, 2006 2:52 pm
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.
Posted: Sat Apr 15, 2006 3:08 pm
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).
Posted: Sat Apr 15, 2006 5:04 pm
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.
Cheers
Steegy
Posted: Sun Apr 16, 2006 2:26 pm
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.
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!
Posted: Sun Apr 16, 2006 3:45 pm
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...
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
Posted: Sun Apr 16, 2006 10:38 pm
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.