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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

Re: Need some Advice on a mask syntax...

Post by ZvezdanD » Thu Sep 29, 2011 8:24 am

TWKArtist wrote:What I'd like to do, if possible, is also list whatever Albums and Artists fall within the first sub-genre of 'Progressive' while still listing any other sub-genres, as in this case, 'Electronic.'
I am not sure that understand exactly what you want, but I suppose that it is not possible because of the same reason as I mentioned in the previous post: you cannot have two or more different fields as children of the same node. Even if it is possible, it would be too confusing because sometimes you would not know what some node contains, one field or another. Maybe you could try similar solution with two masks as I suggested in the previous post.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD » Thu Sep 29, 2011 9:06 am

Viper21 wrote:1. List all the tracks in random order that contain (and not necessarily "start with") the text "Mix <number>" in the "Grouping" ID3 tag; where <number> is a randomly chosen number between 001-999 and the number must be displayed as 3-digit number. For example: 001, 012, 189. So for example, when I select the node, it might choose all tracks with "Mix 010" in the Grouping tag, and when I refresh the node it might list all tracks with "Mix 199" .
With the plain SQLite you cannot filter so easily the records with some numeric range. It would be ideal if MM developers add Regular expressions to SQL, since then that would be possible (e.g. in that case you could write <Grouping> RegEx '.*Mix \d\d\d.*' where \d is a substitution for any digit). However, if your Grouping field contains only one 'Mix xxx' occurrence then maybe you could try something like this: Test|Filter:SubStr(<Grouping>, InStr(<Grouping>, 'Mix ') + 4, 3) Between '001' And '999'.

However, I am not sure that understand that 'random' part of your requirement. I suppose it is not possible if your Grouping field contains something else beside of that 'Mix xxx' part, but if it doesn't contain anything else than maybe you could try with something simple like this:

Code: Select all

Test\<Grouping|Sort order:Random>
Well, actually you could filter that field for some text even if it contains something else, but only if 'Mix xxx' part is on the end or if you have some separator after it. You could try this:

Code: Select all

Test\<Grouping|Sort order:Random|Right of:Mix >
or, with '; ' as a separator:

Code: Select all

Test\<Grouping|Sort order:Random|Right of:Mix |Right until:; >
Viper21 wrote:2. List the tracks in random order that contain the text "Favorite" in the "Grouping" ID3 tag. The sum of the tracks listed should not go over 60 minutes. If the latter time limit is not possible then, then the first part is fine.

Code: Select all

Test|Filter:<Grouping> Like '%Favorite%'\<Title|Sort order:Random>
I don't have a time to further investigate this, but I think that you cannot limit the number of tracks by their total length using Magic Nodes.
Viper21 wrote:3. List in random order the tracks that reside in the folder "C:\MP3\New". The sum of the tracks listed should not go over 60 minutes.

Code: Select all

Test|Filter:<Path> Like 'C:\MP3\New\%'\<Title|Sort order:Random>
Viper21 wrote:4. List in random order all the tracks from a single randomly-selected genre.

Code: Select all

Test\<Genre|Top:1|Sort order:Random>
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD » Thu Sep 29, 2011 9:19 am

jtotheh wrote:Hi, I'm looking for some help to modify the included "20 recently added albums" to be limited only to a specifc genre (soundtrack).

The original:
<Group|name:Last 20...|Show tracks:No>\20 Recently added Albums|Icon:Top level|SQL filter: Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) = Max(Cast(TrackNumber As integer)) AND Count(TrackNumber) > 3 ORDER BY Min(DateAdded) DESC LIMIT 20)\<Album with album artist|Sort by:Max(Time since added)>

I tried adding "AND <Genre> = 'Soundtrack'" but that is making MediaMonkey stall - any suggestions?
If you add the mentioned string to the Filter using GUI, it should work fine. Are you sure that you added that string to the end of the filter, but not to the end of the mask? By the way, if you edit the mask directly, you should replace "SQL filter" with "Filter". Of course, you should have one space character between the existing filter and your addition, but I suppose that you just didn't include it in your post.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD » Thu Sep 29, 2011 9:43 am

eepman wrote:I've been having an issue using the latest MN with MM 4.

In Added Statistics->Date Added->By Album Artist->Date->Unknown or in any other unknown nodes I see two of every file until i change sorting by clicking one of the column headers.

Do you know of anything that would cause this or is this a known issue?
I just tried and it works fine. Maybe your database is corrupted. You could try with the Optimize database option from the Maintain Library dialog box, just make its backup before that. If it is still happening you could upload the database file to some file service, so I could try to reproduce that issue with your database by myself.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD » Thu Sep 29, 2011 9:45 am

steviegt wrote:I want to identify the tracks where the Custom5 field is blank.

Code: Select all

Test|Filter:<Custom 5> = ''
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

r0k
Posts: 54
Joined: Wed Jul 27, 2011 11:13 am

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

Post by r0k » Thu Sep 29, 2011 12:58 pm

ZvezdanD wrote: It is not possible to have two or more different fields as children of the same node. For example, the Main genre (i.e. Genre with Left of qualifier) cannot have both sub-genre and Artist fields with the same node. However, you could make two nodes within one group - one node would contain sub-genres then artists and another node would contain only artists:
Thanks. Tried it but it's not better then what i had, only different with a different drawback (in this case i have to look in 2 different sub-nodes to have all my genres).
It would be great if a node could have 2 or more conditional sub-nodes. In this case i could use the same filter as in your example but within the node to display either sub-genre or artists. Maybe you'll find a way to code this for Magic Nodes 5 :wink:

Anyway, great Magic Nodes is one of the most useful addons i ever tested. I replaced nearly every standard library node with some custom ones. :)

jtotheh
Posts: 4
Joined: Mon Nov 09, 2009 8:15 am

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

Post by jtotheh » Sun Oct 02, 2011 7:04 am

ZvezdanD wrote: If you add the mentioned string to the Filter using GUI, it should work fine. Are you sure that you added that string to the end of the filter, but not to the end of the mask? By the way, if you edit the mask directly, you should replace "SQL filter" with "Filter". Of course, you should have one space character between the existing filter and your addition, but I suppose that you just didn't include it in your post.
I tried this again as you described, which is what I thought I'd done before, but either way it worked this time. Thanks!

Viper21
Posts: 47
Joined: Thu Jun 05, 2008 2:25 pm

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

Post by Viper21 » Sun Oct 02, 2011 12:59 pm

ZvezdanD wrote:
Viper21 wrote:1. List all the tracks in random order that contain (and not necessarily "start with") the text "Mix <number>" in the "Grouping" ID3 tag; where <number> is a randomly chosen number between 001-999 and the number must be displayed as 3-digit number. For example: 001, 012, 189. So for example, when I select the node, it might choose all tracks with "Mix 010" in the Grouping tag, and when I refresh the node it might list all tracks with "Mix 199" .
With the plain SQLite you cannot filter so easily the records with some numeric range. It would be ideal if MM developers add Regular expressions to SQL, since then that would be possible (e.g. in that case you could write <Grouping> RegEx '.*Mix \d\d\d.*' where \d is a substitution for any digit). However, if your Grouping field contains only one 'Mix xxx' occurrence then maybe you could try something like this: Test|Filter:SubStr(<Grouping>, InStr(<Grouping>, 'Mix ') + 4, 3) Between '001' And '999'.

However, I am not sure that understand that 'random' part of your requirement. I suppose it is not possible if your Grouping field contains something else beside of that 'Mix xxx' part, but if it doesn't contain anything else than maybe you could try with something simple like this:

Code: Select all

Test\<Grouping|Sort order:Random>
Well, actually you could filter that field for some text even if it contains something else, but only if 'Mix xxx' part is on the end or if you have some separator after it. You could try this:

Code: Select all

Test\<Grouping|Sort order:Random|Right of:Mix >
or, with '; ' as a separator:

Code: Select all

Test\<Grouping|Sort order:Random|Right of:Mix |Right until:; >
Viper21 wrote:2. List the tracks in random order that contain the text "Favorite" in the "Grouping" ID3 tag. The sum of the tracks listed should not go over 60 minutes. If the latter time limit is not possible then, then the first part is fine.

Code: Select all

Test|Filter:<Grouping> Like '%Favorite%'\<Title|Sort order:Random>
I don't have a time to further investigate this, but I think that you cannot limit the number of tracks by their total length using Magic Nodes.
Viper21 wrote:3. List in random order the tracks that reside in the folder "C:\MP3\New". The sum of the tracks listed should not go over 60 minutes.

Code: Select all

Test|Filter:<Path> Like 'C:\MP3\New\%'\<Title|Sort order:Random>
Viper21 wrote:4. List in random order all the tracks from a single randomly-selected genre.

Code: Select all

Test\<Genre|Top:1|Sort order:Random>
@ZvezdanD: Thank you so much for your help! :D I was able to get #2, 3, and 4 working as you described (with a few minor tweaks to further customize). Unfortunately, I wasn't able to get #1 working; not even by replacing the code with some hard strings. For example:

Code: Select all

Test|Filter:SubStr(<Grouping>, InStr(<Grouping>, 'Mix 002'))
Most of my Grouping tags contain only one "Mix xxx" entry; however on rare occasions some may sometime contain more than one "Mix xxx" entry. Some though also have a "Favorite" entry. They are separated by semicolon (;). For example: Mix 003; Mix 125; Favorite or Mix 005; Favorite
Basically I just want the MN to randomly select any number between 001-999 (xxx) and to play all the tracks that contain the entry "Mix xxx" in the Grouping tag.

-Viper 21

ZvezdanD
Posts: 3084
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD » Sun Oct 02, 2011 3:40 pm

Viper21 wrote:Unfortunately, I wasn't able to get #1 working
My fault, instead of Right of you should use Exclusive Right of. So, maybe you could try this mask:

Code: Select all

Test\<Grouping|Sort order:Random|Top:1|Exclusive Right of:Mix |Right until:; >
However, it would return only numbers specified in the first specified Mix. Maybe you could try with the Split by qualifier if you want to take in account tracks with specified multiple Mixes, but in that case Random order cannot work:

Code: Select all

Test\<Grouping|Split by:; |Split mode:Categories|Exclusive Right of:Mix >
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1 / 5.4  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.7 / 4.0  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.3 / 2.2.2  Inherit Child Playlists 1.0.2  Add Currently Playing/Selected Track(s) to Playlist 1.1.2

Viper21
Posts: 47
Joined: Thu Jun 05, 2008 2:25 pm

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

Post by Viper21 » Sun Oct 02, 2011 4:38 pm

ZvezdanD wrote:
Viper21 wrote:Unfortunately, I wasn't able to get #1 working
My fault, instead of Right of you should use Exclusive Right of. So, maybe you could try this mask:

Code: Select all

Test\<Grouping|Sort order:Random|Top:1|Exclusive Right of:Mix |Right until:; >
However, it would return only numbers specified in the first specified Mix.
@ZvezdanD, you are a genius! :wink:
Works like a charm. Doesn't matter at all that it only returns numbers specified in the first mix (it's a very rare occurrence in any case).
Thank you so much, AGAIN. MediaMonkey got so much better for me.
-Viper21

unseen77

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

Post by unseen77 » Tue Oct 04, 2011 7:32 am

is there a node to show me only 4-5 star songs of a specific year like 2005?

ScottBolton
Posts: 17
Joined: Fri Jul 28, 2006 8:53 am

Mixing ANDs and ORs in MagicNodes

Post by ScottBolton » Wed Oct 05, 2011 1:28 pm

Hi chaps.

I want a node showing all classical music in a particular folder.

<Genre> = '%Classical%' OR <Genre> = 'Classical (Opera & Vocal)' OR <Genre> = 'Classical (Opera Complete)' AND Songs.SongPath LIKE '%\Masters\%'

This doesn't work as it shows all music, not just that in folder "Masters".

I'm guessing the (.) button would do the job but I can't get it to work. Any help?

S
Last edited by Lowlander on Wed Oct 05, 2011 1:41 pm, edited 1 time in total.
Reason: Merged with existing topic

willyvds
Posts: 374
Joined: Tue Feb 24, 2009 3:30 pm

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

Post by willyvds » Wed Oct 05, 2011 6:15 pm

Have you tried to put ( ) around all the OR clauses? AND prevales above OR.
I think you get OR A OR B OR (C AND D). You want (OR A OR B OR C) AND D.
Regards, Willy

ScottBolton
Posts: 17
Joined: Fri Jul 28, 2006 8:53 am

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

Post by ScottBolton » Fri Oct 07, 2011 11:25 am

Firstly, apologies for hijacking this post - I thought I'd hit "New Post".

Next, thanks Willy.

Code: Select all

( <Genre> = '%Classical%' OR <Genre> = 'Classical (Opera & Vocal)' OR <Genre> = 'Classical (Opera Complete)' ) AND Songs.SongPath LIKE '%\Masters\%'
I originally had the path at the front and the AND (...) bit didn't work. Switching the parts round did the trick.

S

Viper21
Posts: 47
Joined: Thu Jun 05, 2008 2:25 pm

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

Post by Viper21 » Fri Oct 14, 2011 12:57 pm

Hi MN experts (ZvezdanD :D)

I am currently using the following mask to give me all tracks from a single randomly-selected artist:

Code: Select all

<Group|name:My Magic Nodes|Show tracks:No>\1 Random Artist|Icon:Top level|Child of:Library\<Artist|Sort order:Random|Top:1|Show rank:Yes>
The problem is that any track that is performed by 2 or more artists is listed as a unique artist and is excluded from other playlist tracks when just one artist (the first in the string) is selected.
To simplify my explanation, I will provided an example... with the above mask, the following tracks would never be selected together if "Queen" is the randomly-selected artist - only the first would be displayed in the magic node:
  • Queen - Track 1
  • Queen feat. Elton John - Track 2
  • Queen with George Michael - Track 3
  • Queen & Sting - Track 4

Is there any way the above mask could be tweaked so that it ignores anything in the artist after "feat.", "with", or "&"? In other words, all 4 tracks would be displayed in the MN if "Queen" is the randomly-selected artist.

I know MN comes with a preset mask that shows artists with collaborations, but I was unable to merge the two to get something that worked for me. Here is the mask of that preset node (by the way, I manually added "with" - perhaps you want to add it to the next version):

Code: Select all

<Group|Name:Artists...|Show tracks:No>\Main artist (only with collaborations)|Icon:Top level\<Artist|Unknown:No|Statistic:Count(All)|Ex Left of: feat. |featuring |vs. |pres. |presents|with >
Thank you.
-Viper21

Post Reply