Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playlist-Tools-SMP (Read 1180 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.


A collection of Spider Monkey Panel Scripts for foobar2000, built within a menu, which serves as a hub for 'usage examples' and shortcuts to the most requested foobar missing functionalities: remove duplicates by tags, revive dead items, check errors on tags, spotify-like playlist creation, advanced queries, etc.


It's impossible to offer a complete list of the things that can be done with these tools, in a few words: anything related to playlist creation, sorting, library maintenance, automation, etc. But a readme for every utility can be found using the corresponding menu.

The sky is the limit once you use the current scripts to create your own buttons and tools. Currently contains pre-defined use-cases for these scripts:
  • Most played tracks from...
       .\xxx-scripts\top_tracks.js (requires foo_playcount)
       .\xxx-scripts\top_tracks_from_date.js (requires foo_enhanced_playcount)
  • Top Rated tracks from...
       .\xxx-scripts\top_rated_tracks.js (requires foo_playcount)
  • Same by...
  • Dynamic queries...
  • Similar by... (aka Search-by-Distance-SMP)
  • Special Playlists... (contains functionality from the other scripts)
  • Tools...
    • Remove duplicates
    • Query filtering 
    • Harmonic mix (aka Camelot-Wheel-Notation)
    • Sort by key (aka Camelot-Wheel-Notation)
    • Scatter by tags
    • Check tags
    • Write tags 
    • Find track(s) in...
    • Remove track(s) from...
    • Playlist Revive

The menus are highly customizable. They are created on demand according to the selected tracks or current playlist, and many entries can be added, removed or edited to suit your needs. Also if some scripts are missing, the menu is rebuilt skipping those entries (letting you to install selectively what you need).

Also integrates
 1. Search-by-Distance-SMP: creates intelligent "spotify-like" playlist using high-level data from tracks and computing their similarity using genres/styles.
 2. Music-Graph: An open source graph representation of most genres and styles found on popular, classical and folk music.
 3. Camelot-Wheel-Notation: Javascript implementation of the Camelot Wheel, ready to use "harmonic mixing" rules and translations for standard key notations.
 4. Menu-Framework-SMP: Helper which allows to easily create customizable and dynamic menus.

Copy all files from the zip into YOUR_FOOBAR_PROFILE_PATH\scripts\SMP\xxx-scripts 
Any other path WILL NOT work without editing the scripts. (see images\_Installation_*jpg) 
For ex: mine is c:\Users\xxx\AppData\Roaming\foobar2000\scripts\SMP\xxx-scripts\... 
For portable installations >= 1.6: .\foobar2000\profile\scripts\SMP\xxx-scripts\... 
For portable installations <= 1.5: .\foobar2000\scripts\SMP\xxx-scripts\... 
Then load any button script into a SMP panel within foobar. 

There are buttons bars and independent buttons for each script and the playlist tools menu. 'buttons_playlist_tools_menu.js' is associated to the tools menu seen on the gifs, while '_buttons_merged.js' is the entire bar.

Download latest release (or nightly releases) at github:

Re: Playlist-Tools-SMP

Reply #1
For the next release I'm working on macros. i.e. the ability to record and save multiple calls to different menu entries. For ex:
"My macro" -- DO  -> "Most played Tracks" then "Select All" then "Incremental key"

Then calling it...

It works in conjunction with the menu framework I have already shared, which lets you call menu entries by name, even when the menu has not been drawn. Therefore it's feasible to record where the user clicks when calling the menu, and store the different entries clicked for later usage.

At that point the sky is the limit.... for example, you can create a playlist with top rated tracks from 2021, filter playlist to only allow 1 track per artist, then select 1/4 of the playlist and sort it by key and select the rest and filter to only keep tracks with >4 rating. All that in just one click, totally configurable.

Re: Playlist-Tools-SMP

Reply #2
Finally got macros fully working, with a configurable list, like other submenus previously done.
Only limitation:  Can not save user input on popups. Using entries which make use of those on macros will require user input every time they are called later.

To complement the use of macros, 3 new menus has been added: sort, select and cut playlist length.
Sort lets you do standard sorting (randomize, reverse, bpm, date or mood) but also advanced sorting which requires extra logic (by key using Camelot Wheel or by DynGenre).
The key logic was introduced previously, so no need to explain it again.
DynGenre sorting sorts tracks by genre/style considering a continuous line from Industrial music to Downtempo music. Thus similar styles/genres are grouped together. Uses notation described at 'dyngenre_map' on dyngenre_map_xxx.js.

The select menu lets you select specific parts of a playlist (like the third quarter), clear the selection, delete selected or unselected tracks, etc.
Obviously it can be used as a standalone utility, but it's real power comes when used along macros.
It allows to automate playlists manipulation along the other tools in the same macro without needing user input.
(for ex.. create a playlist by similar genre -> then select half of the tracks and sort then by incremental key -> then select the other half and sort them by decremental key)

The last tool lets you crop playlist length to the desired number, either starting from the beginning or the end of the playlist.

Since tools that create new playlists always change focus to those, it should be pretty easy to even create a macro which creates 10 playlist (similar by genre, by key, harmonic mix, etc.) at once with different settings, sortings, lengths, etc. linked -for ex.- to the currently playing track.

Re: Playlist-Tools-SMP

Reply #3
Update the rest of the scripts too (specially the playlist manager) when used along this. The menu framework has a breaking change and it affects multiple scripts.

This release add macros and greatly expanded playlist and selection tools.

## [1.1.0] - 2021-05-26
### Added
- Macros: Pre-recorded multiple calls to different menu entries. Save clicked entries by name.
- Select Menu: New menu meant to be used along macros. Select All / Clear selection. Select first / last track. Select random track (single) /random # tracks (multiple). Delete selected tracks / Non selected tracks. Select by halves. Select by thirds. Select by quarters.
- Cut playlist Menu: New menu meant to be used along macros. From start. From end. (multiple numbers)
- Sort Menu: New menu meant to be used along macros. Randomize, reverse, by BPM, by Mood, by Date, by Key (Camelot Wheel), by genre/style (DynGenre)
- Send playlist to playlist: New menu meant to be used along macros. Sends all tracks from current playlist to another playlist.
- Close playlist: New menu meant to be used along macros.
- Go to playlist: New menu meant to be used along macros.
- Find or create playlist: New menu meant to be used along macros.
- Send selection to playlist: New menu meant to be used along macros.
- Harmonic mixing: multiple debug additions.
- Search by Distance: New config menu.
- Search by Distance: Entry to compute and show graph on browsers.
- Search by Distance: Entries to descriptors.
- Search by Distance: New tool to find genre or styles not set on the graph (descriptors).
- Search by Distance: New entry to test the Graph on demand for errors.
- Search by Distance: New entry to test the Graph on demand against a set of paths predefined on 'music_graph_test_xxx.js'.
- Search by Distance: New entry to reset the Graph cache on demand.
- Search by Distance Cache: is now saved to a json file and reused between different sessions. Cuts loading time by 4 secs for 70K tracks on startup (!).
- Search by Distance Cache: gets automatically refreshed whenever the descriptors crc change. i.e. it will be recalculated with any change by the user too.
- Search by Distance Descriptors: Multiple new additions.
- Portable: Additional checks for portable installations.
### Changed
- Harmonic mixing: small changes and optimizations.
- Harmonic mixing: code for pattern creation moved to camelot_wheel.js.
- Harmonic mixing: code for sending to playlist moved to helpers and reused in multiple scripts.
- Search by Distance: updated with latest changes.
- Search by Distance Debug: Greatly expanded the debug functions to check possible errors or inconsistencies in the descriptors. It should be foolproof now.
- Split tools menu into 3 submenus: Playlist\Selection\Other tools.
### Removed
- Removed all lodash dependence and deleted helper.
### Fixed
- Search by Distance Descriptors: Multiple fixes on descriptors found with the new debug code.
- Buttons framework: icon bugfix.
- 'Top rated Tracks from...\From year' crash on input.
- 'Most Played Tracks from Date' crash.

Re: Playlist-Tools-SMP

Reply #4
Next release will have fully configurable menus, which can be disabled/enabled by pressing shift + click on the button. Pressing on any entry will not load the associated menu anymore. (this in addition to only load entries when the scripts files are present, so they may be disabled either this way or removing the files)

The menu approach is more fine grained, since it allows to delete even parts of the same script (for ex. Only showing 1 Search Similar method).


Standard queries have been added too, just like regular foobar search. But entries can be saved, and reused later (like autoplaylist presets). With sorting. Dynamic queries have sorting added too now.

Finally, have added the possibility to add sorting entries to the sort menu (just like the regular foobar sorting). They work in conjunction to the advanced sorting logics (like key or grouping by similar genre), and are meant to be used along macros. Since macros allow to save any set of menu entries, they can now be used as an advanced alternative to autoplaylist and random pools component. Some examples of what you can do with a macro:
- You can set a query, a sort order, remove duplicates by any tag, filter and finally limit length to X tracks.
- Create 5 playlist, with different queries or sources, and use them as pools for a final playlist. (random pools has 2 main limitations: only 1 playlist associated to pools, and no way to mix specific pools to a final playlist -all or nothing-)
- Auto tag tracks found on a playlist (using Go to Playlist -> Select all -> Write tags).
- Send automatically all new added tracks on the library to a playlist for other processing. (Standard query 'Recently added' -> Send to -> ...)
- Etc.

Re: Playlist-Tools-SMP

Reply #5
## [1.2.0] - 2021-05-28
### Added
- Dynamic Queries: sorting can be set (on user configured entries).
- Alt Menu: Shift + L. Click on menu button allows to switch some entries functionality. Individual tools or entire submenus may be disabled/enabled. When all entries from a tool are disabled, the entire script files associated are omitted at loading.
- Standard Queries: new menu to apply standard queries and save user configured entries. Sorting too. (meant to be used along macros as an "autoplaylist" tool combined with other tools)
- Selection: added Global Playlist length as random # selection.
- Cut playlist length: added Global Playlist length as option (from start and end).
- Configuration: can set to which entries forced query is applied: Standad Queries, Dynamic Queries, Search same by tags. In any other case, it's always applied.
### Changed
- Macros: Entry name for last call and forced entries now omits ('main\' or the main menu name) when the entry resides on the main menu. i.e. just use the entry name for main menu entries, and submenu\entry name for the rest.
- Menu framework: updated.
- Legacy Sort: arbitrary sort entries can be added / removed. Standard foobar sorting. Can be undone.
- Advanced Sort: Can be undone.
### Removed
### Fixed
- Dynamic Queries: adding a new entry no longer executes it (thus creating a playlist too).
- Search same by tags: didn't apply user set playlistLength and forcedQuery to created playlists (using functions defaults instead).
- Standard Queries: didn't work when current playlist was empty.
- Cut playlist length: didn't allow undo.
- Send playlist's tracks to...: didn't allow undo.
- Remove tracks from...: didn't allow undo.
- Send selection to...: didn't allow undo.

Also updated the readme (on github) to explain much better what each thing does.

Re: Playlist-Tools-SMP

Reply #6
## [1.3.0] - 2021-05-31
### Added
- Pools: playlist creation similar to Random Pools component. Multiple playlists sources (pools) can be set to fill a destination playlist. Configurable selection length per source, query filtering, picking method (random, from start, from end) and final sorting of destination playlist. Arbitrary presets can be added / removed.
- Pools: the library becomes a source when no playlist name is given. In that case the query is used to retrieve items from the library. At that point is equivalent to using a playlist as a source. i.e. you can mix sources using playlists and library, or even using multiple times the library as source. (This is obviously a shorthand to recreate first the source playlists with macros using queries)
- Pools: queries can also use dynamic queries format, where #TAG# is replaced with value for the currently focused track. i.e. it can create dinamic pools where the query changes according to the selection, thus not forcing an specific playlist type. A 'GENRE IS #GENRE#' source would translate into a rock, jazz, ... playlist according to current selecion. (This is obviously a shorthand to recreate first the source playlists with macros using dynamic queries)
- Presets: entire user preset list can be exported, for editing on a text editor or later importing in another Playlist Tools panel. (Only works for presets added from this release version and future ones)
- Presets: a presets json file can be imported, merging them with current ones (without overwritting).
- Readmes: Sscatter by tags readme added.
- Playlist history: New tool to traverse through the last active playlists by name or simply previous one (useful for macros since you can go back and forth between 2 arbitrary playlists without knowing their names). The tool tries to track playlists even if they are reordered after saving them to the history, only possible if names are unique.
### Changed
- Query filtering: some new default presets.
- Dynamic Queries...: now allow working with multivalue tags by default. i.e. 'GENRE IS #GENRE#' translates into '(GENRE IS Folk) AND (GENRE IS World)' automatically. When using using TF expressions, multivalue tags are not converted, thus the expression is executed 'as is'.
- Dynamic Queries...: standard queries may be added -only- to the end of a dynamic query expression. i.e. 'GENRE IS #GENRE# AND NOT (%rating% EQUAL 2 OR %rating% EQUAL 1)' translates into '(GENRE IS Psychedelic Rock) AND (GENRE IS Hard Rock) AND NOT (%rating% EQUAL 2 OR %rating% EQUAL 1)'. Merging both types of expressions in other positions will not work as intended.
- Dynamic Queries...: to work reliably with multiple dynamic queries on the same expression they must be enclosed on parenthesis, that way the code knows up to what point it must expand the queries. i.e. '((GENRE IS #GENRE#) OR (STYLE IS #STYLE#))' translates into '(((GENRE IS Psychedelic Rock) AND (GENRE IS Hard Rock)) OR ((STYLE IS Acid Rock) AND (STYLE IS Live)))'. Doing it in any other way will not work as intended.
- Query filtering\Filter playlist by... (query): also converts multivalue tags when using dynamic queries.
- Reset all configuration: resetting all no longer deletes all user presets, but asks to merge them with the default ones (or discards them). Presets can also be exported (previous change) before resetting and later re-imported to do essentially the same. If merging is not chosen, then a backup is automatically created.
- Readmes: all readmes entries now follow the same name of the menus automatically.
- Readmes: Dynamic Queries's readme updated with examples and usage rules.
### Removed
### Fixed
- Search same by tags...\By... (pairs of tags): was using default search paramaters no matter the input.
- Search same by tags...\Add new entry: error when remap tags was empty.
- Query filtering\Filter playlist by... (query): last argument used was not being saved.
- Configuration: setting global forced query or playlist length only updated the properties panel, thus not applying the changes until next script reload.
- Missing font fontawesome-webfont (just cosmetic arrow on button).
- Advanced Sort...\Incremental genre/style (DynGenre): Missing sort_by_dyngenre.js file, so menu entry was missing on previous release.
- Changing Global Forced Query via menus also changed Global Playlist Length.

Recommended to use 'Configuration\Reset all configuration...' after installing (to reload the new presets) (*). You will lose any user configured entry on the process (make a backup of the properties panel if needed).

From now on, user presets can be exported and maintained when using "Reset all", thus making easier to update the panel in the future. Or sharing presets, etc.

3 main changes have been added:
-    Pools (i.e. a total replacement of Random Pools component with many more features). They can obviously be expanded even more with macros.
-    Dynamic queries improvements: see changelog for details... but essentially they allow now complex queries and even multivalue tags expansion. 'GENRE IS #GENRE#' translates into '(GENRE IS Folk) AND (GENRE IS World)'
-    Presets: already mentioned at top.

Re: Playlist-Tools-SMP

Reply #7
Am I correct in assuming that all of your scripts go into the root of 'xxx-scripts' instead of subfolders like 'xxx-scripts\Playlist-Tools-SMP'? If so, that seems to me like that could be problematic in the long term just from a management/updating perspective.

Re: Playlist-Tools-SMP

Reply #8
Am I correct in assuming that all of your scripts go into the root of 'xxx-scripts' instead of subfolders like 'xxx-scripts\Playlist-Tools-SMP'? If so, that seems to me like that could be problematic in the long term just from a management/updating perspective.

As you note they are all added to the same root (which is only used by my scripts).

The other scripts (playlist manager, world map) use different files, so there is no mixing, except the main helper which is shared between all of them (and I don't plan to change it more). I know it could bring some problems (if I edit the helper, update a repository but no the rest, and someone installs the oldest files over the new ones, thus using an old helper version) , but right now it makes my life easier so... I can not care less about it since these are clearly WIP things updated every week.

At some point I will simply split the main helper to fix that, use packages, different folders or simply create an additional repository for the helpers, so they are always up to date and a requirement for any other script. The last option is the most probable one I will take, since all the panels require the menu framework, the buttons framework and the main helper.

PD: Also the change-logs clearly indicate if I edit one of those helpers and which things could break if mixing files. And I try to follow semantic versioning, so no such changes should happen between minor releases.

PD2: I would love to use packages but it becomes a nightmare when updating things every week and it totally breaks the buttons bar and the idea of having selectively installed things just by deleting/adding files. Or having other people using my scripts as a base for their own ones. Packages are a zip not meant to be touched. So.. I'm more inclined on the additional repository. (open to suggestions though)

Re: Playlist-Tools-SMP

Reply #9
I know it could bring some problems (if I edit the helper, update a repository but no the rest, and someone installs the oldest files over the new ones, thus using an old helper version)...
This is my point. It becomes much easier to mix up files and much harder to troubleshoot if everything is in the same root directory. Secondly, if all the scripts are in subdirectories a user can just checkout the repositories from git and then just git pull each subdirectory when updates are available.

create an additional repository for the helpers
That is definitely a good solution, but it still doesn't completely solve the problem of everything being convoluted in the root directory. These scripts really need some sort of better organizational structure if your project is going to continue long term and evolve, and it is best to keep that in mind earlier on than changing it later when your project is more mature.

Re: Playlist-Tools-SMP

Reply #10
This is my point. It becomes much easier to mix up files and much harder to troubleshoot if everything is in the same root directory. Secondly, if all the scripts are in subdirectories a user can just checkout the repositories from git and then just git pull each subdirectory when updates are available.
I don't see whay you can not do that right now? I would not really advise at all to do that with SMP scripts, which sometimes require a bit of thinking  ::)  If someone wants to just pull my changes without checking the changelog can do it, but it will probably break things whether I add 20 subfolders more or not. That's why I add the releases, I don't expect people doing that.

create an additional repository for the helpers
That is definitely a good solution, but it still doesn't completely solve the problem of everything being convoluted in the root directory. These scripts really need some sort of better organizational structure if your project is going to continue long term and evolve, and it is best to keep that in mind earlier on than changing it later when your project is more mature.
Can't say more... Only planned change is to move scripts without buttons to another subfolder, but that's all. That would mean only 3 or 4 scripts in the root folder (if that's what you mean). But I will simply not move the Playlist manager to a directory, and then Playlist tools to another, and then...  Anything which can be loaded within foobar as a panel will be in the main directory (which will be 3 or 4 files, not the 20 files I have right now yep)

Re: Playlist-Tools-SMP

Reply #11
This is the current structure for future releases, that has the planned change I wrote (most files on 'Main').



Also ngraph and typo will be moved to helpers-external. Good enough?

Re: Playlist-Tools-SMP

Reply #12
For people using All Music and Last. FM tags, here is a pack of presets which use those tags that can be imported using the config menu (they will be included on next releases)

Feel free to share your own presets too, since that's the point of being a tool fully configurable  :) (and I plan to have multiple presets pack which can be installed as addons)

Re: Playlist-Tools-SMP

Reply #13
And another 5 presets for pools, they use standard (*) mood, genre and bpm tags. (in next release pools will be able to use the global forced query too, removing that way low rated tracks, etc. easily)

To install, just use the import menu entry:

(*) Neither All Music, nor Last FM tags. But the standard ones you got at picard and found in any program (mood, genre, bpm). If you want to use the others, copy the tags with any editor to standard tags or edit the presets -before importing- by yourself replacing "MOOD" with "ALL MUSIC...", etc.

Re: Playlist-Tools-SMP

Reply #14
v1.4.0 - File restructuring and cleanup + Presets, shortcuts & bugfixes

2 new experimental features (shortcuts and include other scripts), along the file restructuring discussed, new presets and many bugfixes.

## [1.4.0] - 2021-06-07
### Added
- Search by Distance: 4 sets of buttons, one for each method: GRAPH, WEIGHT, DYNGENRE + ONE CONFIGURABLE (method at properties). (This in addition to the fully customizable buttons)
- Shortcuts: Some shortcuts have been added (global shortcuts without requiring panel to be in focus). Are shown on the related menu entries tabbed to the right. Experimental feature, read the popup before activating it at config menu.
- Other tools\Include Scripts: easily include ('merge') multiple SMP scripts into the same panel, thus not wasting multiple panels. Useful for those scripts that don't require any UI, user interaction,... like scripts which set the main menu SPM entries (File\\Spider Monkey Panel). Experimental feature, read the popup before activating.
- Configuration: pools have toogable forced query now.
- Presets: All Music and Last FM presets which use their genre/mood tags (for Search by tags, Dynamic Queries, Playlist Filters and Pools). Pools moods presets (Happy Mix, Sad Mix, Angry Mix, Chill Mix and Slow Chill Mix). Pools genre presets (Rock mix, Hip-Hop mix, etc.).
- Macros: 2 macros examples to test all tools (with or without input). Since all input box have defaults, you can simply press enter and process all without reading for testing.
### Changed
- Search by Distance\GRAPH: mean distance is now also divided by the number of genre/styles of the reference track. That should give more results for tracks with too many tags, while not changing so much for the rest. Distance filters have been updated accordingly in all buttons to reflect the change (and users should do the same in their customized buttons).
- Search by Distance: All buttons have not needed properties deleted to not confuse users about things changed on properties not being reflected on the buttons.
- Buttons framework: updated for better shortcuts and macros compatibility.
- Helpers: Moved all external libraries to 'helpers-external'.
- Helpers: Split 'helpers_xxx.js' file into multiple ones for easier future maintenance.
- Moved all SMP scripts without UI (those not meant to be loaded directly on panels) to 'main'.
### Removed
### Fixed
- Search Same By: button did not work correctly due to bad property parsing.
- Search Same By: bypass query checking if current track has no tags configured on new entry addition. Previously it was not saved due to checking error.
- Playlist manipulation\Harmonic mix: was not working on entire playlist, only on selection in both cases.
- Search by Distance: crashes when trying to access non present properties on the arguments (found while applying the previous changes).
- Search by Distance: crash when sharing cache between 2 panels due to a typo.
- Search by Distance: crash when pool was smaller than set playlist length.
- Pools: using random picking method, sometimes the last element was omitted, thus resulting on (total length - 1) tracks per source choosen.
- Pools: when only 1 track is retrieved from a source, skips picking methods and adds it directly to the final playlist. Previously it was simply skipped (due to previous bug).
- Pools: not working when current playlist was empty. It tried to check for dynamic queries even when there was none, thus failing wihtout a track to check against.
- Pools: random picking method was not really random due to using sort + random method. Using an array shuffle now instead.
- Select...\Select random...: not really random due to using sort + random method. Using an array shuffle now instead.
- Search by Distance: in key mixing and random picking not really random due to using sort + random method. Using an array shuffle now instead.
- Harmonic mix\Harmonic mix from...: not really random due to using sort + random method. Using an array shuffle now instead.
- Tooltip: missing new line before shortcuts tips.

Re: Playlist-Tools-SMP

Reply #15
Finally the integration with Playlist Manager is working, and pools will be able to use either playlists within foobar as source or playlist files in folders tracked by any Playlist Manager instance... This feature allows to use virtual playlists as containers, where you can easily collect tracks (since Playlist Manager allows to send tracks directly to a file without loading it) to be used later on pools without polluting the UI with tons of dummy playlists.

It would be an alternative to tagging files with custom tags (like 'Rock Ballads') to then create queries to send those tracks to playlists (which could also be done with pools). Instead, you could simply send the tracks to a playlist named 'Rock Ballads' and use it later as a source, while not having the playlist loaded within foobar but just on the manager. Obviously there are many other uses (like having an arbitrary number of playlists used as sources: for ex. a mix of all Summer playlists of the last 10 years which obviously could be archived as m3u8 files but makes no sense to have them loaded within foobar polluting the UI).

In resume, sources may be a mix of any of these 3: library (query filtering), playlists within foobar (query filtering optional) and playlist files (idem).

Next release will also have some quality of life changes for presets, with descriptions popups before importing, summary of menu entries which will be added, etc. along better documentation for some tools

A playlist file within a manager instance is used as source using Pools tool. Duplicated tracks are omitted, so only 5 tracks are used (although the total reported count is 12). On the example, 1 more track is taken from the library.

An example of a preset created within foobar and exported to json. Used on the screenshot above. Note the queries reported on the console an the ones here doesn't match because a global forced query is added to all sources (configurable).

Re: Playlist-Tools-SMP

Reply #16
Continuing with the presets, search by distance buttons will be able to use pre-defined sets of tags (saved as json) instead of a track as source for playlist creation. That's exactly what MusicIp's moods did and here is called "themes". I plan to expand that functionality allowing to save tracks as "themes" on demand and also allow using a playlist as a source (instead of a json file)... but right now it simply uses a json file which emulates one track.

Themes may be added to the properties panel of custom search by distance buttons either as a file path or directly as a JSON string. Whenever that property is set, the theme is used as source instead of the current track.

To make it easier to work with them, custom buttons now have a contextual menu called with shift + L. Click which lets you select any theme file in the presets folder or 'none' (current track standard behavior). Themes may be created easily with any text editor, allowing to create your own sets of buttons for custom playlist creation. An example file is provided.




Finally, continuing the pools feature, search by distance's output may be used as a source (apart from playlist and Library queries), greatly surpassing what Random Pools component and MusicIp allow. Setting a pool this way requires importing a preset file, since it's not viable to add so many arguments via popups.

Allows any of the 3 methods (GRAPH, WEIGHT and DYNGENRE) and uses the previous feature (Themes) along another one "Recipes". Themes would be the "virtual track" used as reference and Recipes work the same than MusicIp's recipes allowing to define how the playlist should be created (the arguments passed to 'do_searchby_distance').

After applying the recipe and theme, under the hood, it does the same than using any search by distance's button or menu entry named Search similar by [graph, ...]. But instead of sending the resulting tracks to a playlist, those tracks are used as source for the pool. Then they are processed the same than any other source on the pool. Any type of source can be mixed too (i.e. using a playlist named 'Rock', a playlist file 'summer.m3u8' in the manager, a library query '%RATING% GREATER 3' and the output of SearchBy to get tracks similar by key and genre to a given reference.


Recipe and pools preset example are provided to test it.

In theory the same behavior could be emulated using "macros" feature, creating first the playlist with the appropriate tool, then selecting tracks by any desired order, sending them to the final playlist and repeating the process as long as needed. The difference here is the use of recipes and themes, which allow easy customization and the possibility to use them in multiple presets. Also recipes allow far more detailed config than using menus + macros, since many advanced features are only used/configurable on custom buttons and recipes may set the same arguments than those. And themes allow to create playlists without a reference track, while the menus for [graph, ...] are always associated to a track.

In the end, both tools are complementary and have their uses. Pools is meant as a direct replacement of Random Pools and MusicIp's, offering many more possibilities than them. Macros is a general tool to automatize anything, but obviously is the "hard" way to do it.

SimplePortal 1.0.0 RC1 © 2008-2021