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

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

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

Find tracks without an image file but with an image in a tag?

by Spix » Thu Dec 20, 2018 2:09 pm

Hello

I would like to find all tracks with 1 (or more) picture(s) attached in a tag but with no external file. Then I would like to use Album Art Tagger to extract this picture into an external file and link it to the track.
How can I create a mask with essentially a filter of the kind "count(cover storage)==1 and cover storage = 'Tag'" to find all those tracks?

I hope someone will help with this wonderful addon Magic Nodes!

Best regards

Where to find Magic Nodes?

by Pietercape » Sun Dec 16, 2018 11:27 pm

I am having a problem with delayed loading due to the Magic Nodes script. This forum has some topics on this subject and the answer seems to be a donation only fix for the script. The links for Magic Nodes in this section are ALL out of date as is the MediaMonkey.com/scripts.htm page. Only by Googling Magic nodes does the correct information come. It is: http://solair.eunet.rs/~zvezdand/MagicNodes.htm

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

by TribalMethods » Wed Dec 05, 2018 9:35 am

I'm struggling to get a script that I half-made myself working. I did just donate for the enhanced version so hopefully that'll help me learn more by having more scripts to look at...

Anyway, what I am trying to do is to select 500 random tracks from each listed genre, then limit the tracks per artist to 5.
The first part I think I've mostly successfully done properly, though it doesn't seem to be truly random... if that is even possible.


Here is what I've got so far that *seems* to work:

Code: Select all

Songs.ID IN (SELECT Songs.ID FROM Songs, (SELECT DISTINCT GenresSongs.IDGenre AS IDGenre FROM GenresSongs) AS G1 WHERE Songs.ID IN (SELECT Songs.ID FROM Songs, GenresSongs WHERE Songs.ID = GenresSongs.IDSong AND GenresSongs.IDGenre = G1.IDGenre ORDER BY Random() LIMIT 5000)) AND <Genre> IN ('Alternative', 'Asian Music', 'Dance', 'Electro', 'Folk', 'Metal', 'Pop', 'Punk', 'Rap/Hip Hop', 'Reggae', 'Rock')
This also seems to be *close* I believe, but I only end up with 5 results and it takes far longer than it should, especially since I reduced the songs down to 40 per genre:

Code: Select all

Songs.ID IN (SELECT Songs.ID FROM Songs, (SELECT DISTINCT GenresSongs.IDGenre AS IDGenre FROM GenresSongs) AS G1, Artists WHERE Songs.ID IN (SELECT Songs.ID FROM Songs, GenresSongs WHERE Songs.ID = GenresSongs.IDSong AND GenresSongs.IDGenre = G1.IDGenre ORDER BY Random() LIMIT 40) ORDER BY Artists.ID LIMIT 5) AND <Genre> IN ('Alternative', 'Asian Music', 'Dance', 'Electro', 'Folk', 'Metal', 'Pop', 'Punk', 'Rap/Hip Hop', 'Reggae', 'Rock')
I really wish there was a better manual out there... it's such a powerful tool yet I find it very confusing to write scripts in. If anyone has any other material I should read up on that'd be awesome :)

Edit:
Enhanced Version was just delivered!

The default script which selects "20 random files from 'Blues and Rock genre's" is what I built off in the free version. However it seems the enhanced version script is a tad different... It still works ALMOST how I need it to, I just need to figure out how to limit it to 5 tracks per artist :lol: Should be easy... for anyone that knows Magic Nodes well I'd imagine.

Default Script for "Select 20 random files from 'Blues & Rock' Genres:"

Code: Select all

Songs.ID IN (SELECT Songs.ID FROM Songs, (SELECT DISTINCT IDGenre FROM GenresSongs) AS T1 WHERE Songs.ID IN (SELECT Songs.ID FROM Songs INNER JOIN GenresSongs ON Songs.ID = GenresSongs.IDSong INNER JOIN Genres ON GenresSongs.IDGenre = Genres.IDGenre WHERE GenresSongs.IDGenre = T1.IDGenre ORDER BY Random() LIMIT <Number|Caption:Number of files per Genre|Value:20|MinValue:0|MaxValue:100|ID:1>)) AND <Genre> IN ('Blues', 'Rock')
Edit:
SOLVED. PM me on Reddit if you want this mask. Same username.

Re: Magic Nodes breaks Windows 10 v1803/9

by ZvezdanD » Mon Oct 15, 2018 2:11 am

profucius wrote:
Sun Oct 14, 2018 1:01 pm
It makes it so that doing any task, playing a song, loading a playlist, take 5 seconds to do each. After removing and individually readdding each extension, I deduced that Magic Nodes is the extension that is causing this issue for me.

Is there a fix for this issue on MediaMonkey v4? I really hope so!
There are reports that MediaMonkey with this add-on has a very slow startup on Windows 10 after its April 2018 Update when Windows Defender has Real-Time Protection enabled. This problem is reported to Microsoft, but they don't care about it. You could do any of the next things:
- go to the Microsoft site and leave your report, there is a better chance that the folks at Microsoft will do something about the problem if more people request that; or
- turn off Windows Defender Real-Time Protection and use some other anti-malware; or
- remove all MN masks that you don't need since this slow down is related to the number of installed masks; or
- donate to me and you will receive the enhanced version of the add-on which has implemented a workaround for this problem, making it as fast as before the mentioned Windows Update.

By the way, you are the first user that experienced and reported slow work of the program doing any task. All previous users reported normal use after startup of the program. If you are absolutely sure that this add-on is a reason for such behavior, there is a possibility that even the enhanced version could not help with that.

Magic Nodes breaks Windows 10 v1803/9

by profucius » Sun Oct 14, 2018 1:01 pm

Hi there, I'll start by saying wonderful extension! I love it and have grown to depend on it for so much. Apologies if this has already been discussed, if so please just point me to the right place.

I've just updated my Windows to the newest version 1809, and I read over in this thread (viewtopic.php?f=6&t=89731&start=15) that certain extensions can cause MediaMonkey to clash with Windows Defender Real-Time Protection. It makes it so that doing any task, playing a song, loading a playlist, take 5 seconds to do each. After removing and individually readdding each extension, I deduced that Magic Nodes is the extension that is causing this issue for me.

Is there a fix for this issue on MediaMonkey v4? I really hope so!

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

by mhendu » Thu Sep 06, 2018 8:22 am

ZvezdanD wrote:
Wed Sep 05, 2018 12:56 am
mhendu wrote:
Tue Sep 04, 2018 10:38 pm
Here's a screenshot of the settings
I told you, you should get opened the new Magic Nodes SQL Editor dialog box, not Edit Magic Node.
Got it - working now, thanks!

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

by ZvezdanD » Wed Sep 05, 2018 12:56 am

mhendu wrote:
Tue Sep 04, 2018 10:38 pm
Here's a screenshot of the settings
I told you, you should get opened the new Magic Nodes SQL Editor dialog box, not Edit Magic Node.

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

by mhendu » Tue Sep 04, 2018 10:38 pm

ZvezdanD wrote:
Tue Sep 04, 2018 2:13 am
It works fine for me. Tried several times, no errors. Check if you copied/pasted the correct string and confirm editing of SQL query with the OK button. Then post the screenshot of the error message box if it says anything different than "The mask defining this Magic Node produced an error."
Here's a screenshot of the settings - have tried a few times in different ways with no success:

https://ibb.co/btjA2z

The error I'm receiving is "The mask defining this Magic Node produced an error."

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

by ZvezdanD » Tue Sep 04, 2018 2:13 am

mhendu wrote:
Mon Sep 03, 2018 6:58 pm
I do get that confirmation dialog box if I place the node under Magic Nodes instead of playlists but the query still results in an error, unfortunately.
It works fine for me. Tried several times, no errors. Check if you copied/pasted the correct string and confirm editing of SQL query with the OK button. Then post the screenshot of the error message box if it says anything different than "The mask defining this Magic Node produced an error."

By the way, if you manage to get the wanted filelist with the node inside of the Magic Nodes branch, you could transfer the content of that node to the Playlists branch using the "Create Playlists for Child Nodes" menu option of the Export/Create Playlists add-on.

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

by mhendu » Mon Sep 03, 2018 6:58 pm

ZvezdanD wrote:
Sun Sep 02, 2018 1:30 pm
mhendu wrote:
Sun Sep 02, 2018 12:56 pm
I changed the settings in Magic Nodes and tried to use the above query but this doesn't work for some reason (it produces an error).
Where did you try to use the above query, was it in the mentioned Magic Nodes SQL Editor dialog? Did you replace the string that is already displayed in the text box with the posted one?
Yes, on both counts.

I do get that confirmation dialog box if I place the node under Magic Nodes instead of playlists but the query still results in an error, unfortunately.

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

by ZvezdanD » Sun Sep 02, 2018 1:30 pm

mhendu wrote:
Sun Sep 02, 2018 12:56 pm
I changed the settings in Magic Nodes and tried to use the above query but this doesn't work for some reason (it produces an error).
Where did you try to use the above query, was it in the mentioned Magic Nodes SQL Editor dialog? Did you replace the string that is already displayed in the text box with the posted one?

Anyway, you discovered a bug. I don't get the error, but the SQL Editor dialog box is opening only for Magic nodes that are outside of Playlists branch, e.g. for nodes inside the Magic Nodes branch. I will try to fix that as soon as possible.

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

by mhendu » Sun Sep 02, 2018 12:56 pm

ZvezdanD wrote:
Sat Sep 01, 2018 1:31 am

Code: Select all

INNER JOIN (SELECT Custom3 || IDAlbum AS SortField1, Random() AS RandomField1 FROM Songs GROUP BY SortField1) ON Custom3 || IDAlbum = SortField1 WHERE Songs.Custom3 || IDAlbum IN (SELECT Custom3 || IDAlbum AS CLASSWORK FROM Songs GROUP BY CLASSWORK HAVING Avg(Rating) > 80 AND Custom3 <> '' AND GroupDesc = 'Classical') ORDER BY RandomField1, Songs.TrackNumber COLLATE NUMERICSTRING
I changed the settings in Magic Nodes and tried to use the above query but this doesn't work for some reason (it produces an error). Maybe I need to change CLASSWORK to SortField1? That doesn't work either. Not sure. Any thoughts?

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

by ZvezdanD » Sat Sep 01, 2018 1:31 am

mhendu wrote:
Fri Aug 31, 2018 4:29 pm
I suppose, if there's not a great solution otherwise, I could write a script to concatenate Custom3 and IDAlbum and overwrite another custom field like Comments to use for sorting.
How often do you need to generate the mentioned playlist? If it is just once or twice, maybe you could use the next workaround:
- open Magic Nodes Options dialog box;
- turn on the Allow editing of SQL queries and when select a field node options;
- confirm with Ok;
- remove Sort by qualifier from your mask in Mask Settings dialog box;
- click on Update;
- when you get the new Magic Nodes SQL Editor dialog box, edit the SQL query appropriately.

For example, if your Filter is:

Code: Select all

Songs.Custom3 || IDAlbum IN (SELECT Custom3 || IDAlbum AS CLASSWORK FROM Songs GROUP BY CLASSWORK HAVING Avg(Rating) > 80 AND Custom3 <> '' AND GroupDesc = 'Classical')
and if you want to sort by the concatenated Custom3 and IDAlbum randomly, then Track Number, you should write:

Code: Select all

INNER JOIN (SELECT Custom3 || IDAlbum AS SortField1, Random() AS RandomField1 FROM Songs GROUP BY SortField1) ON Custom3 || IDAlbum = SortField1 WHERE Songs.Custom3 || IDAlbum IN (SELECT Custom3 || IDAlbum AS CLASSWORK FROM Songs GROUP BY CLASSWORK HAVING Avg(Rating) > 80 AND Custom3 <> '' AND GroupDesc = 'Classical') ORDER BY RandomField1, Songs.TrackNumber COLLATE NUMERICSTRING
You could turn on the Don't show this dialog anymore before confirmation.

As you could see, your filter is the WHERE part of the new query, with the ORDER BY part appended to the end and the necessary INNER JOIN part on the beginning.

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

by mhendu » Fri Aug 31, 2018 4:29 pm

ZvezdanD wrote:
Fri Aug 31, 2018 2:12 pm
I cannot see from your screenshot, but I suppose that all your albums from the same box set have the same Custom3 field, right?
Thanks, but not correct. Take, for example, the album Songs from Our Ancestors (from which one work appears in my file list in the screenshot). Here's the Musicbrainz link for that album:

https://musicbrainz.org/release/7588a67 ... 257cb7b32a

You can see from there that the album has multiple works in it, from different composers, from different eras, performed by the same performer. If I sort first by album (and assuming I include all tracks from the album in my query) then all 22 tracks from the album will appear together in some order, depending on my additional sort selections. I'd prefer to, for instance, have my playlist skip around from my complete collection of classical music based on the parent works. As another example (somewhat extreme) there's this Martha Argerich box set:

https://musicbrainz.org/release/67172a6 ... 2784317850

Hundreds of tracks across 48 discs so a playlist could get tied up on Martha Argerich's piano music for hours.

I suppose, if there's not a great solution otherwise, I could write a script to concatenate Custom3 and IDAlbum and overwrite another custom field like Comments to use for sorting.

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

by ZvezdanD » Fri Aug 31, 2018 2:12 pm

mhendu wrote:
Fri Aug 31, 2018 12:19 pm
If I sort by Album then by Custom3 then all the works in an album will show up next to each other every time - this is a better solution but still not ideal since if I have a box set with tons of tracks I'll always get those tracks more or less together (even if my second sorting criterion is Custom3 random this will distribute the parent works throughout the album but not throughout the file list). My preferred solution would be to concatenate Custom3 and Album / Album Artist or IDAlbum to randomly sort by that concatenation. This way two copies of the same work would rarely show up next to each other, and box sets would typically get their works distributed throughout the file list.
Unfortunately, Magic Nodes doesn't support concatenation of two or more fields, nor any other form of string manipulation, within the Sort by qualifier.

However, I still don't understand what you want to say with those "tons of tracks". I suppose it is expected that you get all tracks from the same album one after another, right? That is why you are using Track Number as the last argument of Sort by. If you sort by Album name randomly first, wouldn't that be what you want to get?

Have you actually tried my suggestion with Album Random as the first argument? I think it could do what you want as long as you have albums from the same box set with different album names. Otherwise, maybe you could add Artist or Album Artist or Composer or Conductor as the first argument, again with Random.

I cannot see from your screenshot, but I suppose that all your albums from the same box set have the same Custom3 field, right?

Top