Nodes are the elements of the navigation tree structure of the MediaMonkey interface. Magic Nodes is an add-on which lets you create new tree nodes in an intuitive and highly configurable way using masks which are loosely based on the way Auto-organize works. Masks could contain SQL filters, which provides ultimate flexibility for the creation of nodes with Auto-playlist functionality. There are 380 already predefined masks, for example: tracks without lyrics, artist grouped by first letter [A]-[Z], albums sorted by year, playing statistics, album ratings, random tracks, ... Magic Nodes add-on is based on the 1.3b version of the script by Pablo Shmerkin, but it is almost completely rewritten and drastically improved.
Download:
http://solair.eunet.rs/~zvezdand/MagicNodes.htm
If you are the first time user, it is recommend that you read the manual in the PDF format written by Rick Parsons (currently covers v1.7.6.2): http://west-penwith.org.uk/misc/MagicNodes.pdf. If you are using some skin which is not supported by default, you could take a look of MN skin styles made by nynaevelan at the next forum thread.
Installation:
- For MediaMonkey 3.0 or higher, just double-click on the MagicNodes.mmip file; if you are on Vista or Win7 and you got "Product installation error", make sure you have MM3 set to "Run as Administrator"; if you downloaded the installation package with IE7 and it changed its extension to a .zip, you should first change it back to a .mmip.
- For MediaMonkey 2.x, rename a .mmip extension to a .zip, extract MagicNodes.vbs and MagicNodes.ini files to the MediaMonkey's "Scripts\Auto" folder and restart MM program.
Important:
Split options are changed in v4.0 and your masks containing them will not work as they should. You need to update such masks accordingly to the information about usage of Split options that could be found at the Information section on this page.
Since v1.7.6 of this script there is an installation package. If you have already installed some older version (those with version number in the file name), you should manually remove it from the Script/Auto folder before the installation.
FAQ:
- Q. Is there a way that when starting MM3 the Magic Nodes tree is NOT expanded?
- A. Go to Tools / Options / General - Magic Nodes Options, check Skip expanding of the Magic Nodes branch during start-up. Alternatively you could put all your Magic nodes into some new group instead of the Magic Nodes branch. You only need to put the Group pseudo-field in the front of each mask and leave the Magic Nodes branch empty.
- Q. If I ... (do something), the Magic Nodes nodes disappear. I can get it to reappear by creating a new Magic Node. Any ideas on what else to do to keep Magic Nodes visible?
- A. You are most probably unchecked Magic Nodes in the Tools / Options / Library - Filter and Views / None (Show all Tracks) / Configure / Default View Options dialog. There exists a faster way to get the mentioned dialog box: right click on the tree panel, select Options / Choose Tree nodes.
- Q. In the MM artist/album node I can rename the album directly in the node. If I have a Magic node with same fields I can't rename album in the tree. Is this peculiar to MN or should I alter something?
- A. Go to Tools / Options / General - Magic Nodes Options, check on the option Allow modifying of fields data by drag & drop or renaming tree nodes. By the way, drag & drop and renaming are not allowed for nodes which contain only part of field, i.e. nodes with Left of/Right of/Trim/SubStr/Split by qualifiers."
- Q: How do I get the mask to skip unrated tracks and just make an average of rated ones? Right now it will only display averages for artists or albums which have all their tracks rated.
- A: If there are Sort by or Statistic fields that are undefined, then the function is NOT applied by default. For example: <Album|Sort by:avg(Rating)> only displays the average rating for albums where ALL songs have been rated. For the others, just the album in alphabetical order is displayed. If you want to display these values even for those albums which only have some tracks rated, go to Tools / Options / General - Magic Nodes Options, and uncheck Display sorting/statistic results only if all values are defined.
- Q. Is there any way to stop Magic Nodes from rounding Ratings off to the nearest 0.5 stars? I want to get finer graded values with 2 decimal digits.
- A. Go to Tools / Options / General - Magic Nodes Options, uncheck Display sorting/statistic results for Rating rounded to the nearest half star.
- Q. My Album Artist mask lists bands beginning with "the" (e.g. The Rolling Stones) under the letter R, as "The Rolling Stones". How can I get it to still list it under R, but as "Rolling Stones, the"?
- A. Go to Tools / Options / General - Magic Nodes Options, check on the option Move prefixes to the end when sorting by Artist, Album Artist or Original Artist.
v4.2 - 2011-07-01
* Added: possibility to place nodes into the Collections, MM filter option in GUI changed to Collection, nodes outside Collections cannot have applied MM filters, but only MN filters [MM4];
* Added: drag&drop with Ctrl key for nodes with multi-item fields;
* Fixed: renaming of nodes (modifying their caption) for multi-item fields.
v4.1.5 - 2011-06-22
* Fixed: filters with <Track Number> = '' and <Disc Number> = '';
* Fixed: collapsing of Magic nodes when collection is changed [MM4].
v4.1.4 - 2011-05-29
* Fixed: Show if empty qualifier of the global node set by GUI when a mask doesn't contain any local node.
v4.1.3 - 2011-05-09
* Added: 6 new masks, some old improved (mainly in the Artist Ratings group);
* Fixed: missing nodes which don't contain specified string of the Split by qualifier (broken since v4.0);
* Fixed: clearing the field by setting the empty caption of a node.
v4.1.2 - 2011-03-07
* Fixed: long execution time when opening nodes with Album field on some sub-level and Min/Max Tracks qualifier (broken since v3.0).
v4.1.1 - 2011-02-18
* Fixed: hangup of program with some large masks;
* Fixed: error on uninstall of add-on;
* Fixed: random error on start-up with the last selected node on exit from Magic Nodes branch [MM4].
v4.1 - 2011-02-07
* Added: Odd Parts and Even Parts arguments for Split Mode qualifier which allow usage of Involved People field in ID3 format (please read the Information section about their usage);
* Added: First Artist with Title, First Album Artist with Album, Poly Artist, Poly Album Artist, Poly Artist with Title and Poly Album Artist with Album fields;
* Added: 50 new masks, some old improved;
* Improved: import/export of masks with the same caption, but different contents;
* Fixed: error with Parts * splitting modes and fields containing single apostrophe (');
* Fixed: wrong masks copied from MM Forum using Select All command;
* Fixed: skin styles path [MM4];
* Fixed: error on start-up with the last selected node on exit from Magic Nodes branch [MM4].
v4.0.4 - 2010-06-24
* Added: 7 new masks;
* Fixed: error with Multi Composer qualifier.
v4.0.3 - 2010-05-21
* Fixed: error with String Before/String After arguments used with Left of/Right of qualifiers;
* Fixed: moving of nodes withing some group to the Playlists branch;
* Fixed: plus sign for expanding global node when none sub-node exists.
v4.0.2 - 2010-04-21
* Added: 12 new masks (mainly in Random folder);
* Fixed: drag & drop and renaming of nodes (broken in v4.0);
* Fixed: incorrect time unit for Song Length with Filter spinedit control in Settings dialog box.
v4.0.1 - 2010-04-04
* Fixed: error with Range function when "Display sorting/statistic results only if all values are defined" is turned on.
v4.0 - 2010-04-01
* Added: possibility to get nested playlists with local level nodes using Child of:Playlists and Position:Child (until now only global level of nodes inside of the Playlists branch was possible);
* Added: Split mode qualifier with several possibile arguments: String Part (old Split Part values >= 0), String Before, String After, Single Part, Parts Before, Parts After, All Parts (old Split Part = -1) and Categories; for their usage please take a look at the Information section;
* Added: possibility to specify negative values for Split part qualifier, in which case parts are counting from the right to the left;
* Added: possibility to use Substring/Trim/Left/Right of qualifiers with the multi-item split using the new * Parts arguments;
* Added: Artist with Title, Title with Artist and Title with Artist plus Album fields displayed as Artist - Title, Title (Artist) and Title (Artist - Album) respectively;
* Added: First Artist, Other Artist, First Album Artist, Other Album Artist, First Genre and Other Genre fields, e.g. for displaying main genre and subgenres;
* Added: Lyrics, Date and Original Date fields as nodes (until now only as a part of the Filter expression) [MM3];
* Added: Month, Day, Original Month and Original Day fields (month displayed as text in locale language) [MM3];
* Added: Year Played, Month Played and Day Played fields (month displayed as text in locale language);
* Added: Range custom aggregate function (could be used with same fields as other aggregate functions within Sort by and Statistic qualifiers, e.g. Range(Year) is same as Max(Year) - Min(Year));
* Changed: Split options are changed and your masks containing them need to be updated; please take a look at the Information section;
* Changed: controls from the Filter group are now always enabled (until now they are enabled only when the global level node is selected in the Nodes listbox, however this behavior could be reversed in the future if I decide to add a possibility for Filter to be specified with the local level nodes);
* Fixed: multi-item split and Split by, Left of and Right of qualifiers with lower case characters;
* Fixed: multi-item split and renaming of MN playlists with MM2.
v3.0.3 - 2009-09-08
* Fixed: groups not created inside of the Library branch until restart (bug introduced in v2.2.2).
v3.0.2 - 2009-09-08
* Fixed: error with the Statistic and Show if empty qualifiers used on the global level;
* Fixed: error with the filter: <Any> = '' (although comparing <Any> field with empty string has not too much sense);
* Fixed: space character on the begin/end of the sub-string when using Split by:-1.
v3.0.1 - 2009-09-07
* Fixed: error during the first install.
v3.0 - 2009-09-06
* Added: possibility to create playlists using Child of:Playlists and Position:Child (a full description at the Information section);
* Added: Refresh Magic Node option to the tree context menu when you right-click on some Magic node in the Playlists branch;
* Added: Modeless MN Settings dialog box (allowed access to other parts of the program) option;
* Added: Expand node after applying the save option, even if it is collapsed option;
* Added: <Any> pseudo-field for the Filter qualifier (using fields specified on the Search tab in the Options dialog box);
* Added: Cover Description, DateTime Played, DateTime Last Played, DateTime Added and DateTime Modified fields;
* Added: Show ordinal numbers option and corresponding Show rank qualifier;
* Added: possibility to use Show if empty option/qualifier for all local nodes except the last (deepest) one, with the hidden plus sign for nodes without sub-nodes; especially useful when Unknown qualifier for the next level is set to No, e.g. <Album|Show if empty:Yes>\<Disc Number|Unknown:No> (mask examples - Genres and sub-genres and Drives & Folders in the Split examples branch);
* Added: possibility to use Split by/Split part qualifiers in combination with Left of/Right of qualifiers (mask example - Sub-folders of Music folder in the Split examples branch);
* Added: support for multiple values with fields that are not multi-items, e.g. Involved people or CustomX, using Split by qualifier and Split part:-1 (mask example - Multi-item Custom 1 field in the Split examples branch);
* Added: support for multiple values with several levels of categorization, e.g. each person in the Involved people field could belong to some involvement group and could have one or more roles (mask examples - Involved People by... in the Split examples branch);
* Added: many new masks, some old improved and better organized;
* Added/Changed: drive letter to the Path field;
* Changed: Save button now have 3 possible states depending of modifications in the Settings dialog - Rename, Update and Add (it is now much easier to create a new mask based on some existing one);
* Improved: speed of Count(Items) function, it is now as fast as Count(some_field) [MM3];
* Fixed: Statistic qualifier used on the global (caption) level with the Filter qualifier.
This post is already too long for this forum and needs to be shortened. If you are interested about details of older versions of this add-on, their full history could be found on the link from the begin of this post.
-------------------------------------------------------------------------------------
Information about version 4.1:
Split Mode qualifier could accept two new arguments, Odd Parts and Even Parts. They are similar to Categories argument since they have the same execution order of parsing command, i.e. the Split by qualifier is applied first, then the each resulting part of the string is parsed using Left/Right of qualifiers (if they are specified). Main difference is that Categories argument returns all parts from some string, but Odd Parts and Even Parts returns only every other part of string alternatively.
Usage of these qualifiers is most practical with the Involved People field if it is stored in the ID3 format. For example, the earlier illustration with "Vocals: Bono; Guitars: The Edge; Bass: Adam Clayton; Drums: Larry Mullen, Jr." is not compatible with the ID3 standard, and it should be written as "Vocals;Bono;Guitars;The Edge;Bass;Adam Clayton;Drums;Larry Mullen, Jr.", i.e. the same separator ";" is used between roles and persons and between persons themselves. So, if you have such format and want to display all roles, you could write <Involved people|Split by:;|Split Mode:Odd Parts>. Also, if you want to display persons, you could write <Involved people|Split by:;|Split Mode:Even Parts>.
With these two new arguments you have a possibility to specify roles and sub-roles using Exclusive Left of and Exclusive Right of qualifiers as well. Here is the same Involved People example as before, but adjusted for ID3 tag: "Band member-Vocals;Bono;Band member-Guitars;The Edge;Band member-Bass;Adam Clayton;Band member-Drums;Larry Mullen, Jr.;Guest musician-Guitars;B.B. King;Guest musician-Vocals;B.B. King". To get main roles you should write <Involved people|Split by:;|Split Mode:Odd Parts|Exclusive left of:->, to get sub-roles you should write <Involved people|Split by:;|Split Mode:Odd Parts|Exclusive right of:-> and to get persons you should write <Involved people|Split by:;|Split Mode:Even Parts>.
With this version of the add-on there are 4 new <Poly *> fields. They are similar to <Multi *> fields, but their display in the Tree panel is more friendly. For example, with Multi Artist = "David Bowie; Queen" we would get displayed Poly Artist = "David Bowie & Queen". If there are 3 or more artists in some multi-item Artist field, only the last one would be separated with "&", other ones would be separated with ", ". Some users prefer to store the type of the featuring artists as new item in multi-item Artist field, for example: Multi Artist = "Freemasons; feat.; Siedah Garrett" - using <Poly Artist> field you would get "Freemasons feat. Siedah Garrett". Here are several more examples:
- "Dave Armstrong; Redroche; feat.; H-Boogie" -> "Dave Armstrong & Redroche feat. H-Boogie",
- "Jerry Ropero; Denis The Menace; pres.; Sabor; feat.; Jaqueline" -> "Jerry Ropero & Denis The Menace pres. Sabor feat. Jaqueline",
- "Robbie Rivera; Axwell; JJ; feat.; Suzan Brittan" -> "Robbie Rivera, Axwell & JJ feat. Suzan Brittan".
-------------------------------------------------------------------------------------
Information about 4.0 version:
Several added things need some more explanations; the first is possibility to generate nested playlists. I think it is pretty straightforward - just enter your mask as usual and specify Child of:Playlists and Position:Child qualifiers or using GUI you should choose Position: Child of - Playlists (first select Playlists from the second dropdown list, then Child of from the first one). Well, it is the same syntax which is already introduced with the version 3.0, but the big difference is that now you could specify sub-nodes, e.g.
Code: Select all
Test mask|Child of:Playlists|Position:Child|Filter:<Lyrics> <> ''\<Arstist>\<Album>
If you want to move some existing node from the Magic Nodes to Playlists branch, but you don't want to get sub-nodes, you have two possibilities: you could remove sub-nodes from the mask or you could turn off the Show nodes option, but that option could be used only for the last (bottomless) level of nodes, so that possibility is only applicable for masks with only one sub-level of nodes.
The introduction of the next possibilities is a reason for masks incompatibility with older versions, i.e. none of your masks with the Split by qualifier will not work as you want. The first important thing you should know is that all non-negative values for Split part are now shifted for +1. For example, instead of Split part:0 you should now specify Split part:1 and so on. Beside of the added functionality, I think this is also more natural/logical, because the specified value now represents the actual part of the field which you would get, instead of the previous version where you was forced to specify Split part:0 for the first part, Split part:1 for the second...
However, beside of the better logical representation, the main reason for such change is the added possibility for use of the reverse parsing, i.e. the parsing from the right to the left, using negative values for the Split part qualifier in a similar way as you could specify negative values for the Substring start and Trim qualifiers. So, if you specify Split part:1 you would get the leftmost part and if you specify Split part:-1 you would get the rightmost part of the field. Of course, if you specify Split part:-2 you would get the second part of the field from the right, and so on.
The another important thing that you should know, is that now you need to specify Split mode:String part if you want the same behavior as with the previous versions, of course with already explained difference for Split part values. For example, if you had Split by:;|Split part:1, you should now write Split by:;|Split part:2|Split mode:String part. Here are some more examples - let say that I have the Path = "c:\My Music\Pink Floyd\Us and Them.mp3" and using the Split by:\\|Split mode:String part:
* with Split part:1 or Split part:-4 I would get "c:";
* with Split part:2 or Split part:-3 I would get "My Music";
* with Split part:3 or Split part:-2 I would get "Pink Floyd";
* with Split part:4 or Split part:-1 I would get "Us and Them.mp3".
If the Split mode qualifier has just that single argument (String part), then there wouldn't be any reason for its introduction. So, beside of the String part argument, the Split mode qualifier also accepts String Before, String After, Single Part, Parts Before, Parts After, All Parts and Categories arguments. Here are examples using the same Path value as previous, but now with the Split mode:String Before:
* with Split part:2 or Split part:-3 I would get "c:";
* with Split part:3 or Split part:-2 I would get "c:\My Music";
* with Split part:4 or Split part:-1 I would get "c:\My Music\Pink Floyd";
* with Split part:5 I would get "c:\My Music\Pink Floyd\Us and Them.mp3".
As you could see from those examples, when using String Before you would get the left part of the field's string before the specified part. Here are examples with the Split mode:String After which could be used to get the right part of the field's string after the specified part:
* with Split part:0 or Split part:-5 I would get "c:\My Music\Pink Floyd\Us and Them.mp3";
* with Split part:1 or Split part:-4 I would get "My Music\Pink Floyd\Us and Them.mp3";
* with Split part:2 or Split part:-3 I would get "Pink Floyd\Us and Them.mp3";
* with Split part:4 or Split part:-2 I would get "Us and Them.mp3".
Negative values for Split part used with String * arguments (String part, String before, String after) of the Split mode qualifier is not possible with MediaMonkey 2.x, but only with v3.x. Be careful, if you use String * arguments, and if you specify the large value for Split part, you could get the error message! This is because the complexity of the generated SQL code raises exponentially with each value increment.
The next argument of the Split mode qualifier is Single part. It has almost same effect as String part, with some pros and cons. Its advantage is that it does not generate the error message with the large values for Split part, since it is not using the SQL code, but VBScript instead. However, its drawback is that it cannot be used with Sort by/Statistic qualifiers as well as almost none Show * qualifiers. Same advantage and drawback have all remained Split mode arguments.
The Parts before and Parts after arguments are similar to the String before and String after arguments respectively, but instead of the one resulting node with concatenated multiple parts of the string, they could generate multiple nodes with the single parts of the string each. Let's see again what we got with Split mode:String After|Split part:1 - "My Music\Pink Floyd\Us and Them.mp3". This is just one node. Now, if we replace String after with Parts after, we would get three nodes on the same level: "My Music", "Pink Floyd" and "Us and Them.mp3". Well, this example with the Path field is not the best nor too much useful, since those arguments are better with the multi-item fields or those fields that could contain multi-item values like the Involved people. Let's try again with some another field, e.g. <Multi Genre> = "Dance;House;Club". Using Split mode:String After|Split part:1 we would get one "House;Club" node, but using Split mode:Parts After|Split part:1 we would get two nodes on the same level - "House" and "Club".
The All parts argument is the special case of the previous argument, i.e. it has the same effect as Split mode:Parts After|Split part:0 where all parts are displayed as nodes on the same level within their parent node. This argument is default for the Split mode qualifier, i.e. if you omit this qualifier it would be same as if you specify Split mode:All parts. If you are using this argument you don't need to specify the Split part qualifier (it would be ignored). Also state for the next, Categories argument.
Now, you may think that All parts argument has the same effect with multi-item fields as previous versions of add-on using Split part:-1, but this is not exactly the case; it is the Categories which has the same effect. For example, if you had the mask with Split by:;|Split part:-1, you should now write Split by:;|Split mode:Categories. The main difference between those two arguments is in the order how parsing of the initial field's string is done, and such explanation requires some digression about existing qualifiers which could be used for parsing.
I suppose that you already know that we have several ways to parse the initial field's string. There are Substring start and Trim qualifiers, then there is the Split by qualifier and finally there are (Ex) Left of and (Ex) Right of qualifiers. The older versions of this add-on didn't have a possibility to use those qualifiers with each other, i.e. you could not use Split by together with Trim or Left of. Well, this was improved in time and now you could freely combine all those qualifiers, but I never explained what is happening internally, and I think that you should know that. The parsing of the initial string is executed in 3 steps: in the first step the initial string is parsed using the Left/Right of qualifiers, then the newly string is parsed with the Split by qualifier and finally the resulting string is parsed using Substring start/Trim qualifiers.
Here are some examples using the same Path value as before. If I write Right of:My Music\\|Split by:\\|Split mode:String part|Split part:2, in the first step the initial string would be trimmed from the left using the Right of qualifier (resulting with "Pink Floyd\Us and Them.mp3"), then in the second step the resulting string would be parsed using Split qualifiers, so finally I would get "Us and Them.mp3". This is the nice trick to know if you need to use Split part qualifier with large values and some of String * arguments, since if you use Right of you could decrease the Split part value and avoid generating of the error message.
The presented order for parsing of the string is almost always same, the only exception is the Categories argument, and this is the main difference between All parts and Categories arguments. With the All parts argument the initial string is parsed first using Left/Right of qualifiers (if they are specified), then it is parsed using the Split by qualifier, as it is already explained. With the Categories argument instead, the initial string is first parsed using the Split by qualifier, then the each resulting part of the string is parsed using Left/Right of qualifiers (if they are specified).
Here is same example as with the 3.x version of add-on, but instead of Split part:-1 we now should use Split mode:Categories: Involved people = "Vocals: Bono; Guitars: The Edge; Bass: Adam Clayton; Drums: Larry Mullen, Jr.". If we write Split by:; |Split mode:Categories|Ex Left of:: , the initial string is parsed first using Split by qualifier and we get 4 parts "Vocals: Bono", "Guitars: The Edge", "Bass: Adam Clayton" and "Drums: Larry Mullen, Jr." In the next step the each part is parsed using the Ex Left of qualifier, so we finally get four nodes on the same level: "Vocals", "Guitars", "Bass" and "Drums".
Here is one example that not worked before as it should: Comment field = "Country: France/USA". If we use Ex Right of:: |Split by:/|Split mode:Categories we are still parsing the string using Split by first and so we would get two parts: "Country: France" and "USA". In the next step, after parsing with Ex Right of we would get only one node "France", because "USA" part doesn't contain ": " separator. Well, such field layout could be modified for use with the previous qualifiers, i.e. the Comment field could be modified to "Country: France/Country: USA", but it would be really annoying to modify tags in all tracks. Luckily, there is now this new argument, All parts, which should be used with the presented field layout as: Ex Right of:: |Split by:/|Split mode:All parts. With this argument we first get trimmed the initial string from the left using Ex Right of, so we get "France/USA"; then we parse resulting string using Split by, so finally we get two nodes, "France" and "USA".
There are 4 basic modes for parsing the string using the Categories argument, depending of used (Ex) Left/Right of qualifiers:
1. using the Exclusive left of qualifier to get the leftmost part;
2. using the Exclusive right of qualifier to get the rightmost part;
3. using the Exclusive right of and Exclusive right until qualifiers to get the middle part;
4. using the Exclusive right of and Right until qualifiers to get splitted right part(s).
The first 3 modes are pretty self-explanatory and already known from the previous version of the add-on. Here is again the same example as before: "Band member-Vocals: Bono; Band member-Guitars: The Edge; Band member-Bass: Adam Clayton; Band member-Drums: Larry Mullen, Jr.; Guest musician-Guitars: B.B. King; Guest musician-Vocals: B.B. King". Here we have involvement groups on the leftmost side: "Band member" and "Guest musician", then we have roles in the middle: "Vocals", "Guitars", "Bass" and "Drums", and finally we have musicians on the rightmost side: "Bono", "The Edge", "Adam Clayton", "Larry Mullen, Jr." and "B.B. King".
Those 3 modes are sufficient if we write category for each artist, but it could lead to the duplicated text. For example, if some track have two vocalists, we need to enter e.g. "Vocals: Bono; Vocals: The Edge; Guitar: The Edge". Now, it would be nice if we could write: "Vocals: Bono/The Edge; Guitar: The Edge". This is exactly where could be used the forth mentioned mode of the Categories argument: with the Split by:; |Split mode:Categories|Exclusive left of:: we could get the leftmost part as usual: "Vocals" and "Guitar", and now using Split by:; |Split mode:Categories|Exclusive right of::|Right until:/ we could get "Bono" and "The Edge" (of course, in this example "The Edge" would be under two nodes, Vocals and Guitar).
Here is the last example which demonstrates usage of Categories argument with the mentioned forth mode. Let say that we have Custom1 field = "Country: France/USA; Tones: Reflective/Ethereal; Style: Prog-Rock/Art Rock". We could create just one mask for all included categories: Example\<Custom 1|Split by:; |Split mode:Categories|Ex Left of:: >\<Custom 1|Split by:/|Split mode:Categories|Ex Right of:: |Right until:/>. With this mask we would get two level of nodes; on the first level we would get "Country", "Tones" and "Style" nodes, where the "Country" node would contain two sub-nodes, "France" and "USA", the "Tones" node would contain "Reflective" and "Ethereal" sub-nodes, and finally the "Style" node would contain "Prog-Rock" and "Art Rock" sub-nodes.
The 4.0 version has also added First/Other Artist/Album Artist/Genre fields. For example with the First Genre field I could get the leftmost (main) genre from the multi-item genre, and with the Other Genre I could get remaining genres (sub-genres) from the multi-item genre. For example, with "Dance;House;Club" using First Genre I would get "Dance" node, and using Other Genre I would get two nodes on the same level: "House" and "Club". Well, I could get almost same results using Left of:; for the first genre, and using Split by:;|Split mode:Parts After|Split part:1 for the remaining genres, but, as I already mentioned, the nodes with the Split mode:Parts After cannot have Statistic qualifier and have some another drawbacks which the First/Other fields don't have.
-------------------------------------------------------------------------------------
Information about 3.0 version:
The main addition to this version is a possibility to create static playlists. Well, I think they are on the half way between static playlists and auto-playlists. Instead of other "normal" Magic nodes which are updated every time when you expand or select them, Magic nodes in the Playlists branch are updated only when you choose the Refresh Magic Nodes option from the tree context menu (or if you change corresponding mask, of course). You could have nested playlists using the Group option in the Settings dialog. To define some mask as playlist you should add |Child of:Playlists|Position:Child of to the global level of the mask or using GUI you should choose Position: Child of - Playlists (first select Playlists from the second dropdown list, then Child of from the first one).
The limitation is that you cannot create local node levels in the playlist branch, only group and global. So, you could create a node with specified filter, but such node cannot contain sub-nodes. Well, you could add sub-levels, but they would not be created/displayed. Show tracks, Statistic and Icon qualifiers also have not any effect on those nodes. Magic nodes from the Playlists branch should be removed or renamed using the MN Settings dialog box (or using the Delete Magic Node option from the context menu if you want to remove a mask/node) - if you remove /rename node using options from the context menu with same name or by press on the Delete/F2 keys, a mask would not be updated.
The second addition to this version which needs explanation is a possibility to use (almost) all fields as multi-item, even if they are not enabled as multi-item by MM. You should enter the splitting character with the Split by qualifier and you should specify -1 for the Split part qualifier. If you specify 0 or some positive value for the Split part qualifier, you would get exactly that part of the field string as before. So, you could use for example Custom1 field for languages and if some tracks has two or more languages in it, all of them would be displayed for that track. The limitation is that you cannot use Sort by/Statistic qualifiers as well as almost none Show... qualifiers.
The third addition is some kind of an extension to the previous. You could specify several categorization levels which is most useful with the Involved People field. So, you could have involvement groups: Band member, Guest musician, Production..., and you could have roles: Vocals, Guitars, Bass... as in the next example: "Band member-Vocals: Bono; Band member-Guitars: The Edge; Band member-Bass: Adam Clayton; Band member-Drums: Larry Mullen, Jr.; Guest musician-Guitars: B.B. King; Guest musician-Vocals: B.B. King". You should define the first level of categorization using the Split by:;, Split part:-1 and Exclusive Left of:-. The second level should have Split by:;, Split part:-1, Exclusive Right of:- and Exclusive Right until::. Finally, you could get persons using Split by:;, Split part:-1 and Exclusive Right of:: Of course, you could specify only one level of categorization, e.g. "Vocals: Bono; Guitars: The Edge; Bass: Adam Clayton; Drums: Larry Mullen, Jr." Just take a look at sample masks from the Split examples branch.
-------------------------------------------------------------------------------------
Information about 2.0 version:
Just take a look...
More than 420 KB of source code! Almost twice in size of the previous version, 7 times of the last official version, almost completely rewritten and drastically improved!
Well, I though it would be obvious, but maybe I need to mention several things. First, there are three different ways to edit some existing mask:
1. Edit / Magic Nodes Settings, then choose mask's caption from the Caption dropdown list, edit it and click on the Save button.
2. Edit / Magic Nodes Export/Import, then click on the number of the needed mask from the # column, edit it and click on the OK button.
3. right-click on the needed node in the tree panel, choose Edit Magic Node, then edit mask and click on the OK button.
If you want to create a new mask, you should use Magic Nodes Settings dialog - just click on the New button, type some text in the Caption field and set some fields and its qualifiers.
If you want to create a new mask based on some existing mask by modifying some fields/qualifiers, you should use same dialog, choose initial mask from the Caption dropdown list, change its name and make necessary modifications on parameters; when you finish with them you should close this dialog box and enter it again (note number 0/xx in the Move label), just after that you should click on the Save button and mask will be saved as a new, not overwriting the initial one.
All controls in dialogs are implemented and there are not a fake one! If some control is currently disabled this means that it is not active in that context. For example, Save/OK buttons are not enabled until you make some change in a dialog. This also stand for SQL editor - if you make some change on the SQL query, you could choose the OK button to execute modified query, but if you click on the Cancel button this means that you want to execute initial query before its modification, but not to abort started action. Some qualifiers are active only with some levels of fields or in some combination, for example Trim/Substr. are mutually exclusive with Left of/Right of and Split by/Split part qualifiers; Icon control is active only for global (caption) and group levels, but not for field levels; Sort keys controls are active only for field levels, but not for global/group levels...
I think that almost all existing features with fields and qualifiers are supported with this new GUI, even specifying multiple sorting keys or statistic arguments with listboxes. Only one feature which is not implemented in some easier way e.g. with some kind of list for multiple arguments of Left of/Right of qualifiers - you still could use the "|" symbol to separate them if there are many (for example, you could type featuring|feat.|vs|presents). The backslash could be used with Left of/Right of/Split by - it is enough to type it once, but it is stored in the mask as two backslash characters. The "<" and ">" characters are not allowed for Left of/Right of/Split by qualifiers - if you try to type them, you would get an invalid mask and only way to continue with its modification is to edit the mask in the Mask edit box.
The new Show node qualifier could be used with the last (bottom) level of some branch. It is most useful with Sort order:Random when you don't want to display nodes, but only tracks in the tracklist. However, it could be also used if you want to display only global (caption) node when it contain some field sub-node which contain some filtering qualifiers (e.g. Top, Min tracks, Max tracks).
-------------------------------------------------------------------------------------
Information about 1.8 version:
Most notable additions are Split by and Split part qualifiers. Split by should have specified a string argument and Split part should have an integer greater or equal to 0. For example, if I have <Path> = ':\My Music\Rock\Pink Floyd', with the mask which contain <Path|Split by:\\|Split part:2> I would get "Rock" as a result (the leftmost part before the first "\" is 0, the second part is 1, and so on). The backslash could be specified with Left/Right of/until/Split by qualifiers, but as double characters. Please beware - the Split by qualifier is not very fast, especially for larger Split part arguments.
Next added is a possibility to specify Random or Rnd as argument for the Sort order qualifier which is most useful when combined with the Top qualifier. I think its purpose is self-explanatory, but just to mention - it could be used with any field. For example, <Artist|Sort order:Random|Top:10> would return 10 random artists. If you want 10 random tracks, you could use <Path|Sort order:Random|Top:10> (the Title field is not good for such thing because the title names are not unique).
Since now the Count aggregate function could be used with the Sort by/Statistic qualifiers only with All and Tracks arguments, except that additionally Statistic supports the Item argument. Now you have a possibility to specify any MN field as argument, even with the Statistic qualifier used on the global level. For example: <Genre|Statistic:Count(Artist), Count(Album)> would return the number of artists and albums for each genre. The Count function with specified field is better to use instead of Count(Items) because it is faster. The limitation of this addition is in fact that only MM3 is supported.
-------------------------------------------------------------------------------------
Information about 1.7.x beta version:
Here is one more update. Most significant addition is optional grouping with the unlimited numbers of hierarchy level. Well, we already had grouping in the tree window, but only using existing fields for each new node level. Now, you could add optional Group pseudo-fields in the front of the mask, i.e. before the mask caption and global qualifiers. Here is a new syntax where [] indicates optional and * indicates repeat 0-n times:
Code: Select all
[<Group|Name:characters[|Group qualifier]*>\]*Caption[|Global qualifier]*\<Field[|Local qualifier]*>[\<Field[|Local qualifier]*>]*
Others supported qualifiers are Child of, Position, Icon and Show tracks. Most of this qualifiers are already known, except of the Position qualifier for specifying the location of the node relative to its top-most parent, which could have following values: Before, After (default for all nodes, except Magic nodes), First child, Last child (default for Magic nodes). There are some limitations for values of the Position qualifier: Magic nodes could be specified only with First child or Last child, but on another side Location, Artist, Album, Genre, Year, Rating, Virtual CD, Previews, Playlists and My Computer could be only in combination with Before or After. Other supported nodes (Library, Classification, Files to Edit, Now Playing, Net Radio and Web) could be used with all Position values.
Almost all of mentioned Group qualifiers could be specified for each group level. Child of and Position could be specified as global or group qualifiers (after Caption or inside of Group brackets), but they could be used only once for the full mask. Here is an example:
Code: Select all
<Group|Name:Problematic tracks|Show tracks:No|Child of:FilesToEdit|Position:Last child>\Tracks without lyrics|Filter:<Lyrics> = ''\<Title>
I think it is obvious, but just to mention - general rule is that specified string for the Name qualifier should be the same for all sub-nodes which you want to put inside of the same branch. Well, this is not enough - Child of and Position values should be the same also. This is because you could need to put two groups with the same name inside of two different parents: for example one inside of the Files To Edit and another inside of the Net Radio. So, here is an example for the second node inside of the previously mentioned branch:
Code: Select all
<Group|Name:Problematic tracks|Show tracks:No|Child of:FilesToEdit|Position:Last child>\Tracks without comment|Filter:<Comment> = ''\<Comment>
With a new grouping possibilities you don't need to have Magic Nodes branch at all. You could create nested nodes wherever you want - those branch will not be expanded during startup (only Magic Nodes branch is expanded by default).
I added also 4 more qualifiers for parsing of field text: Exclusive Left of, Exclusive Right of, Right until and Exclusive Right until. The Left of qualifier changed its behavior - until now it was displayed all field values, even those which don't contain specified string. I changed that to be consistent with the Right of qualifier (if you want old behavior of the Left of qualifier you should use new Exclusive Left of qualifier). Here is an example with following values of the Path field:
- :\Angie Stone - I Wasn't Kidding [Freemasons Vocal Club].mp3
- :\Faith Evans - Mesmerized [Freemasons Full Vocal Mix].mp3
- :\Freemasons feat. Amanda Wilson - Love on My Mind [Club Mix].mp3
- :\Freemasons feat. Amanda Wilson - I Feel Like.mp3
- :\Freemasons feat. Siedah Garrett - Rain Down Love [Vocal Club Mx].mp3
Left of: feat. (where " feat. " is specified as separator) will now return:
- :\Angie Stone - I Wasn't Kidding [Freemasons Vocal Club].mp3
- :\Faith Evans - Mesmerized [Freemasons Full Vocal Mix].mp3
- :\Freemasons
Exclusive Left of: feat. will return:
- [Unknown node with all values which don't contain " feat."]
- :\Freemasons
Right of: feat. will return:
- :\Angie Stone - I Wasn't Kidding [Freemasons Vocal Club].mp3
- :\Faith Evans - Mesmerized [Freemasons Full Vocal Mix].mp3
- Amanda Wilson - I Feel Like.mp3
- Amanda Wilson - Love on My Mind [Club Mix].mp3
- Siedah Garrett - Rain Down Love [Vocal Club Mx].mp3
Exclusive Right of: feat. will return:
- [Unknown node with all values which don't contain " feat. "]
- Amanda Wilson - I Feel Like.mp3
- Amanda Wilson - Love on My Mind [Club Mix].mp3
- Siedah Garrett - Rain Down Love [Vocal Club Mx].mp3
The Right until: qualifier helps in parsing of fields and should be used in combination with the Right of or the Exclusive Right of qualifiers. Here is an example with previous tracks where "[" is a key string and "Mix]" is terminating string, i.e. it should be returned part of the field value between "[" and "Mix]" or the end of the string:
Right of:[|Right until: Mix] will return:
- Freemasons Vocal Club].mp3
- Freemasons Full Vocal
- Club
- :\Freemasons feat. Amanda Wilson - I Feel Like.mp3
- Vocal Club
Exclusive Right of:[|Right until: Mix] will return:
- [Unknown node with all values which don't contain "["]
- Freemasons Vocal Club].mp3
- Freemasons Full Vocal
- Club
- Vocal Club
The Exclusive Right until: qualifier narrows returned values even more only to those which contain both "[" and " Mix]":
Exclusive Right of:[|Exclusive Right until: Mix] will return:
- [Unknown node with all values which don't contain "[" and " Mix]"]
- Freemasons Full Vocal
- Club
- Vocal Club
Strings for parsing could be specified more than once with all Left/Right qualifiers, even Until ones, and they should be separated with "|".
Exclusive Right of:[|Exclusive Right until: Mix]| Club] will return:
- [Unknown node with all values which don't contain "[" and " Mix]" or " Club]"]
- Freemasons Vocal
- Freemasons Full Vocal
- Club
- Vocal Club
This qualifiers could be used with all textual fields. For example, if I have Involved people field organized like this:
Code: Select all
vocal:Bono;guitar:The Edge;bass:Adam Clayton;drums:Larry Mullen, Jr.
Code: Select all
Guitarists\<Involved people|Exclusive Right of:guitar:|Right until:;>
-------------------------------------------------------------------------------------
Information about 1.6.x alpha version:
This is another update with many bug-fixes and some additions. The Unknown, Min Tracks and Max tracks qualifiers are finally(?) resolved (this was hard one), but statistic information and display of nodes/tracks for Top qualifier didn't. This modification works fine in MM3 with SQLite, but it is catastrophically slow in MM2 with MS Jet. So, with 1.6.2 version of the script, I decided to disable this option in MM2, until I discover a better way to get a same behavior (only if I found the motif to continue the support for old version of the program). This means that MM2 don't have accurate display of statistics/nodes/tracks with mentioned qualifiers, sorry for that. With same version of the script there is resolved a problem with a display of tracks which contains multiple values for multi-item fields.
There are some situations when statistics is somewhat confusing, for example with tracks which have entered multiple values in multi-item fields (MM3) or multiple cover arts. Let say that we have a database with only one Rock track Tobacco Road by Eric Burdon & War which have entered Artist = Eric Burdon;War. If we define a mask:
Code: Select all
G+A\<Genre|Statistic:Count(All)>\<Artist|Statistic:Count(All)>
Code: Select all
- Rock (1 files)
+- Eric Burdon (1 files)
+- War (1 files)
Major syntax change: Field names should be surrounded with < and > when used inside of the Filter qualifier. This resolves a bug with this qualifier because some of masks couldn't worked before, e.g. Filter:Album Artist = 'Various Artist'. Now, it can be written as Filter:<Album Artist> = 'Various Artist' and will work correctly. For similar reason name of the Album and Artist field is changed to the Album with Album Artist and name of the Album and Year field changed to the Album Artist with Album. The Year information from the former Album and Year field is removed, instead for a same result should be used <Album Artist with Album|Statistic:Max(Year)>. Field names should be enclosed only inside of Filter qualifiers, not inside of aggregate functions (Sum,...) of Sort By or Statistic qualifiers!
Examples of new features:
- if you want to display albums sorted by Custom 1 and Year fields, but want to show Year in the front of album names instead of the Custom 1:
Code: Select all
Albums (sorted by Custom 1 and Year)\<Album|Sort by:Max(Custom 1), Max(Year)|Show Sort Key:2>
Code: Select all
Albums (sorted by Year without its display)\<Album|Sort by:Max(Year)|Show Sort Key:0>
Code: Select all
Album Artist - Album (Year)\<Album Artist with Album|Statistic:Max(Year)>
Information about 1.5.x working alpha version:
Major syntax change: Count aggregate function of Sort by and Statistic qualifiers now could have only All and Items arguments, because this is only logical to me. If you think opposite and want to use Count with other arguments which are supported by other aggregate functions (Min, Max, Avg, Sum), you should take old version of the script or give me a very good reason why I should return old behavior of this qualifier.
Just small note: The All keyword could be replaced with the Tracks keyword, so you can write Statistic:Count(Tracks) instead of Statistic:Count(All). Another note is about the Items keyword which could be currently used only with the Statistic qualifier, but not with the Sort by.
Sort by and Statistic qualifiers both accept multiple arguments. Difference is in the fact that only with the Statistic there are displayed all stated values, but with the Sort By you could get displayed only one value (other arguments of Sort By qualifier are used for defining sorting order as multiple keys).
Here are some examples of new features:
- if you want to display total number of tracks and the number of last track from each album:
Code: Select all
Albums (with number of tracks and last track)\<Album|Statistic:Count(Tracks), Max(Track Number)>
Code: Select all
Albums (with number of tracks, file size and song length)\<Album|Statistic:Count(All), Sum(File Size), Sum(Length)>
Code: Select all
Genre, Artist and Album (with number of items)\<Genre|Statistic:Count(Items)>\<Artist|Statistic:Count(Items)>\<Album|Statistic:Count(All)>
Information about 1.4.2 version:
There is a new modified version 1.4.2 with some added functionality. Most notably is new qualifier statistic which takes same arguments as sort by qualifier. Those are aggregate functions count, avg, sum, min & max (first & last is not supported in MM3 database). So, what is a difference in statistic and sort by? Let say that you have following mask:
Code: Select all
Album (Sort by Bitrate)|icon:top level\<album|sort by:avg(bitrate)>
Code: Select all
Album (Average bitrate)|icon:top level\<album|statistic:avg(bitrate)>
Statistical information are displayed next to the main field (in this example, Album) inside of parenthesis. In similar fashion you can display any of mentioned aggregate functions for each of the main field.
Here are some more examples:
- if you want to display number of tracks for each album
Code: Select all
Album (Number of tracks)|icon:top level\<album|statistic:count(all)>
Code: Select all
Album (Total file size)|icon:top level\<album|statistic:sum(file size)>
Code: Select all
Artist (Year)|icon:top level\<artist|statistic:min(year)>
Code: Select all
Genre (Average length)|icon:top level\<genre|statistic:avg(length)>
Please, feel free to inform me if you discover some strange behavior with this script.