Magic Nodes 4.2 w/ 380 masks & real GUI (2011-07-01)[MM2+]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper »

ZvezdanD wrote:2. By default during startup the Magic Nodes expand its main branch. Currently, you have only one choice:
Install TweakMonkey, go to Tools / Options / TweakMonkey & Script Options / Tree Node Options, check Node to be selected at startup, choose Library.
Okay, tried that and it turned out to be a very bad idea for me. Apparently TweakMonkey and MiniLyricsEmbedder don't play nice together. It took much uninstalling, reinstalling, rebooting, etc. to get my MM back to the way it was.


Ah well. :-?
Stop Button Freak
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Vyper wrote:
ZvezdanD wrote:Currently, you have only one choice:
Okay, tried that and it turned out to be a very bad idea for me.
Actually, you have another choice as well - you could put all your Magic nodes into some new group instead of Magic Nodes branch. You only need to put Group pseudo-field in the front of each node. For example, instead of:

Code: Select all

One-hit wonders|Icon:Top level\<Artist|Max tracks:5>
you could write:

Code: Select all

<Group|Name:My nodes|Child of:Library>\One-hit wonders|Icon:Top level\<Artist|Max tracks:5>
In that way the Magic Nodes branch would be empty.
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper »

Cool. Will give that a try. :D


Edit: Works beautifully! Thanks! :D
Stop Button Freak
Seeker
Posts: 264
Joined: Tue Jul 10, 2007 3:17 pm

Post by Seeker »

I'm trying to list all albums that have a disc# of 'OST' (yes I use non numeric disc #s. I thought this would be easy, but I can't seem to get it right, even with lots of examples. I keep getting sql errors.

Any help?
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Seeker wrote:I'm trying to list all albums that have a disc# of 'OST'
Yo could try:

Code: Select all

OST|Filter:Songs.DiscNumber = 'OST'\<Album>
Seeker
Posts: 264
Joined: Tue Jul 10, 2007 3:17 pm

Post by Seeker »

Thank you that worked perfectly. Can I not use <Disc#>?
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Seeker wrote:Can I not use <Disc#>?
You could use <Disc number> instead of Songs.DiscNumber only if you have numeric disc numbers.

BTW, there is better to use some of Custom fields for assigning a kind of album like OST than Disc number.
Seeker
Posts: 264
Joined: Tue Jul 10, 2007 3:17 pm

Post by Seeker »

ZvezdanD wrote:
Seeker wrote:Can I not use <Disc#>?
You could use <Disc number> instead of Songs.DiscNumber only if you have numeric disc numbers.

BTW, there is better to use some of Custom fields for assigning a kind of album like OST than Disc number.
re naming convention - you are absolutely right.

But since my naming convention uses #<Disc#> as part of how I name files, it was very convenient to use non numeric disc#s for assigning 'kind of album' rather than incorporating <Custom X> into my naming convention.

Thanks for your ABSOLUTELY wonderful Magic Nodes.
crabby7
Posts: 6
Joined: Sun May 18, 2008 3:47 pm

Post by crabby7 »

Since I have magic nodes on MM3 I'm trying to display albums sorted by this : SUM(Songs.SongLength * Songs.Rating/20)/SUM(Songs.SongLength) for albums with at least 5 tracks rated.

This is a idea from a script for MM2 here :

http://www.mediamonkey.com/forum/viewto ... ht=unrated

I've tried with Filter and SQL Filter but my knowledge in sql is poor. Is it possible with magic nodes ? If not, any idea how to correct the script above to work with MM3 ? (it seems IIF and albums.idartist are not supported anymore in MM3)
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

crabby7 wrote:Since I have magic nodes on MM3 I'm trying to display albums sorted by this : SUM(Songs.SongLength * Songs.Rating/20)/SUM(Songs.SongLength) for albums with at least 5 tracks rated.
The Magic Nodes script currently could not be used for custom sorting. It supports only simple aggregate functions with a single argument, so you could write Sum(Length) or Sum(Rating), but not Sum(Length * Rating). I said "currently", because this functionality is planed for some future version.

There is one similar approach to this what you want - you could create 5 Magic nodes under same group, each node for different average rating. There are already included similar nodes with v1.7.6 under "Album Ratings" group, but they display average rating without a regard on the track length. If you want to group albums with a rating weighted by track length, you could modify those nodes, e.g. for albums with 4 or more stars:

Code: Select all

<Group|Name:Album Ratings|Show tracks:No>\Albums with weighted avg. track rating >= 4 stars and at least 5 rated tracks|Icon:Top level|Filter:Songs.IDAlbum In (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Sum(SongLength * Rating) / Sum(SongLength) >= 80 AND Count(Rating) >= 5)\<Album|Sort by:Avg(Rating)|Statistic:Count(All)>
There is also one more possibility for this what you want. You could use RegExp Find and Replace script to put weighted album rating to some Custom field, e.g. Custom 4, and after that you could use Magic Nodes as usual with Sort by:Min(Custom 4) (in this case, instead of Min you could use Max or Avg aggregate functions, it doesn't matter because all tracks from same album would have same Custom 4 value). This script has a preset for similar thing under the name "Assign the weighted Track volume of album's tracks to the Album volume". You should only change:
Into: Custom 4
and
Replace with:

Code: Select all

SQLQuery("SELECT Sum(Rating * SongLength) / Sum(SongLength) FROM Songs WHERE IDAlbum = " & oSongData.Album.ID & " AND Rating > -1 GROUP BY IDAlbum HAVING Count(Rating) >= 5")
crabby7
Posts: 6
Joined: Sun May 18, 2008 3:47 pm

Post by crabby7 »

I had reached your first solution and i'm currently using it. Of course I'm missing an accurate sorting (hundreds of albums are rated between 3 and 4) and it would be nice to have them all in one node, with the ability to get a top 100 or so.

The second solution looks interresting. But normally, I don't like to store data that could be computed. And if I understand correctly, I have to use the script to recalculate the ratings when I rate some new tracks.

The good news is that there are plan to extend sorting ! So, I think I can wait for the proper solution.

Anyway, thanks a lot for support and very quick answer ! I was getting mad with this sorting...
crabby7
Posts: 6
Joined: Sun May 18, 2008 3:47 pm

Post by crabby7 »

I'm not sure if this is the right place, but I wanted to share a config that finally gave me good results for best albums and artists sorting, thanks to ZvezdanD.

I used the RegExp Find and Replace script for "Custom 4" field with this :

Code: Select all

SQLQuery("SELECT Sum(max(Rating-50,0)  * SongLength) *100 / Sum(SongLength) / count(rating) FROM Songs WHERE IDAlbum = " & oSongData.Album.ID & " GROUP BY IDAlbum HAVING Count(Rating) >= 5")
This rates albums with tracks rating, considering length itself and length over the total album length. The trick is to consider that what makes a good album are specially good tracks, and the "density" of those good tracks, and finally to store an average track score instead of an album score. It doesn't, for me, make a real difference if a track is just not to good or really bad. So a good album with one average track is about the same as if it was a very bad one. So, I only considered the ratio of 3 stars and more tracks (can be changed adjustingthe -50) and all tracks below are counted to 0.

The *100 is to get some precision (also increase impact of good tracks over average one), value could be adjusted but works just fine for me with about 1500 albums.

Then I used magic nodes with, for albums :

Code: Select all

Top Albums|child of:album\<album|Sort by:sum(Custom 4)|sort order:desc|all:no|min tracks:5|top:100>
And for artists :

Code: Select all

Top artists|child of:artist\<artist|Sort by:sum(Custom 4)|sort order:desc|all:no|min tracks:10|top:50>
To be noticed : the calculation is not a scale, there is no maximum to a score. For example, the more a band has good tracks, the higher the score is. Also, this works with partially rated albums.

This sorting finally gave me the result I was expecting, or better, feeling what was really my top albums and artists. Hope it can please some of you.

EDIT: in RegExp, use this "cooking" formula for better results, especially to deal with very short or long tracks/albums.

Code: Select all

round(iif(oSongData.rating-41>0,((oSongData.rating-41)/3)^2,0)*iif(oSongData.songlength>45000,oSongData.songLength-45000,0)/1000000*iif(-0.2*log(oSongData.songlength/1000)+2>1,1,-0.2*log(oSongData.songlength/1000)+2),0)
Last edited by crabby7 on Mon Jun 02, 2008 6:21 am, edited 2 times in total.
jonisaksson
Posts: 42
Joined: Fri Apr 20, 2007 11:02 am

Post by jonisaksson »

I hope someone can help me where I have gone wrong.

I currently use this node for my Audiobooks

Audio Books|child of:artist|Filter:<Genre> Like '%Audio book%'\<album artist|trim:1>\<album artist>\<album>\<Disc number>

The only problem with this node is that for some of my audio books there are no disc #, so I then thought of having a stab using "unknown:no"

So I wrote the node like this

Audio Books|child of:artist|Filter:<Genre> Like '%Audio book%'|Unknown:no\<album artist|trim:1>\<album artist>\<album>\<Disc number>

But as soon as I enter it, it kicks off a number of error messages along the line of "There was a problem querying the database: Error executing SQL....."

Any pointers on where I have gone wrong?

Many thanks
ZvezdanD
Posts: 3265
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

jonisaksson wrote:Any pointers on where I have gone wrong?

Code: Select all

Audio Books|child of:artist|Filter:<Genre> Like '%Audio book%'\<album artist|trim:1>\<album artist>\<album>\<Disc number|Unknown:No>
Jon Isaksson
Posts: 20
Joined: Mon Mar 17, 2008 10:50 am
Location: Manchester, England

Post by Jon Isaksson »

Thank you ZvedanD.

But I now remember the old saying "Be careful what you are ask for as you might just get it "
:D

I didnt realise the effect this would have.

Basically here is what I would like to have displayed but I am not sure if that is possible.

For example imagine I have Author1 who has Book1 but no disc#
Then Author2 who has bookX with 2 discs

What I would like to have displayed


Author1
Book1
Author2
BookX
Disc 1
Disc 2

But of course with the Unknown:No all i see is Author2

Is there away of hiding the "unknown" discs under Book1 (and any other books with out discs) without hiding the whole section?
Post Reply