HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: regor on 2021-05-13 12:28:02

Title: Search-by-Distance-SMP
Post by: regor on 2021-05-13 12:28:02
Search-by-Distance-SMP (https://github.com/regorxxx/Search-by-Distance-SMP)
(https://img.shields.io/github/release/regorxxx/Search-by-Distance-SMP.svg?include_prereleases) (https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/CHANGELOG.md)(https://www.codefactor.io/repository/github/regorxxx/Search-by-Distance-SMP/badge/main) (https://www.codefactor.io/repository/github/regorxxx/Search-by-Distance-SMP/overview/main)(https://api.codacy.com/project/badge/Grade/1677d2b0dee54548bf44614fcf808529) (https://www.codacy.com/gh/regorxxx/Search-by-Distance-SMPdashboard?utm_source=github.com&utm_medium=referral&utm_content=regorxxx/Search-by-Distance-SMP&utm_campaign=Badge_Grade)(https://img.shields.io/github/license/regorxxx/Search-by-Distance-SMP) (https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/LICENSE)
An implementation of Music-Graph (https://github.com/regorxxx/Music-Graph) for foobar2000 using Spider Monkey Panel (https://theqwertiest.github.io/foo_spider_monkey_panel), which creates intelligent "spotify-like" playlist using high-level data from tracks and computing their similarity using genres/styles.

(https://user-images.githubusercontent.com/83307074/116761198-80a8bd80-aa06-11eb-904c-b3d50905f6bd.gif)

Features
Creates playlists using high-level data from tracks similar to the currently selected one according to genre, style, key, etc. When their score is over 'scoreFilter', then they are included in the final pool. After all tracks have been evaluated and the final pool is complete, some of them are chosen to populate the playlist. You can choose whether this final selection is done according to score, randomly chosen, etc. All settings are configurable on the properties panel (or set in the files when called using buttons, etc.)

Take a look at the descriptions of the properties panel to check how the variables work. These are the weight/tags pairs checked by default:
X

There are 2 custom tags which can be set by the user too:
X

Any Weight/tags pair can be remapped and/or merged (sep. by comma). For example, linking genreWeight to 2 different genre tags on your files:
X

Some weight/tags pairs can be linked to TitleFormat Expr. Use tag names instead of TF expressions when possible (+ performance). For example, see dateWeight: TF is used to have the same results for tracks with YYYY-MM tags or YYYY tags.
X

Genre and Style tags (or their remapped values) can be globally filtered. See 'genreStyleFilter'. Case sensitive. For example, when comparing genre values from track A to track B, 'Soundtrack' and 'Radio Program' values are omitted:

There are 3 methods to calc similarity: WEIGHT, GRAPH and DYNGENRE.

Other features

(https://user-images.githubusercontent.com/83307074/116776801-073aba80-aa5a-11eb-8f3f-82e02ccf265e.gif)

Note about genre/styles
GRAPH method doesn't care whether "Rock" is a genre or a style but the scoring part does! Both values are considered points without any distinction. Genre weight is related to genres, style weight is related to styles.... But there is a workaround, let's say you only use genre tags (and put all values together there). Then set style weight to zero. It will just check genre tags and the graph part will work the same anyway.

Note about GRAPH/DYNGENRE exclusions
Apart from the global filter (which applies to genre/style string matching for scoring purpose), there is another filtering done when mapping genres/styles to the graph or their associated static values. See 'map_distance_exclusions' at 'helpers/music_graph_descriptors_xxx.js'.

It includes those genre/style tags which are not related to an specific musical genre. For ex. "Acoustic" which could be applied to any genre. They are filtered because they have no representation on the graph, not being a real genre/style but a musical characteristic of any musical composition. Therefore, they are useful for similarity scoring purposes but not for the graph. That's why we don't use the global filter for them.

This second filtering stage is not really needed, but it greatly speedups the calculations if you have tons of files with these tags! In other words, any tag not included in 'helpers/music_graph_descriptors_xxx.js' as part of the graph will be omitted for distance calcs, but you save time if you add it manually to the exclusions (otherwise the entire graph will be visited trying to find a match).

Note about editing 'helpers/music_graph_descriptors_xxx.js' or user file
Instead of editing the main file, you can add any edit to an user set file named 'helpers/music_graph_descriptors_xxx_user.js'. Check sample for more info. It's irrelevant whether you add your changes to the original file or the user's one but note on future script updates the main file may be updated too. That means you will need to manually merge the changes from the update with your own ones, if you want them. That's the only "problem" editing the main one.

Both the html and foobar scripts will use any setting on the user file (as if it were in the main file), so there is no other difference. Anything at this doc which points to 'helpers/music_graph_descriptors_xxx.js' applies the same to 'helpers/music_graph_descriptors_xxx_user.js'.

Also integrates
 1. Music-Graph (https://github.com/regorxxx/Music-Graph): An open source graph representation of most genres and styles found on popular, classical and folk music.
 2. Camelot-Wheel-Notation (https://github.com/regorxxx/Camelot-Wheel-Notation): Javascript implementation of the Camelot Wheel, ready to use "harmonic mixing" rules and translations for standard key notations.

(https://user-images.githubusercontent.com/83307074/116759506-fcecd200-aa01-11eb-8d2c-8a48ebcc73c0.gif)

Other implementations
 1. Playlist-Tools-SMP (https://github.com/regorxxx/Playlist-Tools-SMP): Offers different pre-defefined examples for intelligent playlist creation.

(https://user-images.githubusercontent.com/83307074/116759000-cebac280-aa00-11eb-8a81-9a450e13205a.gif)

Installation
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.

Download latest release (or nightly releases) at github:
https://github.com/regorxxx/Search-by-Distance-SMP
Title: Re: Search-by-Distance-SMP
Post by: rolf1955 on 2021-05-13 21:07:05
Even though I haven't quite figured this tool out yet, it reminds me of the following helpful tools:

https://www.music-map.com/ (https://www.music-map.com/)

https://musicmachinery.com/2009/05/31/building-a-music-map/ (https://musicmachinery.com/2009/05/31/building-a-music-map/)

 :)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-05-14 17:27:28
Even though I haven't quite figured this tool out yet, it reminds me of the following helpful tools:

https://www.music-map.com/ (https://www.music-map.com/)

https://musicmachinery.com/2009/05/31/building-a-music-map/ (https://musicmachinery.com/2009/05/31/building-a-music-map/)

 :) 

They are somewhat similar ideas.
Although they are based on artist similarity (this one is about genre/styles similarities), so they are limited to an specific corpus of music -artists- (mainly focused on western music). Also to be up to date, they require an infinite amount of constant work. New artists appear each day.  On the other hand, genres and styles are more or less static within a given period.

A map more closely related would be this one:
https://musicmap.info/

Other difference is the open source nature of the data. And finally, the most important, this is meant to be used offline with real use-cases within foobar (I provide some buttons to create intelligent playlists for example). Those maps are fine to discover new artists you may like, or being sent to youtube videos on the browser, but that's all. You can not create playlist or do anything usable with those maps in your pc or your own software and don't work at all offline.
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2021-05-15 06:00:42
All of your github script looks very cool.

I wonder if you think there's any possibility that they work in linux running foobar with wine.

Because I found some problems but I know that there are scripts that depend on windows activeXobjects that doesn't work in wine at all and I'm not gonna waste your time.

Title: Re: Search-by-Distance-SMP
Post by: marc2k3 on 2021-05-15 11:45:24
I find pretty much all ActiveX objects work fine wine WINE with the exception of trying to use WshShell.RegRead to get the DPI from the registry. As I mentioned the other day, the main issue you'll always have is lack of internet connectivity to certain websites that require certain levels of TLS support.

Offline scripts should be fine.

WilB's library tree works without mods
Br3tts playlist and Smooth Browser work without mods
All the scripts in the SMP complete folder work with change to one line of code on js\helpers.js line 629. Replace this

const DPI = WshShell.RegRead('HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI');

with

const DPI = 96;
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2021-05-15 11:56:34
I find pretty much all ActiveX objects work fine wine WINE with the exception of trying to use WshShell.RegRead to get the DPI from the registry. As I mentioned the other day, the main issue you'll always have is lack of internet connectivity to certain websites that require certain levels of TLS support.

Offline scripts should be fine.

WilB's library tree works without mods
Br3tts playlist and Smooth Browser work without mods
All the scripts in the SMP complete folder work with change to one line of code on js\helpers.js line 629. Replace this

const DPI = WshShell.RegRead('HKCU\\Control Panel\\Desktop\\WindowMetrics\\AppliedDPI');

with

const DPI = 96;

For DPI error I'm adding a reg key with regedit   . Its not strange that they didn't found it, there is not such key ;) After that I don't need to modify the scripts

Wsh57 is needed to open links of musicbrainz, similar artist etc

but i found others like crash when scripts are trying to make copy paste operations. (in library tree and Biography) so before get too excited i prefer ask first.

Because this scripts seems complex and I have a lot of doubts about how to even put them in work
Title: Re: Search-by-Distance-SMP
Post by: marc2k3 on 2021-05-15 12:07:41
Copy/paste works for me. I guess that's because I'm using a 32bit prefix with all this nonsense installed via winetricks...

sh winetricks gdiplus_winxp wsh57 fontsmooth=rgb msscript ie8
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2021-05-15 12:17:45
Copy/paste works for me. I guess that's because I'm using a 32bit prefix with all this nonsense installed via winetricks...

sh winetricks gdiplus_winxp wsh57 fontsmooth=rgb msscript ie8

Then maybe you can help me.

In the github page there is a lot of projects. I download all and unzip in the folder xxx the instruction said.

A lot of files asked overwrite so i do overwrite

Now i'm start to doubt. There's a lot of scripts.I thought that the ones i must to use are the ones in buttons (mostly for the pictures).

But when I try to load it in a panel the say something about g theme.

Whit the map I can get a little futher, the panel load and i can see a map (but fuzzy with vertical lines of yellow) and when I select an artist with the locale last.fm tag a point is shown in the map that let me make a playlist with the same country, etc.

But when I try the integration with Biography it said that is not in the path.

Any advice?
Title: Re: Search-by-Distance-SMP
Post by: marc2k3 on 2021-05-15 12:58:03
For the theme error, you'll need to download a windows theme (.msstyles file) and install it via winecfg.

edit: quick and dirty google...

https://askubuntu.com/questions/219791/improve-gui-appearance-of-wine-applications
http://www.mediafire.com/download/dnzzmnebm6v/luna.rar <- theme file

Ask regor about everything else. I've have zero knowledge/interest in these scripts.
Title: Re: Search-by-Distance-SMP
Post by: el-jaguar on 2021-05-15 15:58:17
I get a "buttonCoordinates is undefined" error. Total newbie here, what am I doing wrong?
NEVERMIND, GOT IT
Title: Re: Search-by-Distance-SMP
Post by: Awesomeo on 2021-05-17 19:29:32
https://acousticbrainz.org/

Btw good and huge open-source databases of acoustic data.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-05-17 23:35:06
Copy/paste works for me. I guess that's because I'm using a 32bit prefix with all this nonsense installed via winetricks...

sh winetricks gdiplus_winxp wsh57 fontsmooth=rgb msscript ie8

Then maybe you can help me.

In the github page there is a lot of projects. I download all and unzip in the folder xxx the instruction said.

A lot of files asked overwrite so i do overwrite

Now i'm start to doubt. There's a lot of scripts.I thought that the ones i must to use are the ones in buttons (mostly for the pictures).

But when I try to load it in a panel the say something about g theme.

Whit the map I can get a little futher, the panel load and i can see a map (but fuzzy with vertical lines of yellow) and when I select an artist with the locale last.fm tag a point is shown in the map that let me make a playlist with the same country, etc.

But when I try the integration with Biography it said that is not in the path.

Any advice?

The scripts can be used along other utilities or as standalone panels. For regular users, standalone panels would be preferred so yes... use the buttons. All the threads and the github readme point to the relevant buttons you need.

Also note that the button named "buttons_playlist_tools_menu" contains these utilities along many more in the form of a menu. I simply provide different ways to integrate them: standalone buttons, merged bars, menu or the bare-bone script...

If you make it work on linux, I would really appreciate if you compile the steps so I can add them to the readmes for other users.

About the map, please write in the relevant thread. Although again, that seems a linux related problem. You can manually install the mod anyway by yourself (if you have the script installed, you must edit the file and "include" the mod file on helpers), so I don't see a problem (the automatic integration can not work on every system by design).
Title: Re: Search-by-Distance-SMP
Post by: rolf1955 on 2021-05-20 22:00:18
Even though I haven't quite figured this tool out yet, it reminds me of the following helpful tools:

They are somewhat similar ideas.
Although they are based on artist similarity (this one is about genre/styles similarities), so they are limited to an specific corpus of music -artists- (mainly focused on western music). Also to be up to date, they require an infinite amount of constant work. New artists appear each day.  On the other hand, genres and styles are more or less static within a given period.


Yes good. Thank you for the detailed explanations. The map of relationships between performers that I gave as an example would work offline if it drew on its own library. It could show existing performers on the one hand, and those that are not yet available in the library. But admittedly this idea is a bit banal. :-)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-05-23 22:23:40
Even though I haven't quite figured this tool out yet, it reminds me of the following helpful tools:

They are somewhat similar ideas.
Although they are based on artist similarity (this one is about genre/styles similarities), so they are limited to an specific corpus of music -artists- (mainly focused on western music). Also to be up to date, they require an infinite amount of constant work. New artists appear each day.  On the other hand, genres and styles are more or less static within a given period.


Yes good. Thank you for the detailed explanations. The map of relationships between performers that I gave as an example would work offline if it drew on its own library. It could show existing performers on the one hand, and those that are not yet available in the library. But admittedly this idea is a bit banal. :-)
Don't get me wrong. It would be cool to also use that data, but it's not released publicly right now nor open-source. You can use it on a browser, that's all.

Also when I said it requires online connection, I mean it requires to be online to be up to date. In this case, yes, you could theoretically download an entire database, create a graph and use it offline. But artists, by its nature, obviously change faster than genres/styles. I'm not really sure if a graph with +70K nodes would be usable in javascript within foobar at all btw.

Similarly Last fm data is not open-source; you can fetch it ussing scrappers, but then that requires online connection. I could, theoretically, support last fm data (similar artists) previously downloaded with a biography script, that's all.

Personally I prefer linking music by tangible similarity characteristics (key, genre, style, fingerprint, etc) than social based characteristics ("last fm says that beatles is similar to rollings, so it should be right"). I find the second approach too much based on eurocentrism and "popularity".
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-05-26 21:00:46
## [1.1.0] - 2021-05-26 (https://github.com/regorxxx/Search-by-Distance-SMP)
### Added
- Harmonic mixing: multiple debug additions.
- Cache: is now saved to a json file and reused between different sessions. Cuts loading time by 4 secs for 70K tracks on startup (!).
- Cache: gets automatically refreshed whenever the descriptors crc change. i.e. it will be recalculated with any change by the user too.
- Descriptors: Multiple new additions.
### 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.
- Debug: Greatly expanded the debug functions to check possible errors or inconsistencies in the descriptors. It should be foolproof now.
- Descriptors: Multiple fixes on descriptors found with the new debug code.
- Buttons: Variables are now set according to distance variables on descriptors. i.e. if they change at a latter point, they will be re-scaled.
### Removed
- Removed all lodash dependence and deleted helper.
### Fixed
Title: Re: Search-by-Distance-SMP
Post by: mjm716 on 2021-06-02 06:51:23
I'm trying search by distance with 'buttons_search_bydistance.js' script (pulled from github today)

remapping panel prefs with:
genre: genre,ALBUM GENRE ALLMUSIC,ALBUM GENRE LAST.FM
style: ALBUM THEME ALLMUSIC
mood: ALBUM MOOD ALLMUSIC

Not sure of space handling, but I've tried remapping genre/style/mood tags (using default ALBUM GENRE ALLMUSIC, replacing ALBUM_GENRE_ALLMUSIC, enclosing 'ALBUM GENRE ALLMUSIC' & "ALBUM GENRE ALLMUSIC")

I get the same results on all queries (set to return 50 results, source track has multiple data values in all 5 fields)

Nearest Tracks button:
returns playlist with 50 items matching only first %genre% value; other custom genres ignored (results show no consistency)?
Similar Tracks button:
returns playlist with 50 items matching only first %genre% value; other custom genres ignored (results show no consistency)?
both playlists feature many duplicate artists which I find very strange given a library of 290K+ tracks.

Similar Genres button:
no results - returns empty playlist
Similar Mood button:
no results - returns empty playlist

I delete the resulting playlist between searches.

Any tips?
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-06-02 08:39:43
You have to use the tag name(s) as is, sep by comma. That's all. There is even examples on the readme and github.
(https://hydrogenaud.io/index.php?action=dlattach;attach=19837;image)

You don't have to delete the playlists. They are always cleared first.

There is definitely something wrong there, since what you describe is really strange. The script merges all remapped tags. It's the 3rd line of the function... and it works perfectly on my side and according to other user's reports.

Could you post screenshots of your properties and tags? Maybe your tags are not split (?), you are putting the names wrong, etc. Obviously the problem has to do with the way you have added the tags, since every tag you have added is not working (mood tag, style tag) and genre works for the default tag value (genre).

EDIT: Some more hints
A dummy track with no tags and only ALL MUSIC GENRE...
X

Enable console debug to get more info!
X

Tags at properties
X

It will warn if you are missing tags ;)
X

The query thing is only for an extra forced query that can be added to pre-filter the library. But you have to check the rest. In your case you will probably see that your selected track had no mood or style tags, pointing to a problem with the way you have set tags on properties or on your files.
Title: Re: Search-by-Distance-SMP
Post by: mjm716 on 2021-06-02 09:09:39
per prev. the only panel prefs change was:
genre: genre,ALBUM GENRE ALLMUSIC,ALBUM GENRE LAST.FM
style: ALBUM THEME ALLMUSIC
mood: ALBUM MOOD ALLMUSIC

track tags are:
Code: [Select]
Artist Name : Abdel Ali Slimani
Track Title : Mraya
Album Title : Mraya
Year : 1996
Genre : desi1; afro1
Composer :
Performer :
Album Artist : Abdel Ali Slimani; Jah Wobble
Track Number : 04
Total Tracks : 09
Disc Number :
Total Discs :
Comment :
<ALBUM GENRE ALLMUSIC> : International; Worldbeat; African Traditions; North African
<ALBUM GENRE LAST.FM> : Arabic; Rai; Love; Africa; Tunisia
<ALBUM MOOD ALLMUSIC> : Earthy; Nocturnal; Passionate; Rousing
<ALBUM THEME ALLMUSIC> : Hanging Out; Late Night
<BPM> : 186
<DISCOGS_ARTIST_PROFILE> : Rai singer Abdel Ali Slimani was raised in El Anasser, Algeria, where as a teen he learned guitar and performed as a drummer at soccer matches. Finding little opportunity for musicians in his native land, he went to Paris in 1982; after a subsequent move to London, Slimani found work as a club DJ before signing on as a vocalist and percussionist with ex-PiL bassist Jah Wobble's Anglo-Arabic unit Invaders of the Heart.
<DISCOGS_CATALOG> : CDRW55; CDRW 55; 7243 8 40780 2 7
<DISCOGS_COUNTRY> : UK & Europe
<DISCOGS_CREDIT_VOCALS> : Sinéad O'Connor; Abdel Ali Slimani
<DISCOGS_RELEASE_CREDITS> : Bass - Jah Wobble; Drums, Programmed By, Backing Vocals - John Reynolds; Electric Guitar, Guitar [Spanish Guitar], Oud ['ud], Backing Vocals - Justin Adams; Executive-Producer - Jah Wobble; Liner Notes [French Translation] - Rosa Santos; Management - David Jaymes Associates Ltd.; Mixed By - Mark Ferda; Photography By - John Sleeman; Producer - John Reynolds; Producer [Assistant] - Justin Adams; Vocals, Goblet Drum [Darbuka], Bendir, Tar (drum), Percussion [Kraksh] - Abdel Ali Slimani; Written-By - Slimani, Wobble, Reynolds, Adams
<DISCOGS_RELEASE_ID> : 327152
<DISCOGS_RELEASE_NOTES> : Recorded at John Reynolds Studios (...)
<DISCOGS_TRACK_CREDITS> : Cello - Caroline Dale; Goblet Drum [Darbuka] - Nacer Khenniche; Vocals - Sinéad O'Connor
<KEY> : Am
<PUBLISHER> : Real World Records
<RATING> : 4
<UNSYNCED LYRICS> : Abdel Ali Slimani - Mraya (...)

Selecting Similar Mood button:
logging returned:
Query created: NOT (%rating% EQUAL 2 OR %rating% EQUAL 1) AND NOT (STYLE IS Live AND NOT STYLE IS Hi-Fi) AND %channels% LESS 3 AND NOT COMMENT HAS Quad AND TITLE PRESENT AND ARTIST PRESENT AND DATE PRESENT
Items retrieved by query (minus duplicates): 293314 tracks
Pool of tracks with similarity greater than 40% and graph distance lower than 400: 0 tracks
Warning: Final Playlist selection length (= 0) lower/equal than 50 tracks. You may want to check 'sbd0_28.Exclude any track with graph distance greater than (only GRAPH method):' parameter (= 400).
Warning: Final Playlist selection length (= 0) lower/equal than 50 tracks. You may want to check 'sbd0_27.Exclude any track with similarity lower than (in %)' parameter (= 50%).
Final Playlist selection length: 0 tracks.
Call to do_searchby_distance SimilarMood took 23001 milliseconds.

Selecting Similar Genre button logging:
Query created: NOT (%rating% EQUAL 2 OR %rating% EQUAL 1) AND NOT (STYLE IS Live AND NOT STYLE IS Hi-Fi) AND %channels% LESS 3 AND NOT COMMENT HAS Quad AND TITLE PRESENT AND ARTIST PRESENT AND DATE PRESENT
Items retrieved by query (minus duplicates): 293314 tracks
Pool of tracks with similarity greater than 50% and graph distance lower than 150: 0 tracks
Warning: Final Playlist selection length (= 0) lower/equal than 50 tracks. You may want to check 'sbd0_28.Exclude any track with graph distance greater than (only GRAPH method):' parameter (= 150).
Warning: Final Playlist selection length (= 0) lower/equal than 50 tracks. You may want to check 'sbd0_27.Exclude any track with similarity lower than (in %)' parameter (= 60%).
Final Playlist selection length: 0 tracks.
Call to do_searchby_distance SimilarGenres took 24008 milliseconds.


I do have other tracks with those same tags. If nothing else, I would expect tracks from the same album to appear?
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-06-02 09:31:21
I do have other tracks with those same tags. If nothing else, I would expect tracks from the same album to appear?

Obviously XD

But I think where the problem is... I will advise you to read the readme. You are using GRAPH method (according to your log) with non standard genres, which clearly can not work at all since none of those genres exists in the graph. ' Arabic; Rai; Love; Africa; Tunisia' (?) (I don't plan to add Africa as a genre for ex. since that's not a genre at all).

Use WEIGHT method instead which will work with any genre value (uses string matching and simply compares tags to assign a score). The 'downside' is it will not relate genres by similarity (for ex. folk to country). So people have to choose, to either use a complex method restricted to Standard Tags (you can check which ones 'on music_graph_descriptors_xxx') or something which works with anything, but more simple (like spotify).

All music does not use standard genre tags at all for most tracks (African -location tag-, International -western-centric tag which means nothing-, African traditions -same... so many things are this-, although sometimes it gets it ritgh (Rock, Heavy Metal, Hard Rock, Pop Rock, Blues Rock). On the other hand they are perfect for WEIGHT method (they add tons of situational tags). Note you can also use "real genres" as genre and put ALL MUSIC tags on the custom tags. That way you can have best of both worlds.
X

Now, it seems it's my fault since I put that method as default for testing something instead of using the panel's property. And that's what I released. Go to buttons_search_bydistance.js, look for "method: 'GRAPH'" and change all to method: 'WEIGHT'. There are 4 instances. Reload the panel and done. It should work. I will fix that on the next release to follow what you set on the properties (If you open the properties, you will see a method property, but changing it will do nothing). And then, as noted, you (or anyone else) should use WEIGHT when using arbitrary genre values. In playlist tools this is simply done by using the menu name 'By weight' instead of  'By graph'.
You also have the custom buttons 'buttons_search_bydistance_customizable.js' which you can use and set to WEIGHT at properties (there it works fine).
X

The files edited (you have the 3 methods forced, or one which just follow the properties panel):
X
Title: Re: Search-by-Distance-SMP
Post by: mjm716 on 2021-06-02 15:08:20
Thanks for the feedback and support. BTW there is a _README and INSTALLATION.txt (no info) and a README.md ?? which has more info but finding or applying it isn't particularly intuitive.

I wasn't expecting this tool to be some sort of liguial AI to relate tags by meaning. Obviously XD

I did make the changes and there are results for all 4 buttons now, however the results are also confounding.

-Nearest Tracks returns interesting lists which has the most overlap in the style tag.
-Similar Tracks returns a very random list with very little overlap in any of the 5 fields.
-Similar Genres returns a list with almost no connection or repetition of the seed genres and no other obvious patterns.
-Similar Mood returns a list roughly split in matches of mood and theme (<50% each), and very little similarity of genres.
Is there a description of the actual functionality of those 4 buttons somewhere?

I'm hoping to play with the weightings more as KEY and BPM are also important to me, but documentation seems to favor theory over practice. What exactly is the scale being calculated of all the variables "weight" (in panel prefs)? based on 100%?


Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-06-02 17:45:05
Thanks for the feedback and support. BTW there is a _README and INSTALLATION.txt (no info) and a README.md ?? which has more info but finding or applying it isn't particularly intuitive.

I wasn't expecting this tool to be some sort of liguial AI to relate tags by meaning. Obviously XD

I did make the changes and there are results for all 4 buttons now, however the results are also confounding.

-Nearest Tracks returns interesting lists which has the most overlap in the style tag.
-Similar Tracks returns a very random list with very little overlap in any of the 5 fields.
-Similar Genres returns a list with almost no connection or repetition of the seed genres and no other obvious patterns.
-Similar Mood returns a list roughly split in matches of mood and theme (<50% each), and very little similarity of genres.
Is there a description of the actual functionality of those 4 buttons somewhere?

I'm hoping to play with the weightings more as KEY and BPM are also important to me, but documentation seems to favor theory over practice. What exactly is the scale being calculated of all the variables "weight" (in panel prefs)? based on 100%?



Github has a readme used on the frontpage. That's the "readme". It's unique for each repository.

The other file is universal for all my scripts and it clearly explains only how to install things and some basic tips. But as you can note, there is no specific info at all about the script you downloaded. I could change the filename to TIPS_INSTALLATION.txt though (?).

Quote
-Nearest Tracks returns interesting lists which has the most overlap in the style tag.
-Similar Tracks returns a very random list with very little overlap in any of the 5 fields.
-Similar Genres returns a list with almost no connection or repetition of the seed genres and no other obvious patterns.
-Similar Mood returns a list roughly split in matches of mood and theme (<50% each), and very little similarity of genres.
Is there a description of the actual functionality of those 4 buttons somewhere?

I'm hoping to play with the weightings more as KEY and BPM are also important to me, but documentation seems to favor theory over practice. What exactly is the scale being calculated of all the variables "weight" (in panel prefs)? based on 100%?
First... yep, these are obviously scripts to configure to your liking or use-case. The buttons are "examples" and I clearly indicate that in the readmes. They may work fine for most people without touching anything BUT obviously these are advanced things which try to emulate complex algorithms and require some thinking to make it work. It can even output genres which inspired or  are derivatives of the current selected track's genre. Or "opposite genres". Or mixes like DJ do, by key ordering, etc. And all can be configurable via properties with the custom button. (which you may have not tried yet). The other buttons have some weights and filter scoring static, written in the js files. Have that in mind if you are playing with them ;) (and that reminds me to totally remove properties not used for the static buttons to not confuse more people)

Second, probably you would make better use of Playlist-Tools-SPM, which also includes this... and has many other tools, easier to use/configure. (like dynamic query playlist creation according to the currently selected track, etc.)

Now, back to your questions.

All buttons have weighting variables, what works for me may not work for you. I give 4 examples, I could have simple given one and no one would complain  ::)  The labeling is arbitrary according to my experience and my library (and I can assure you it totally works like their title say hahaha), but it may output different things in your experience according to your tags scheme. That's why there is a customizable button, so you can simply add one which does what you want and done.

- The buttons are set to output random tracks from the pool (this will always be the same as long as the "variables" are the same). You can change that part in the properties. Then it will output always the same tracks most similar to the current one, by order. (Personally, I prefer to listen to different things, that's why the default is the other behavior)

Quote
-Similar Tracks returns a very random list with very little overlap in any of the 5 fields.
What you or I understand by similar is relative  ::)  I mean... you have weights. If you don't set mood or BPM tags on tracks, then those are discarded and you got less vectors of similarity. If you want to give more importance to genre matching, then increase that variable. For genre, genre weight.

That button clearly explains in the tooltip it will try to give more weight to genre tags but will not care so much about style tags.

Quote
-Similar Genres returns a list with almost no connection or repetition of the seed genres and no other obvious patterns.
What do you mean by connection? You are using WEIGHT method. It simply gives lets say 100 if it matches all genres, and 0 if it matches none. You got a filter (lets say +70% is similar). -this is obviously a simplified version-
Whatever you got must be over that filter, so whatever you got must have some genre tags equal to the selection you used to create the playlist. That's by construction. Do you mean you are not getting that? Or you are not satisfied with which tags are being used? The second one has to do more with all music tagging than anything... as said, they are totally situational XD and make no sense at all (african, etc.).

For ex. all my rock tracks have a genre Rock. And then Acid Rock or Pop Rock or Gothic Rock are styles. The scripts can not work with bad tagging habits (don't take it personal) and it's clearly stated in the readmes and the first use popup that appears.

Now, if  you find you get tracks with not enough similar tags.. you can either increase the filter minimum (to 85% for ex) or adjust the weights. If you are getting tracks which don't match any tag, then we are talking about a config problem or bug. If the tags you use doesn't really relate to how you perceive your music (and how the script uses those tags to group them), then... that's outside my reach.

Quote
-Similar Mood returns a list roughly split in matches of mood and theme (<50% each), and very little similarity of genres.
That's the idea. Did you read the tooltips over the buttons?  ::)  That button should not care at all about genres/styles and just output whatever is similar in moods and themes and all that. If you want more similarity, increase the filter value.

Btw my tracks have: genre, style, BPM, key and mood tags. Matching at least the last 3 always give pleasuring results.

Quote
Is there a description of the actual functionality of those 4 buttons somewhere?
Tooltip.
search_bydistance.js has extensive examples...
X
buttons_search_bydistance.js clearly estates the buttons are just examples, and the readme explains what each variable does. BUT you got the examples at the previous file which is probably easier to understand.

Quote
I'm hoping to play with the weightings more as KEY and BPM are also important to me, but documentation seems to favor theory over practice. What exactly is the scale being calculated of all the variables "weight" (in panel prefs)? based on 100%?
More simple. It doesn't matter what you put. Whatever weights you put  the total weight will be... the sum hahaha simple.
So if you put 25, 25, 30, 20. Then they sum 100% and obviously each value is the percentage too.
But you can put 1, 1,3,60. And it works the same. They sum 65, and 65 will be 100%.

PD: Try to add a more strict global query to pre-filter your library. Since seeing your logs you are working with 200K tracks and that's really really big. It will greatly speed up the things. Also setting weight to zero for unused things -if you set genre to 80%, you may well set date or another tag to 0%...- (again, you must use the customizable button for that)

EDIT: about relating tags "by meaning"... something like that is done for keys (they are grouped by complex relations). Try harmonic mixing in a custom button, or setting the key weight high and a range of 2 or 3.
About genres, that's done with GRAPH method. But I'm sorry to say all music tags are out of equation in that case (as genres, they are ok as custom tag).
You have an intermediate method DYNGENRE, but there must be some standard tags to work. Like "Rock". If allmusic tags gothic rock with 10 tags but not rock, then you are screwed. Just use WEIGHT and adjust weightings and filter scoring.

Feel free to ask me anything. It's a bit tedious to explain all but I imagine it's more to try something you don't understand hahaha I'm trying to iron out those points you have noted are confusing. Let me know if the examples I pointed to are good enough or not. (and maybe they should be added to their own file for easy referencing)

And try the playlist-Tools thing (https://hydrogenaud.io/index.php?topic=120978.0), since that probably suits your most immediate needs. It can easily create playlists with tracks which have 5 o more equal genres to the currently selected track or things like that. Can not be easier than that. (there are individual buttons, and the main playlist tools button which has tons of utilities and examples). (*)
X

(*) It's ironic but this is just one "little" thing within all the set of scripts.
Title: Re: Search-by-Distance-SMP
Post by: mjm716 on 2021-06-03 04:00:41

And try the playlist-Tools thing (https://hydrogenaud.io/index.php?topic=120978.0), since that probably suits your most immediate needs.

The 100% tip was the key - really need a weighted verbosity filter. ;)

Thanks, will do, but playlist_manager.js is currently missing?

https://github.com/regorxxx/Playlist-Tools-SMP (https://github.com/regorxxx/Playlist-Tools-SMP)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-06-03 08:42:40

And try the playlist-Tools thing (https://hydrogenaud.io/index.php?topic=120978.0), since that probably suits your most immediate needs.

The 100% tip was the key - really need a weighted verbosity filter. ;)

Thanks, will do, but playlist_manager.js is currently missing?

https://github.com/regorxxx/Playlist-Tools-SMP (https://github.com/regorxxx/Playlist-Tools-SMP)
hahaha No. That's another script with another repository...  ::) Tell me if I'm wrong but there is no place at that github I mention the playlist manager (?)
You have all my scripts there:
https://github.com/regorxxx

And there are 4 main scripts for end-users: world map, playlist manager, playlist tools and this one (also included in playlist tools).

My take is offline -I'm against internet being a requirement for this- and configurable intelligent playlist creation. If you want something similar for artist similarity with is just "plug&play" but using internet (and with less tools/or things to understand), you have
https://hydrogenaud.io/index.php?topic=121006.0

EDIT: And before you despair using the other tool, remember that ALL built-in examples are just examples and use standard tags (genre, mood, etc.) and not arbitrary tags (ALL MUSIC XXX). Create your own entries, remove the menus you don't need or edit the properties and change the current default menus replacing "genre" with whatever you like. (this reminds me I could add All music tags to the default tags too and they could simply be skipped if not present)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-06-07 19:36:03
v1.2.0 - File restructuring and cleanup + bugfixes (https://github.com/regorxxx/Search-by-Distance-SMP)

Main change on script is that mean distance is now also divided by the number of genre/styles of the reference track for GRAPH method. 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).
See changelog.

## [1.2.0] - 2021-06-07
### Added
- Buttons: 4 sets of buttons, one for each method: GRAPH, WEIGHT, DYNGENRE + ONE CONFIGURABLE (method at properties). (This in addition to the fully customizable buttons)
### Changed
- 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).
- Buttons framework: updated.
- 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'.
- All buttons now have not needed properties deleted, to not confuse users about things on properties not being reflected on the buttons.
### Removed
### Fixed
- Default args: crashes when trying to access non present properties on the arguments (found while applying the previous changes).
- Cache: crash when sharing cache between 2 panels due to a typo.
- In key mixing: crash when pool was smaller than set playlist length.
- In key mixing: not really random due to using sort + random method. Using an array shuffle now instead.
- Random picking: not really random due to using sort + random method. Using an array shuffle now instead.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-06-15 17:35:05
v2.0.0 - Recipes, themes and Major buttons rework (https://github.com/regorxxx/Search-by-Distance-SMP)
DO NOT COPY OVER PREVIOUS INSTALLATION (*). Remove all previous panels within foobar and follow the instructions at the readme and installation tips. You can safely delete all files at 'xxx-scripts' first. If you are using other scripts, then download their latest version too and reinstall (Playlist Manager and World Map can be updated without de-installing their panels first, i.e. you can maintain all your settings).

See changelog for all changes.

    Recipes and themes for Search by distance. Recipes are config files for the buttons, which can be easily swapped. Themes mimic MusicIp functionality, i.e. work as a reference for playlist creation instead of using a track. You can easily create random playlists following a "mood" or "style" this way.
    Major buttons rework with easy to install and configure toolbars which allow to add\remove buttons on the fly.

(*) File structure has changed and now all buttons are meant to be used with a main toolbar file for easy config. Not doing so will lead to missing features.


## [2.0.0] - 2021-06-15
### Added
- Recipes: Recipes presets may be used to set variables of the function. Whenever the argument is set, it's used instead of related property. Custom button now allows to use a recipe file. Once set, button would always use the recipe as arguments instead of the properties variables. A recipe may force the use of a theme.
- Recipes: custom button now allows to set the recipe file used by pressing Ctrl + L. Click. 'None' would use the current properties variables, which is the default behaviour.
- Themes: themes presets may be used as reference instead of tracks. Whenever the argument is set, it's used instead of the selection. Custom button now allows to use a theme file. Once set, button would always use the theme as reference instead of the current selection.
- Buttons: custom button now allows to set the theme file used by pressing Shift + L. Click. 'None' would use the current selection, which is the default behavior.
- Buttons: custom button now allows to create a theme file using the currently focused track's tags. See theme menu (Shift + L. Click).
- Buttons: custom button now allows to set most configs using the configuration menu (Ctrl + Shift + L. Click): method, tags remapping, filters, etc. Whenever a config is overriden by a recipe, the related entry is greyed and a warning is shown.
- Buttons: new '_buttons_toolbar.js' toolbar which can be customized without editing the js file. Allows to enable/disable buttons -even add multiple copies- on demand and customize toolbar background color (L. Click on the bar).
### Changed
- Console: shows on console the track or theme used as reference (name and path).
- Buttons: custom button code cleanup and improvements on name changing.
- Buttons: custom button tooltip shows the theme and recipe being used, along tips to change them.
- Buttons: icons to all buttons.
- Buttons framework: skip icon drawing if font is not found.
- Buttons framework: allow a menu when clicking on the panel (and not on buttons).
- Portable: when properties are set for the first time, now use relative paths on profile folder for portable installations (>= 1.6). When possible, any other stored path is also stored as relative paths (for example themes or recipes on buttons).
- Helpers: warn about missing font on console if trying to load a font and is not found.
- Split all buttons into examples, toolbar and buttons folder. 'buttons_toolbar.js' is now the main script -in root folder- which can be loaded within a panel for easy configuration of buttons from this repository or any other.
### Removed
### Fixed
- Console: when playlist length is set to Infinite, warnings are no longer shown about number of tracks being less than it (which obviously always happened).
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-13 19:44:33
regor, I have a (dumb) question regarding harmonic mixing...I use InitialKey instead of Key. Where should I change (replace InitialKey with Key)  this, in which script or properties panel?
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-13 20:06:12
regor, I have a (dumb) question regarding harmonic mixing...I use InitialKey instead of Key. Where should I change (replace InitialKey with Key)  this, in which script or properties panel?
That one along bpm are hard-coded. Will be configurable on properties on next releases.

Line 1423 at search_bydistance.js:
Code: [Select]
const restTagNames = [(keyWeight !== 0 || bInKeyMixingPlaylist) ? 'key' : 'skip', (dateWeight !== 0) ? dateTag[0] : 'skip', (bpmWeight !== 0) ? 'bpm' : 'skip', (customNumWeight !== 0) ? customNumTag[0] : 'skip']; // 'skip' returns empty arrays...

Replace 'key' with 'InitialKey' or whatever you use.

Btw if you use the customizable button (buttons_search_bydistance_customizable.js), it should allow you to configure most things without touching the properties. In next releases key would be on that tag list:

X
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-14 00:56:17
I replaced key with initialkey where you said, but it doesnt work, this is what I have in the console :

Called: Harmonic mix\Harmonic mix from playlist
do_harmonic_mixing: Tracks don't have key tag.
["domKey", "energySwitch", "moodDrop", "perfectMatch", "moodBoost", "subDomKey", "energySwitch", "energyRaise", "perfectMatch", "energyBoost", "energyDrop", "energyDrop", "perfectMatch", "domKey", "perfectMatch", "perfectMatch", "perfectMatch", "subDomKey"]

initialkey is using this values :
G#m
Bmaj
Ebm
Gb
Bbm
Db
Fmin
Ab
Cmin
Eb
Gmin
Bb
Dmin
Fmaj
Amin
Cmaj
Emin
Gmaj
Bmin
Dmaj
F#m
Amaj
C#m
Emaj
Thanks for the tip about buttons_search_bydistance_customizable.js
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-14 08:56:34
If you check the related repository at github for harmonic mixing you will see only standard notation is allowed
https://github.com/regorxxx/Camelot-Wheel-Notation

i.e. 'Abm'   or 'G#m'
Bmin or Dmaj are not allowed, Dmaj is D, Bmin is Bm.

You can either retag your files with standard notation (masstagger could automate the process or mp3tag) (*) or edit camelot_wheel_xxx.js (keyNotationObject and keyNotation). Note your files have also mixed notations (D#m and Dmin) (**).

If you prefer to edit the descriptor, you would add this to keyNotation for ex. but replacing the left column with Abmin, D#m (?? it should be D#min (**)), etc. (Also note you should not add duplicates, if D#m is already present on standard notation, skip it)
Code: [Select]
['G#m'	, '1A' 	], // Minor
['Abm' , '1A' ],
['D#m' , '2A' ],
['Ebm' , '2A' ],
['A#m' , '3A' ],
['Bbm' , '3A' ],
['Fm' , '4A' ],
['Cm' , '5A' ],
['Gm' , '6A' ],
['Dm' , '7A' ],
['Am' , '8A' ],
['Em' , '9A' ],
['Bm' , '10A' ],
['F#m' , '11A' ],
['Gbm' , '11A' ],
['C#m' , '12A' ],
['Dbm' , '12A' ],
['B' , '1B' ], // Major
['F#' , '2B' ],
['Gb' , '2B' ],
['C#' , '3B' ],
['Db' , '3B' ],
['G#' , '4B' ],
['Ab' , '4B' ],
['D#' , '5B' ],
['Eb' , '5B' ],
['A#' , '6B' ],
['Bb' , '6B' ],
['F' , '7B' ],
['C' , '8B' ],
['G' , '9B' ],
['D' , '10B' ],
['A' , '11B' ],
['E' , '12B' ],

I'm not sure about adding that additional translation on next release, which program gives those tags?

(*) Just replacing 'min' with 'm' would do on all tracks. No need to create an script for every key. Also, maybe that solution could be added to the script:

Code: [Select]
const camelotKey = camelotWheel.keyNotationObject.has(key) ? {...camelotWheel.keyNotationObject.get(key)} : null;
->
const camelotKey = camelotWheel.keyNotationObject.has(key.replace('min','m')) ? {...camelotWheel.keyNotationObject.get(key.replace('min','m'))} : null;

Code: [Select]
const camelotKeyNew = camelotWheel.keyNotationObject.get(keyNew);
const camelotKey = camelotWheel.keyNotationObject.get(key);
->
const camelotKeyNew = camelotWheel.keyNotationObject.get(keyNew.replace('min','m'));
const camelotKey = camelotWheel.keyNotationObject.get(key.replace('min','m'));

Code: [Select]
camelotKeyCurrent = keyCurrent.length ? camelotWheel.getKeyNotationObject(keyCurrent) : null;
->
camelotKeyCurrent = keyCurrent.length ? camelotWheel.getKeyNotationObject(keyCurrent.replace('min','m')) : null;

Code: [Select]
camelotKeyNew = (keyNew.length) ? camelotWheel.getKeyNotationObject(keyNew) : null;
->
camelotKeyNew = (keyNew.length) ? camelotWheel.getKeyNotationObject(keyNew.replace('min','m')) : null;

Or alternatively simply editing the has/get funcs at camelot_wheel_xxx.js would do (not needing anything more):
Code: [Select]
	hasKey(xy) {return (typeof xy === 'object' ? (xy.hasOwnProperty('hour') && xy.hasOwnProperty('letter') ? this.keyNotation.has(xy.hour + xy.letter) : false): this.keyNotation));},
getKeyNotationObject(y) {return (this.hasKey(y) ? {...this.keyNotationObject.get(y)} : null);},

->

hasKey(xy) {return (typeof xy === 'object' ? (xy.hasOwnProperty('hour') && xy.hasOwnProperty('letter') ? this.keyNotation.has(xy.hour + xy.letter) : false): this.keyNotation.has(xy.replace('min','m')));},
getKeyNotationObject(y) {return (this.hasKey(y.replace('min','m')) ? {...this.keyNotationObject.get(y.replace('min','m'))} : null);},

Let me know if it works for you, and probably I will add the latest change too.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-15 18:24:18
Sorry for late answer but my foobar configuration refused to start ( a problem with SMP, a shutdown corrupted a package json, the settings for Library Tree were lost, but in the end everything was restored 100% , I had a backup for Library Tree, but it took awhile until it was solved).

"I'm not sure about adding that additional translation on next release, which program gives those tags?"
Probably you shouldn't.
It was simply an error from my part (I copied the wrong notations), I use standard notation (I use Serato for key values).

"Line 1423 at search_bydistance.js:
const restTagNames = [(keyWeight !== 0 || bInKeyMixingPlaylist) ? 'key' : 'skip', (dateWeight !== 0) ? dateTag[0] : 'skip', (bpmWeight !== 0) ? 'bpm' : 'skip', (customNumWeight !== 0) ? customNumTag[0] : 'skip']; // 'skip' returns empty arrays...

Replace 'key' with 'InitialKey' or whatever you use."
This didn't worked
But I noticed that if I copy the values from initialkey tag to key tag, the script works, so those values (key notations ) are good.

Well, our discussion wasn't totally useless because you reminded me about a masstagger script that I had. For those that don't want to remap tags or simply want to have in the "key'' tag , Camelot notations (obviously the files must have a key value somewhere added with Serato or other program) : http://sendanywhe.re/ZDXKN35B
Then, if you go to : Display - Playlist View - Columns - Style script ( don't forget to check "Use custom style script") and you add this:

$if($strstr(%KEY%,1A),$set_style(back,$rgb(86,241,218,86,241,218)),%KEY%)
$if($strstr(%KEY%,1B),$set_style(back,$rgb(2,237,202,2,237,202)),%KEY%)
$if($strstr(%KEY%,2A),$set_style(back,$rgb(125,242,170,125,242,170)),%KEY%)
$if($strstr(%KEY%,2B),$set_style(back,$rgb(60,238,129,60,238,129)),%KEY%)
$if($strstr(%KEY%,3A),$set_style(back,$rgb(174,245,137,174,245,137)),%KEY%)
$if($strstr(%KEY%,3B),$set_style(back,$rgb(134,242,79,134,242,79)),%KEY%)
$if($strstr(%KEY%,4A),$set_style(back,$rgb(232,218,161,232,218,161)),%KEY%)
$if($strstr(%KEY%,4B),$set_style(back,$rgb(223,202,115,223,202,115)),%KEY%)
$if($strstr(%KEY%,5A),$set_style(back,$rgb(253,191,167,253,191,167)),%KEY%)
$if($strstr(%KEY%,5B),$set_style(back,$rgb(255,160,124,255,160,124)),%KEY%)
$if($strstr(%KEY%,6A),$set_style(back,$rgb(253,175,183,253,175,183)),%KEY%)
$if($strstr(%KEY%,6B),$set_style(back,$rgb(255,160,124,255,160,124)),%KEY%)
$if($strstr(%KEY%,7A),$set_style(back,$rgb(253,170,204,253,170,204)),%KEY%)
$if($strstr(%KEY%,7B),$set_style(back,$rgb(255,129,180,255,129,180)),%KEY%)
$if($strstr(%KEY%,8A),$set_style(back,$rgb(242,171,228,242,171,228)),%KEY%)
$if($strstr(%KEY%,8B),$set_style(back,$rgb(238,130,217,238,130,217)),%KEY%)
$if($strstr(%KEY%,9A),$set_style(back,$rgb(221,180,253,221,180,253)),%KEY%)
$if($strstr(%KEY%,9B),$set_style(back,$rgb(206,143,255,206,143,255)),%KEY%)
$if($strstr(%KEY%,10A),$set_style(back,$rgb(190,205,253,190,205,253)),%KEY%)
$if($strstr(%KEY%,10B),$set_style(back,$rgb(159,182,255,159,182,255)),%KEY%)
$if($strstr(%KEY%,11A),$set_style(back,$rgb(142,228,249,142,228,249)),%KEY%)
$if($strstr(%KEY%,11B),$set_style(back,$rgb(86,217,249,86,217,249)),%KEY%)
$if($strstr(%KEY%,12A),$set_style(back,$rgb(85,240,240,85,240,240)),%KEY%)
$if($strstr(%KEY%,12B),$set_style(back,$rgb(85,240,240,85,240,240)),%KEY%)

The colors will look exactly like in the Camelot Wheel :







Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-15 18:36:25
So, my problem was solved. I use Serato to get the key values in ''initialkey'' tag, then I use a script for Masstagger to add  Camelot notations in ''key'' tag (this way it will also have a great look, similar to dj programs) . Thanks, once again @regor , for the help
Btw, just to be sure, if you look at that picture, (I used : Playlist tools - Playlist manipulation - Harmonic mix from playlist) your script works ok, no? I'm asking just to be sure that foobar doesn't rearranges the songs in a wrong order
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-15 19:22:17
So, my problem was solved. I use Serato to get the key values in ''initialkey'' tag, then I use a script for Masstagger to add  Camelot notations in ''key'' tag (this way it will also have a great look, similar to dj programs) . Thanks, once again @regor , for the help
Btw, just to be sure, if you look at that picture, (I used : Playlist tools - Playlist manipulation - Harmonic mix from playlist) your script works ok, no? I'm asking just to be sure that foobar doesn't rearranges the songs in a wrong order
Note the whole point of only allowing standard notation was to translate it to camelot notation on the fly hahahahaha (*)
So there is no need at all to do it first by yourself! (my idea was to allow SMP to work with standard notation -Gbm- and camelot notation at the same time -2A- without forcing you to re-tag). Just copying Initialkey to key should work. Obviously, doing the translation too. Anyway retagging will not be needed at all in next release since you can set the key tag.

(*) My first approach to the problem was also using a similar script than the one you posted. But it's really tedious to apply that script since it had so many lines... and you need to re-apply it on every new track. So I found it better to just do it on the SMP script using the keys we already had (Gbm, ...).
There is another problem, some keys have a sharp and flat notation and are equivalent. Abm and G#m are both 1A. So you have to duplicate the script to include both cases. For common users, that requirement would have been a big No.

Now that you mention it I will add that masstagger script to 'presets\Masstagger\' (I think the latest public release does not have that folder (?)). I'm sharing my own masstagger scripts which may be useful for people (although not related to any tool in particular), and the key translation may come useful too. From standard to camelot and the opposite one.

Quote
Replace 'key' with 'InitialKey' or whatever you use."
This didn't worked
But I noticed that if I copy the values from initialkey tag to key tag, the script works, so those values (key notations ) are good.
Note there are 2 functions (one called V2), maybe you edited the wrong function (?). It's 100% sure that editing that line should allow you to load tags from initialkey (try lowercase).

About it working, see console. If it says it works, then it works hahahaha Really, if you enable console debug, it will output an array of keys telling you the movements used. With that, you can compare the actual order and the "desired order" and easily check if it works. Looking at your screenshot I would say yes... similar keys are grouped, when it changes it tries small steps (+- 1) and there are a few mood boosts/drops (+-3). The complete arrangement is random, i.e. on every run a new "pattern" is created. But the proportion of movements allowed is not (for ex. 10% of movements are +-3).

Finally, use your ears. If the playlist flows without strange jumps and following tracks sounding as a natural progression of the previous one, no matter the music genre... then it works. There are a few mood/energy jumps here and there, but really limited in number and meant to spice it a bit.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-15 19:34:31
To enable debug, it seems I missed to expose a global bool... you can enable it for Search By distance buttons at properties, but not for Playlist Tools menu.

Anyway, at main\playlist_tools_menu.js look for 'const defaultArgs'
This is my current code (probably different to the latest public release)
Code: [Select]
const defaultArgs = {
playlistLength: menu_properties['playlistLength'][1],
forcedQuery: menu_properties['forcedQuery'][1],
ratingLimits: menu_properties['ratingLimits'][1].split(','),
bHttpControl: () => {return utils.CheckComponent('foo_httpcontrol') && _isFolder(fb.ProfilePath + 'foo_httpcontrol_data\\ajquery-xxx')},
httpControlPath: fb.ProfilePath + 'foo_httpcontrol_data\\ajquery-xxx\\smp\\'
};

if you add 'bDebug: true' there it will output verbose comments to console log for most tools:
Code: [Select]
const defaultArgs = {
playlistLength: menu_properties['playlistLength'][1],
forcedQuery: menu_properties['forcedQuery'][1],
ratingLimits: menu_properties['ratingLimits'][1].split(','),
bHttpControl: () => {return utils.CheckComponent('foo_httpcontrol') && _isFolder(fb.ProfilePath + 'foo_httpcontrol_data\\ajquery-xxx')},
httpControlPath: fb.ProfilePath + 'foo_httpcontrol_data\\ajquery-xxx\\smp\\',
bDebug: true
};
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-15 21:52:30
Have updated the repository with all the latest changes and fixes. Key remap included. If anyone want to test it, download the files directly from the repository not the releases.

(it's recommended to also download the latest files from the rest of my scripts, since I have changed all with major changes in Playlist Tools. If you use Playlist Tools, just download all from there, since it includes this)

Changelog is up to date on github. Check unreleased.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-15 23:28:29
"Now that you mention it I will add that masstagger script to 'presets\Masstagger\' (I think the latest public release does not have that folder (?)) I'm sharing my own masstagger scripts which may be useful for people (although not related to any tool in particular) "
No, there is no folder with Masstagger scripts, so it will be a useful thing
@regor I know, I forgot to mention , my method sacrifices a bit of efficiency in favor of visual aspect haha . The easiest solution would be just to remap the tags and that's all. But instead I choose to push a button from time to time just to have that colorful effect like in that picture (and Camelot notations), and besides it's not entirely silly, it helps a lot visually , if you want to make a manual mix using Camelot notations , you just see the colors and you know that something is wrong , so you could include that little script for CUI too (  Display - Playlist View - Columns - Style script).......for those interested in visual aspect or those that can find it useful :)

"Looking at your screenshot I would say yes... similar keys are grouped, when it changes it tries small steps"

Good to know it's working (I had a silly belief that maybe foobar will interfere with your script and will try to sort the songs in a wrong way haha), I didn't looked at the camelot wheel for a long time so I completely forgot the rules haha, so I thought you'll spot immediately if something is wrong :)


Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-16 08:43:53
"Now that you mention it I will add that masstagger script to 'presets\Masstagger\' (I think the latest public release does not have that folder (?)) I'm sharing my own masstagger scripts which may be useful for people (although not related to any tool in particular) "
No, there is no folder with Masstagger scripts, so it will be a useful thing
@regor I know, I forgot to mention , my method sacrifices a bit of efficiency in favor of visual aspect haha . The easiest solution would be just to remap the tags and that's all. But instead I choose to push a button from time to time just to have that colorful effect like in that picture (and Camelot notations), and besides it's not entirely silly, it helps a lot visually , if you want to make a manual mix using Camelot notations , you just see the colors and you know that something is wrong , so you could include that little script for CUI too (  Display - Playlist View - Columns - Style script).......for those interested in visual aspect or those that can find it useful :)

"Looking at your screenshot I would say yes... similar keys are grouped, when it changes it tries small steps"

Good to know it's working (I had a silly belief that maybe foobar will interfere with your script and will try to sort the songs in a wrong way haha), I didn't looked at the camelot wheel for a long time so I completely forgot the rules haha, so I thought you'll spot immediately if something is wrong :)



I think it may be possible to simply add the translation script directly to the column but use standard notation on tags. So you have both, no need to re-tag and easy visualization. Will check it

The latest update already includes those masstager scripts for moods (at presets).

Update:

key translation (both flat and sharp standard notations) + UI Colors (CUI): using this one there is no need to re-tag files but you can still visualize camelot keys as a column.
Code: [Select]
$if($stricmp(%KEY%,G#m),$puts(kTrans,1A))
$if($stricmp(%KEY%,Abm),$puts(kTrans,1A))
$if($stricmp(%KEY%,D#m),$puts(kTrans,2A))
$if($stricmp(%KEY%,Ebm),$puts(kTrans,2A))
$if($stricmp(%KEY%,A#m),$puts(kTrans,3A))
$if($stricmp(%KEY%,Bbm),$puts(kTrans,3A))
$if($stricmp(%KEY%,Fm),$puts(kTrans,4A))
$if($stricmp(%KEY%,Cm),$puts(kTrans,5A))
$if($stricmp(%KEY%,Gm),$puts(kTrans,6A))
$if($stricmp(%KEY%,Dm),$puts(kTrans,7A))
$if($stricmp(%KEY%,Am),$puts(kTrans,8A))
$if($stricmp(%KEY%,Em),$puts(kTrans,9A))
$if($stricmp(%KEY%,Bm),$puts(kTrans,10A))
$if($stricmp(%KEY%,F#m),$puts(kTrans,11A))
$if($stricmp(%KEY%,Gbm),$puts(kTrans,11A))
$if($stricmp(%KEY%,C#m),$puts(kTrans,12A))
$if($stricmp(%KEY%,Dbm),$puts(kTrans,12A))
$if($stricmp(%KEY%,B),$puts(kTrans,1B))
$if($stricmp(%KEY%,F#),$puts(kTrans,2B))
$if($stricmp(%KEY%,Gb),$puts(kTrans,2B))
$if($stricmp(%KEY%,C#),$puts(kTrans,3B))
$if($stricmp(%KEY%,Db),$puts(kTrans,3B))
$if($stricmp(%KEY%,G#),$puts(kTrans,4B))
$if($stricmp(%KEY%,Ab),$puts(kTrans,4B))
$if($stricmp(%KEY%,D#),$puts(kTrans,5B))
$if($stricmp(%KEY%,Eb),$puts(kTrans,5B))
$if($stricmp(%KEY%,A#),$puts(kTrans,6B))
$if($stricmp(%KEY%,Bb),$puts(kTrans,6B))
$if($stricmp(%KEY%,F),$puts(kTrans,7B))
$if($stricmp(%KEY%,C),$puts(kTrans,8B))
$if($stricmp(%KEY%,G),$puts(kTrans,9B))
$if($stricmp(%KEY%,D),$puts(kTrans,10B))
$if($stricmp(%KEY%,A),$puts(kTrans,11B))
$if($stricmp(%KEY%,E),$puts(kTrans,12B))
$if($get(kTrans),,$puts(kTrans,%key%))
$get(kTrans)
$if($stricmp($get(kTrans),1A),$set_style(back,$rgb(86,241,218,86,241,218)),$get(kTrans))
$if($stricmp($get(kTrans),1B),$set_style(back,$rgb(2,237,202,2,237,202)),$get(kTrans))
$if($stricmp($get(kTrans),2A),$set_style(back,$rgb(125,242,170,125,242,170)),$get(kTrans))
$if($stricmp($get(kTrans),2B),$set_style(back,$rgb(60,238,129,60,238,129)),$get(kTrans))
$if($stricmp($get(kTrans),3A),$set_style(back,$rgb(174,245,137,174,245,137)),$get(kTrans))
$if($stricmp($get(kTrans),3B),$set_style(back,$rgb(134,242,79,134,242,79)),$get(kTrans))
$if($stricmp($get(kTrans),4A),$set_style(back,$rgb(232,218,161,232,218,161)),$get(kTrans))
$if($stricmp($get(kTrans),4B),$set_style(back,$rgb(223,202,115,223,202,115)),$get(kTrans))
$if($stricmp($get(kTrans),5A),$set_style(back,$rgb(253,191,167,253,191,167)),$get(kTrans))
$if($stricmp($get(kTrans),5B),$set_style(back,$rgb(255,160,124,255,160,124)),$get(kTrans))
$if($stricmp($get(kTrans),6A),$set_style(back,$rgb(253,175,183,253,175,183)),$get(kTrans))
$if($stricmp($get(kTrans),6B),$set_style(back,$rgb(255,160,124,255,160,124)),$get(kTrans))
$if($stricmp($get(kTrans),7A),$set_style(back,$rgb(253,170,204,253,170,204)),$get(kTrans))
$if($stricmp($get(kTrans),7B),$set_style(back,$rgb(255,129,180,255,129,180)),$get(kTrans))
$if($stricmp($get(kTrans),8A),$set_style(back,$rgb(242,171,228,242,171,228)),$get(kTrans))
$if($stricmp($get(kTrans),8B),$set_style(back,$rgb(238,130,217,238,130,217)),$get(kTrans))
$if($stricmp($get(kTrans),9A),$set_style(back,$rgb(221,180,253,221,180,253)),$get(kTrans))
$if($stricmp($get(kTrans),9B),$set_style(back,$rgb(206,143,255,206,143,255)),$get(kTrans))
$if($stricmp($get(kTrans),10A),$set_style(back,$rgb(190,205,253,190,205,253)),$get(kTrans))
$if($stricmp($get(kTrans),10B),$set_style(back,$rgb(159,182,255,159,182,255)),$get(kTrans))
$if($stricmp($get(kTrans),11A),$set_style(back,$rgb(142,228,249,142,228,249)),$get(kTrans))
$if($stricmp($get(kTrans),11B),$set_style(back,$rgb(86,217,249,86,217,249)),$get(kTrans))
$if($stricmp($get(kTrans),12A),$set_style(back,$rgb(85,240,240,85,240,240)),$get(kTrans))
$if($stricmp($get(kTrans),12B),$set_style(back,$rgb(85,240,240,85,240,240)),$get(kTrans))

Key translation only (for column display CUI)
Code: [Select]
$if($stricmp(%KEY%,G#m),$puts(kTrans,1A))
$if($stricmp(%KEY%,Abm),$puts(kTrans,1A))
$if($stricmp(%KEY%,D#m),$puts(kTrans,2A))
$if($stricmp(%KEY%,Ebm),$puts(kTrans,2A))
$if($stricmp(%KEY%,A#m),$puts(kTrans,3A))
$if($stricmp(%KEY%,Bbm),$puts(kTrans,3A))
$if($stricmp(%KEY%,Fm),$puts(kTrans,4A))
$if($stricmp(%KEY%,Cm),$puts(kTrans,5A))
$if($stricmp(%KEY%,Gm),$puts(kTrans,6A))
$if($stricmp(%KEY%,Dm),$puts(kTrans,7A))
$if($stricmp(%KEY%,Am),$puts(kTrans,8A))
$if($stricmp(%KEY%,Em),$puts(kTrans,9A))
$if($stricmp(%KEY%,Bm),$puts(kTrans,10A))
$if($stricmp(%KEY%,F#m),$puts(kTrans,11A))
$if($stricmp(%KEY%,Gbm),$puts(kTrans,11A))
$if($stricmp(%KEY%,C#m),$puts(kTrans,12A))
$if($stricmp(%KEY%,Dbm),$puts(kTrans,12A))
$if($stricmp(%KEY%,B),$puts(kTrans,1B))
$if($stricmp(%KEY%,F#),$puts(kTrans,2B))
$if($stricmp(%KEY%,Gb),$puts(kTrans,2B))
$if($stricmp(%KEY%,C#),$puts(kTrans,3B))
$if($stricmp(%KEY%,Db),$puts(kTrans,3B))
$if($stricmp(%KEY%,G#),$puts(kTrans,4B))
$if($stricmp(%KEY%,Ab),$puts(kTrans,4B))
$if($stricmp(%KEY%,D#),$puts(kTrans,5B))
$if($stricmp(%KEY%,Eb),$puts(kTrans,5B))
$if($stricmp(%KEY%,A#),$puts(kTrans,6B))
$if($stricmp(%KEY%,Bb),$puts(kTrans,6B))
$if($stricmp(%KEY%,F),$puts(kTrans,7B))
$if($stricmp(%KEY%,C),$puts(kTrans,8B))
$if($stricmp(%KEY%,G),$puts(kTrans,9B))
$if($stricmp(%KEY%,D),$puts(kTrans,10B))
$if($stricmp(%KEY%,A),$puts(kTrans,11B))
$if($stricmp(%KEY%,E),$puts(kTrans,12B))
$if($get(kTrans),,$puts(kTrans,%key%))
$get(kTrans)

Key translation only (DUI)
Code: [Select]
$if($stricmp(%KEY%,G#m),$puts(kTrans,1A))$if($stricmp(%KEY%,Abm),$puts(kTrans,1A))$if($stricmp(%KEY%,D#m),$puts(kTrans,2A))$if($stricmp(%KEY%,Ebm),$puts(kTrans,2A))$if($stricmp(%KEY%,A#m),$puts(kTrans,3A))$if($stricmp(%KEY%,Bbm),$puts(kTrans,3A))$if($stricmp(%KEY%,Fm),$puts(kTrans,4A))$if($stricmp(%KEY%,Cm),$puts(kTrans,5A))$if($stricmp(%KEY%,Gm),$puts(kTrans,6A))$if($stricmp(%KEY%,Dm),$puts(kTrans,7A))$if($stricmp(%KEY%,Am),$puts(kTrans,8A))$if($stricmp(%KEY%,Em),$puts(kTrans,9A))$if($stricmp(%KEY%,Bm),$puts(kTrans,10A))$if($stricmp(%KEY%,F#m),$puts(kTrans,11A))$if($stricmp(%KEY%,Gbm),$puts(kTrans,11A))$if($stricmp(%KEY%,C#m),$puts(kTrans,12A))$if($stricmp(%KEY%,Dbm),$puts(kTrans,12A))$if($stricmp(%KEY%,B),$puts(kTrans,1B))$if($stricmp(%KEY%,F#),$puts(kTrans,2B))$if($stricmp(%KEY%,Gb),$puts(kTrans,2B))$if($stricmp(%KEY%,C#),$puts(kTrans,3B))$if($stricmp(%KEY%,Db),$puts(kTrans,3B))$if($stricmp(%KEY%,G#),$puts(kTrans,4B))$if($stricmp(%KEY%,Ab),$puts(kTrans,4B))$if($stricmp(%KEY%,D#),$puts(kTrans,5B))$if($stricmp(%KEY%,Eb),$puts(kTrans,5B))$if($stricmp(%KEY%,A#),$puts(kTrans,6B))$if($stricmp(%KEY%,Bb),$puts(kTrans,6B))$if($stricmp(%KEY%,F),$puts(kTrans,7B))$if($stricmp(%KEY%,C),$puts(kTrans,8B))$if($stricmp(%KEY%,G),$puts(kTrans,9B))$if($stricmp(%KEY%,D),$puts(kTrans,10B))$if($stricmp(%KEY%,A),$puts(kTrans,11B))$if($stricmp(%KEY%,E),$puts(kTrans,12B))$if($get(kTrans),,$puts(kTrans,%key%))$get(kTrans)

Should look like the image koshingg provided:
Spoiler (click to show/hide)

Btw @Koshingg , why does that masstagger script provide both an initial key and a key tag when you already have a key tag? (in fact it gets cleared and replaced with ?)
Spoiler (click to show/hide)
I like that it works with multiple formats though
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-16 15:31:48
You found a better solution, thanks for those scripts for CUI :)

''Btw @Koshingg , why does that masstagger script provide both an initial key and a key tag when you already have a key tag? (in fact it gets cleared and replaced with ?)  ''
It's great that you found that error. Here is the new version without that error (and with Initial Key) tag : http://sendanywhe.re/T5I5KNLW Ok, now I'll explain why the script provides an Initial key tag too, haha . Actually is a hidden bonus, for those that maybe use this plugin https://getmusicbee.com/forum/index.php?topic=24631.0 for Musicbee, that tag is needed for that plugin to work. I used MusicBee a few years ago, for one year, I still have that configuration so I thought : hmmm, let's add this tag too, who knows what might happen in the future, hahaha, what if foobar goes x64 and many components will not work ? :)
Anyway, the final version of the script, it adds only camelot notation in Key tag (Initial key tag it's not present anymore): http://sendanywhe.re/6452ULMS (you've probably corrected that mistake already, haha, but maybe someone else will find it useful)


Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-20 09:30:52
You found a better solution, thanks for those scripts for CUI :)

''Btw @Koshingg , why does that masstagger script provide both an initial key and a key tag when you already have a key tag? (in fact it gets cleared and replaced with ?)  ''
It's great that you found that error. Here is the new version without that error (and with Initial Key) tag : http://sendanywhe.re/T5I5KNLW Ok, now I'll explain why the script provides an Initial key tag too, haha . Actually is a hidden bonus, for those that maybe use this plugin https://getmusicbee.com/forum/index.php?topic=24631.0 for Musicbee, that tag is needed for that plugin to work. I used MusicBee a few years ago, for one year, I still have that configuration so I thought : hmmm, let's add this tag too, who knows what might happen in the future, hahaha, what if foobar goes x64 and many components will not work ? :)
Anyway, the final version of the script, it adds only camelot notation in Key tag (Initial key tag it's not present anymore): http://sendanywhe.re/6452ULMS (you've probably corrected that mistake already, haha, but maybe someone else will find it useful)



Didn't know that plugin. Seeing what it does, it's pretty similar (but limited to a subset of tags and features). Musicbee is a great program btw and has many built-in features that foobar misses (or only found on plugins).

You can pretty much replicate its behavior by setting style, date and other tag weights not used to zero. Key weight can be set to zero (so it doesn't look for similar keys), and enabling harmonic mixing on search by distance buttons (properties or custom one). Thus it will only use BPM, genre, energy (you can set it as a custom tag) and keys (only for harmonic mixing). The method may be set to graph to allow a more variate list of related genres, instead of using simple matching.

Only thing left is rating, but you can use global forced query to discard 1 or 2 rated tracks. (that's the default query in fact). I'm not sure rating should be added in any other way... since it would clearly favor high rated tracks instead of using all above the limits set.

Finally, those settings can be saved as a preset (recipe) to easily switch functionality when needed. I will add that recipe in next release. Feel free to suggest other mixes ideas, I perfectly know the "main weakness" of these scripts is their complexity (also its strength since they can  be fine tuned to do anything), so more examples and recipes will be welcomed by many.

Will check the masstagger scripts again, thanks :)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-20 10:16:48
Just updated the custom buttons to show the current value on the menus (no need to click on them or open properties).
It also shows the value if set(forced) by the recipe. Also added a submenu for the weights and ranges (not available previously).
Replace file 'buttons_sbd_menu_config.js' at 'helpers' with the one provided to update.

X

Also added the mentioned recipe 'LikeADJ (MusicBee).json'. Install it on 'presets\Search by\recipes\' so it gets automatically shown on the recipe list within foobar.

All this will be added to the repository when I update it.

EDIT: Btw if you know what 'Energy' is I would appreciate it. Mixed in Key offers that tag, but I don't have the software. As far as I have seen it relates to danceability. So chill is 0. Since I strongly prefer open source solutions, musicBrainz offers some high level data similar to that.
https://essentia.upf.edu/svm_models/accuracies_v2.1_beta1.html
In particular danceability and moods (relaxed/party)

And low level data:
https://essentia.upf.edu/reference/streaming_Danceability.html
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-20 17:10:22
Well, it seems they're 2 different things :
Danceability: Describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity.
Energy: Represents a perceptual measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy. High-Energy tracks have increased entropy, and tend to feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale.
Mixed in Key adds the value for Energy from 1 to 10 (AFAIK it's the only software to do that, maybe that has changed lately, I didn't checked in the last 1-2 years) ,But some people add that value manually, values are added from 1-5.

I have these errors for Search by distance and Playlist Manager (even using the dev build for SMP, WINDOWS 10, latest stable version of foobar)
Error: Spider Monkey Panel v1.5.2-dev+327ba5dc ({311F3B08-764E-4315-8AB1-BF3F99B97668})
include failed:
Path does not point to a valid file: helpers\buttons_xxx.js

File: <main>
Line: 35, Column: 2
Stack trace:
  @:35:2

Error: Spider Monkey Panel v1.5.1 (Playlist Manager: Playlist Manager v0.2 by XXX)
include failed:
Path does not point to a valid file: helpers\helpers_xxx.js

File: <main>
Line: 27, Column: 1
Stack trace:
  @:27:1

Error: Spider Monkey Panel v1.5.2-dev+327ba5dc (Playlist Manager: Playlist Manager v0.2 by XXX)
include failed:
Path does not point to a valid file: helpers\helpers_xxx.js

File: <main>
Line: 27, Column: 1
Stack trace:
  @:27:1

Should I report this to SMP thread? Probably I should since I have another error from this component caused by other scripts (Biography , Library Tree)

Also, it seems I can't remap the key tag. I made a gif for you, http://sendanywhe.re/SBJKBHJ5 maybe you see where the problem is.
I tried to remap the key tag with : INITIALKEY or INITIAL KEY, but it doesn't work

"Feel free to suggest other mixes ideas"
Ok, I will, maybe not necessary ideas about mixes , but just a few ideas about various things
Nice to see that recipe 'LikeADJ (MusicBee) in Foobar too, haha.

Hmm, I remembered something.....
There is a way to get Energy tag (and other tags) but you have to do it manually
You need Spotify (free account, so you don't have to pay anything). Unfortunately we don't have this https://getmusicbee.com/addons/plugins/306/musicbeesynctoservice/  (Maybe someone can do it, I know there is a Spotify plugin for Foobar, but it's only for Premium users, and I don't think it can synchronize playlists ,from foobar to Spotify and from Spotify to Foobar.) But we can use this https://www.tunemymusic.com/#step1 (you can export a foobar playlist and then you can import that playlist in Spotify.
Then we can import that playlist from Spotify , here http://organizeyourmusic.playlistmachinery.com/#
Now, in Foobar (in that playlist that we have exported), we can add values (manually) to these tags :
Year
Genre
BPM
Energy
Danceability
Loudness (dB)
Liveness
Valence
Acousticness
Speechiness
Popularity
Maybe there is a possibility to do it automatically ? Manually it's obviously not ideal, maybe for a few playlists ...

Some links, maybe they're useful:
https://www.rcharlie.com/spotifyr/
https://www.kaylinpavlik.com/classifying-songs-genres/
https://towardsdatascience.com/what-makes-a-song-likeable-dbfdb7abe404
https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-audio-features
http://www.playlistmachinery.com

Btw, if you didn't downloaded those scripts for masstagger because the links have expired, you can download both of them from here http://sendanywhe.re/APATMI1Y



Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-21 09:23:42
That's the relative path bug... already reported at SMP. I can't do anything but revert the change to absolute paths until @TheQwertiest gives us an answer.

Quote
Danceability: Describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity.
Energy: Represents a perceptual measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy. High-Energy tracks have increased entropy, and tend to feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale.
Mixed in Key adds the value for Energy from 1 to 10 (AFAIK it's the only software to do that, maybe that has changed lately, I didn't checked in the last 1-2 years) ,But some people add that value manually, values are added from 1-5.
On the other hand, they can be perfectly similar without knowing how energy it 's really calculated hahahaha I mean, even if the descriptions are "different", I would think both variables match for the examples you gave. In fact the one at essentia is also a scale.
https://essentia.upf.edu/reference/std_Danceability.html

In fact according to their patent they may be equivalent:
https://patents.justia.com/patent/8865993

If you are interested on test it, I could give you a set of samples tagged with Danceability values to analyze them in mixed in key. If there is correlation, I could support both as equivalent variables. (in its own variable, instead of using the custom one for the user)

Quote
Also, it seems I can't remap the key tag. I made a gif for you, http://sendanywhe.re/SBJKBHJ5 maybe you see where the problem is.
I tried to remap the key tag with : INITIALKEY or INITIAL KEY, but it doesn't work
Oh! You are mixing scripts hahahaha Ok... this script is the left one. What you configure there obviously only works there!
You are talking about Playlist Tools (so you would have to write that at its thread). Key tag is hard-coded there yep, forgot to change that. In fact, in no way (even it they were the same script) it could work as you did... 2 panels can not share their config and they should not! (it could be done but I see no reason to do that, since it's up to you how you want to config different panels). Also note they are 2 different things with different aims. Using harmonic mixing with Playlist Tools just remixes the current playlist. Search by Distance creates a new playlist using a complex algorithm exactly like the links you provided.

I thought you were using the custom search by distance buttons to create playlists by similarity, obviously, and there it works (it also has an harmonic mix method).

Also a question, why are you adding those buttons in 3 panels? you can merge them in one (see tooltip at background).
And... why don't you add the bar to the top? If you rigth click on the top bar you can add a SMP panel as a toolbar ;)

Note that I created a framework to have a buttons bar, but that doesn't mean that a config set at a button applies to the other buttons. This is by design, you must configure each tool separately (even if they are in the same panel). Being in different panels applies the same.

Spoiler (click to show/hide)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-21 09:28:53
Now, in Foobar (in that playlist that we have exported), we can add values (manually) to these tags :
Year
Genre
BPM
Energy  -> previous comment
Danceability -> previous comment
Loudness (dB) -> replay gain does that (see my UI scripts at presets)
Liveness
Valence -> these are moods, picard (essentia) gives them
Acousticness -> with a % picard (essentia) gives it too. BUT I find it better to simply look for an Acoustic tag/mood. Not a percentage. This is already done on Search by Distance.
Speechiness -> with a % picard (essentia) gives it too. BUT I find it better to simply look for an Instrumental tag/mood. Not a percentage. This is already done on Search by Distance with an additional logic to scatter instrumental tracks.
Popularity -> last fm popularity?
Maybe there is a possibility to do it automatically ? Manually it's obviously not ideal, maybe for a few playlists ...

In any case, you can add those tags to the custom tag. BUT I have to think about adding more, since some of them are more valuable in Spotify than here. Spotify suggests new -meant to be popular- songs, this plugin creates a playlist by similarity. I'm not gonna suggest a song everybody should like according to a predefined variable (that's precisely what I dislike about online players hahahaha), but only suggest songs similar to the ones you selected. In that sense a "popularity" variable is useless to me, although I know many people love playing the most popular songs according to a chart.... there is Find & Play by @WilB  for that.

I could add more low level data though, but I already think most users are not even using 30% of the capabilities of this script... lets not talk about adding more! (this doesn't equal to a "No", but it's not a priority since probably I will be the only one using it)

AcousticBrainz Tags
Quote
Tag files with tags from the AcousticBrainz database, all highlevel classifiers and tonal/rhythm data.

By default, only simple mood and genre information is saved, but the plugin can be configured to include all highlevel data.
AcousticBrainz Tonal-Rhythm
Quote
Add's the following tags:

    Key (in ID3v2.3 format)
    Beats Per Minute (BPM)

from the AcousticBrainz database.
https://picard.musicbrainz.org/plugins/

EDIT:
https://towardsdatascience.com/what-makes-a-song-likeable-dbfdb7abe404
For example that link you gave me exactly represents what I dislike about using data to predict what we like or how to "create a hit". It's like saying we like X because we listen to X thus we should create more tracks like X since we love X. Therefore, we continue listening to X and liking X. And so on... works, but makes zero sense to me. That's about music as a product, not about relations between different tracks, genres, etc. It's even more stupid when you think... hey if you wanted to tell me to do X because we love X, you didn't need at all to study the tracks with such detail. Just tell me to replicate the current 40 top charts and done.

Something similar happens with 'Similar artists' thing which works for occidental music but nothing more. And it only outputs the "most popular" artists because it's heavily based on popularity and user listening habits. I really dislike such biased approaches to music.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-21 10:15:37
http://www.playlistmachinery.com/
You can do that with pools at playlist tools. And even use playlists as sources (see playlist manager integration). And that's why I say most people are not using even 30% of what I did hahahaha You have macros, pools and dynamic queries (evaluated with selection) at Playlist Tools, that should cover any imaginable thing you want to do to create your own mixes.

https://www.kaylinpavlik.com/classifying-songs-genres/
That's already done at Music Brainz, using machine learning and those features. Genre classification only has a 50-60% precision anyway. But it's there if you want it. No need to reinvent the wheel, and it's open source.

https://www.rcharlie.com/spotifyr/
That's something which may be useful for the spotify plugin, you could suggest it there.

EDIT: About the key thing at Playlist Tools
https://hydrogenaud.io/index.php?topic=120978.msg1000973#msg1000973
Title: Re: Search-by-Distance-SMP
Post by: jazzthieve on 2021-07-21 17:05:50
Just a small correction, you say Valence attribute is the same as moods which isn't fully correct. Based on Robert Thayer's mood classification model (Spotify uses this model, among others) mood classification is a combination of Valence in relation to Energy. Valence by itself doesn't say that much. High Valence with high energy means a very upbeat happy song while the same energy with low valence is a high stress/agressive song. Low Energy with low Valence is a sad song while a high valence and low energy song is a relaxing mood.
High valence by itself could both mean very upbeat and happy or just relaxing (and everything in between).

https://sites.tufts.edu/eeseniordesignhandbook/2015/music-mood-classification/

I manually tag my library using this model. I always use both attributes (Valance, Energy) on the same scale. The numbers I tag are coordinates plotted on an X-Y graph and depending on where the position of the coordinates fall I derive meaning from them ("moods", but it's a bit more abstract).
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-21 17:42:20
Well I didn't mean they are strictly the same (low level data), obviously, but I consider them a replacement (high level data). Specially since I was talking about usable open source data (since Spotify's data is not that).
Essentia cites a lot of research on that sense: https://essentia.upf.edu/research_papers.html

In fact none of the Essentiadata is strictly the same. Danceability in Spotify uses different scales and model than the one at Essentia. But I assume they are equivalent as long as you know in which model you are working and what you do with it.

Quote
I manually tag my library using this model. I always use both attributes (Valance, Energy) on the same scale. The numbers I tag are coordinates plotted on an X-Y graph and depending on where the position of the coordinates fall I derive meaning from them ("moods", but it's a bit more abstract).
How do you tag them manually?
Title: Re: Search-by-Distance-SMP
Post by: jazzthieve on 2021-07-22 06:48:45
it's rather simple, I use a masstagger script to tag and split (multivalue) series of numbers (usually 2 but can be up to 6 numbers). I bind that script to keyboard shortcuts (alt+numpad). The first number input is the X axis coordinate (Valence), the second number is the Y-axis coordinate (Energy). The scale goes from 1 to 7 (both axis). I created a map to visualize it for myself. On my config I have a panel that shows me this:
(https://i.ibb.co/wgsHDr9/Thayer.jpg)

It gives me essentially 4 quadrants of "mood" variations. Left upper is high energy, low valence = unsettling, aggression (I colored this red). Right upper is high valence, high energy =upbeat and happy (yellow color). Left lower is somber, sad melancholy (blue color). Right lower high valence but low energy= generally relaxing.

Combinations are possible (max 3 sets of coordinates). I also have a masstagger script which translates the numbers into a normal mood tag. For now I just say either aggression, upbeat, relaxing, sad depending on in which quadrant the coordinate falls but in essence if I were to assign each separate coordinate a certain mood name I'd have 36 separate combinations. But I don't need to name them, I basically just look at the coordinates and immediately know how the song will feel. Example

3;6 : agressive but not extreme (heavy metal music for example)
1;7: very aggressive, very extreme (brutal death metal)
7;6 very upbeat and energetic (like the intro song from the movie La LA land)
6;2: positive sounding and relaxing (soft upbeat but relaxing reggae music)
1;2: basically a song that will make you cry

All is done with titleformatting because I know shit about coding. There are other aspects I include with this mood model but I'll stick to just explaining this. I too developed a method to easily create selections which groups songs based on genre, mood, song complexity, and era by just using "quicksearch for same". It's done in a more manual fashion and without sourcing data from the internet but it works for me  (and it's highly accurate). But I do admire what you're doing.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-22 09:00:54
That looks interesting although it's a nightmare to tag an entire library manually if you start from scratch! I have done that for genre/styles instead of using online tags, since they are mostly a joke. The graph is the natural representation of a proper genre map as a result . I used MusicBrainz for mood tagging since it has an accuracy over 90%, so it's fine for me. Then I manually re-tag any obviously wrong track on playback from time to time.

You can use your method with these scripts too (don't think they require at all internet sourced tags) as long as you have genre/style tags. You can even use those numeric tags as the custom num tag, so it works with your tagging method. (or using the mood tag if you translate your values into moods with masstagger first)

I know 'the quicksearch for same 'component. An improvement over that is that this one doesn't use queries, but assigns an score similarity. Queries are too restrictive (although they work) because tracks are either in or out of your group. An scoring allows you to fine-tune the degree of similarity. Then there are a dozen of other features which can be used to create the playlist, while the query approach just outputs all matches.

Btw at Playlist Tools you have tools which use queries too. In fact, probably you would be more interested on them. There are dynamic queries (its 100% equal to Quicksearch for same functionality but allows more advanced queries like multitags, multiple expressions, etc.). and queries combinatory. Let's say you want any track which must match at least 3 of these: Sad, Acoustic, Rock, Instrumental, key Abm:. Doing that manually is not feasible (a combination of queries takes easily 10 lines as soon as you have +3 elements) and it's out of scope for quicksearch component. You have it in the Playlist Tools button an also as an independent configurable button.

X

Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-22 09:51:49
Have simplified the code of the masstagger key presets since they had another problem, they removed already existing tags (since it used some of them as intermediate values). Now they give only one tag per script (a new one or a replacement) and don't remove any other.

There are 3 versions now:
- Standard notation to Camelot notation. key (*) -> %KEY%
- Standard notation to Camelot notation. key (*) -> %INITIAL KEY%  (recreates new tag, like Mixed in Key)
- Camelot notation to Standard notation. key (*) -> %KEY%  (the reverse of the previous ones)

(*) key at left will use any of these as sources: %INITIAL KEY%, %INITIALKEY%, %KEY_START%, %KEY%, %KEY_CAMELOT%, %KEY_OPENKEY%

In any case, the other tags are not touched at all and will be left as is. Also note these presets are NOT NEEDED at all for the SMP scripts since the translation is done automatically on the code. Neither to show the translated values at UI (https://hydrogenaud.io/index.php?topic=120982.msg1000798#msg1000798).  Just sharing them for other uses. They will be present on the repository at '.\presets' folder.

PD: Back to this SMP script, I will add open key support on next releases too, translating internally that notation to camelot keys. Obviously it will be ported to Playlist Tools too for harmonic mixing. Finally, I will add 4 more masstagger presets to translate standard keys and camelot keys to open keys and back. And edit the UI presets to also support open key notation.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-22 12:00:59
"Oh! You are mixing scripts hahahaha "
haha, yes, somehow I managed to do that. But at least the little problem is solved now, the tag key it's not hard-coded anymore , in Playlist Tools

''Also a question, why are you adding those buttons in 3 panels? you can merge them in one (see tooltip at background).
And... why don't you add the bar to the top? If you rigth click on the top bar you can add a SMP panel as a toolbar''

That wasn't my main foobar configuration, it's just a portable foobar for testing. I have the scripts in my main foobar config. too and I was thinking to add a new tab (because it's not ideal how they are placed now) with your scripts, and a few other things for manual tagging, all in one place

 "I could give you a set of samples tagged with Danceability values to analyze them in mixed in key''
regor , I don't have mixed in key

"For example that link you gave me exactly represents what I dislike about using data to predict what we like or how to "create a hit....hey if you wanted to tell me to do X because we love X, you didn't need at all to study the tracks with such detail. Just tell me to replicate the current 40 top charts and done"

haha, I agree with you, I just sent those links in the eventuality that maybe you'll find something interesting

"AcousticBrainz Tonal-Rhythm"
Thanks about the tip , I already had that plugin BUT I didn't noticed those settings (about highlevel tags)

"most people are not using even 30% of what I did hahahaha You have macros, pools and dynamic queries''

I think you're right, I didn't used macros and pools until now, but I will , I also added a few dynamic queries. But it's very very good that options do exist, people have different needs .  I'll use much more than 30% :)

For those interested to add ENERGY, DANCEABILITY, ACOUSTICNESS, INSTRUMENTALNESS, LIVENESS, SPEECHINESS, VALENCE and AUDIO_FEATURES ( for ex. #dynamics-med; #energy-high; #vocal-high; #neutral), there is another option ( Picard can do this too, and a bit more, as regor said) : https://onetagger.github.io/#download
I'm not saying it's better than Picard but strictly for adding these tags it seems it does a better job, it's faster.

regor, I didn't said you should or you shouldn't add more low level data (as you said the scripts are already complex), just that it's fun to have more data in your tags, haha. Those tags can be used with dynamic queries (Playlist tools), or for example a very simple use, just sort a playlist after Danceability (or other tag) , from the highest value to the lowest. Obviously they're not 100% accurate (the same happens for Key, or BPM)




Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-22 12:32:19
regor, I didn't said you should or you shouldn't add more low level data (as you said the scripts are already complex), just that it's fun to have more data in your tags, haha. Those tags can be used with dynamic queries (Playlist tools), or for example a very simple use, just sort a playlist after Danceability (or other tag) , from the highest value to the lowest. Obviously they're not 100% accurate (the same happens for Key, or BPM)
Glad it's solved. I will upload the latest changes to the repositories, although most people seem to have problems due to the SMP bug so...

As you noted, you can use any arbitrary tag on Playlist Tools for queries, whether you use dynamic queries, standard queries, sorting or Search same by. And save those entries for later use. My concerns are about adding them at this particular script since it must comply with some open source data standard, and those tags must be easily retrievable by other users. That's why I have limited the subset of 'exotic' tags to BPM, KEY, MOODS which can be retrieved by picard, but also by Bio script, multiple DJ software, etc.

Arbitrary tags may be added to the 2 custom fields by anyone. Also multiple tags may be merged into one slot. So if you want to use those arbitrary tags as 'moods' you can simply set Moods -> Moods,Valence,Danceability. It works the same, no need to create an additional slot. Only consideration: string slots must use string tags. Numeric slots must use numeric tags.

Now, the last program you linked finally appears to be a real alternative/complement to Picard and AcousticBrainz data.... so I will study its use, how tags are being added, etc. and If I found it in line with the rest, I would gladly implement those other tags. Have to check if it needs Spotify installed, since I would need to bypass that limitation because I don't have an account.

On the other hand, those are 'intermediate' level data because they are neither final tags (Acoustic, Instrumental, ...) nor low level data so some considerations must apply here. Otherwise I would be duplicating work and results: if you already use Acoustic as a genre tag and/or moods (picard), it makes no sense to also check for Acousticness since both give you the same info. It would make tracks with the 3 tags being more similar than they are, since I would be adding a score to the 3 features. In other words, it would require either the user having to choose between 2 models (AcousticBrainz vs Spotify) or discarding some features if others are present (and that's really complicated). (*)

(*) I would have to check for things like if a track is using Instrumental genre/mood tag, then Instrumentalness = 100%. But only one of them should be scored. And finally another track may have Instrumentalness but not the other tags, so I would have to compare the previous virtual tag to it... and it easily becomes a mess.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-22 17:58:50
I forgot to add that there is a difference about the way the data is added in those tags. One Tagger uses the Spotify model (which I think it's much much easier for the normal Foobar users, and I assume it's easier for you, in SMP, if you ever decide to use those tags). Picard's model I think it's more difficult (better said it's almost useless) for normal users because it's harder to use those values from tags.
For example , for Danceability :
in Picard , we have 2 tags, with these values
AB:HI:DANCEABILITY:DANCEABLE                   0.973414301872
AB:HI:DANCEABILITY:NOT DANCEABLE          0.0265856720507

In One Tagger, only one tag, easier:
1T_DANCEABILITY                        78

I noticed an interesting tag in Picard (gender tag), it's not offered by One Tagger :

AB:HI:GENDER:FEMALE             0.972042262554
AB:HI:GENDER:MALE                 0.0279577393085
This is a song by Janet Jackson.
Is it possible to add a gender filter ( for CUI filters , Album list panel, Library tree SMP, or other option) , using the data from those 2 tags?
If it is possible I could use Picard for this.
Another thing, I noticed that One tagger finds results for more songs, maybe it's possible that Spotify's data base is larger (or maybe it only happened to me).
Btw, if Spotify is not available in your country, and you need it to use One tagger (client id and client secret)I guess I can make an account for you and give you those dates.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-22 18:16:11
I forgot to add that there is a difference about the way the data is added in those tags. One Tagger uses the Spotify model (which I think it's much much easier for the normal Foobar users, and I assume it's easier for you, in SMP, if you ever decide to use those tags). Picard's model I think it's more difficult (better said it's almost useless) for normal users because it's harder to use those values from tags.
For example , for Danceability :
in Picard , we have 2 tags, with these values
AB:HI:DANCEABILITY:DANCEABLE                   0.973414301872
AB:HI:DANCEABILITY:NOT DANCEABLE          0.0265856720507

In One Tagger, only one tag, easier:
1T_DANCEABILITY                        78

I noticed an interesting tag in Picard (gender tag), it's not offered by One Tagger :

AB:HI:GENDER:FEMALE             0.972042262554
AB:HI:GENDER:MALE                 0.0279577393085
This is a song by Janet Jackson.
Is it possible to add a gender filter ( for CUI filters , Album list panel, Library tree SMP, or other option) , using the data from those 2 tags?
If it is possible I could use Picard for this.
Another thing, I noticed that One tagger finds results for more songs, maybe it's possible that Spotify's data base is larger (or maybe it only happened to me).
Btw, if Spotify is not available in your country, and you need it to use One tagger (client id and client secret)I guess I can make an account for you and give you those dates.
Picard gives that data, but you are not supposed to use it as you did. I.e. it gives:
Code: [Select]
variable A: {
       value: Y,
       X: 40%,
       Y: 60%,
}
You may extract X and Y as you did, or just extract the bigger one, which is considered the actual "tag" (value). Spotify just gives you the percentage, but not the tag. i.e. it gives a number, but you have to convert that into actual tag values (danceable, not danceable). You simply have to configure it right. This is an example of the data that can be extracted (note some low level data and high level data have same name but are different things!)
https://acousticbrainz.org/373d355f-faae-4851-9022-11bcc4144ed3

Use cases are different. I see totally useless a percentage on queries ;) but obviously in SMP it can make sense. So in fact I disagree and I find more useful to have tag names (acoustic, danceable, party) than numbers on foobar2000, while it may be the opposite for a similarity scoring method.

About it finding more songs... yes and no. Let me remind you Spotify is closed source data. If I don't find a CD on picard I can submit it, there is a plugin which even copies the actual info from tracks and opens the web in your browser with that data. It takes 15 seconds to add a release. Then I can run their analysis tool on my PC and submit the data. Some time later if I reload the same album at picard it will be recognized and the data (mood, key, bpm, etc.) will be there ready to be saved on my files. Good luck doing that with Spotify hahahaha

I mean, they are different tools from different frame-minds. You can not add any data to One Tagger, you can only use what's there. If some release is missing you are out of luck, while the open source approach lets you collaborate and add those pieces. Obviously Spotify is the winner if we talk about which one has the bigger database... but not necessarily the one which satisfies everyone needs. One Tagger is also using discogs to tag releases, which is clearly out of scope for Piccard (and I agree it's a bigger database too).

In any case I'm not suggesting to use Picard for standard tagging (I use discogs) but only for Mood, BPM, key, etc. Composers are also a plus. And there you have too instruments, relationships,etc.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-22 18:41:19
Well first discogs requires an account, the rest of the servers are mant for DJs (electronic music). So it's not as pretty as it seemed.
The audio features requires an spotify account as suspected.
Tried with a rolling stones album (12x5) with no luck hahaha
It also doesn't use any fingerprinting, so it looks for tags only if you filled some of the basic ones (or by filename). While picard recognizes audio even if it has zero tags.
Drag n drop is broken, it uses an electron interface and tries to reproduce the files instead of using them to find tags! You can drag n drop folders into picard without problems. Tag saving is not done automatically, you can discard/accept changes, here it's done without notice.
etc.
Picard gives you different releases to choose from. Discogs would allow you to do that, but the way it's implement limits that option since it's done all automatically.

Can not check the spotify audio features without an account, so at least the only part that would be really useful is out of my reach. Sorry for being so critic, but as a standard tagger it really sucks hahahaha (greatly prefer mp3tag+discogs, or picard or foobar+discogs) I will try to create an spotify account to test it more.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-22 19:32:29
I think this gif shows most of the problems I mentioned:
Spoiler (click to show/hide)

But will try the Spotify thing since that was the main point anyway.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-07-22 22:30:16
It's my fault , I should have warned you, haha. But now you understand why I didn't mentioned not even a single word about One Tagger's capabilities as a standard tagger, because it can't compete with Picard or other programs. It's meant to be used mostly by Dj
It's still a new software, it appeared 2 or 3 months ago, so we can't really compare anything. It will never be like Picard, MP3tag, or others, just a simple , maybe faster solution for some that don't need many features.
What I liked (I didn't even tested anything else) was only one thing, the Spotify implementation (which I think it's missing from other programs, no?),  it's also free . Obviously I would be glad if Spotify implementation appears in other programs, then I will not use One Tagger at all, haha . There is room for everybody, I also use Mp3tag, Picard, or Jaikoz Tagger

"Sorry for being so critic''
No problem, it's not my software :) As you said, they're different tools, even though they're both taggers, haha, they have a different vision and use

Hmm, I didn't quite understood you here ,about my question with the gender tag, sorry :
''You may extract X and Y as you did, or just extract the bigger one, which is considered the actual "tag" (value). Spotify just gives you the percentage, but not the tag. i.e. it gives a number, but you have to convert that into actual tag values (danceable, not danceable). You simply have to configure it right. ''

How can I get the actual "tag" (value)? I don't want a number in Gender tag, I want Male or Female. There's a setting in Picard? (I didn't find it) Or is something more complicated?




Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-23 08:41:11
Its supposed that you may configure the plugin in such a way that you simply get the tag value (male) instead of numbers for both values. When I created a plugin for picard I did it that way (and that's what I use), have not tested it since then with that new plugin which extracts all data. I will take a look at it and report, since there must be a way. Either in the program or editing the plugin, if it's the latter I will upload my own fork of it.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-07-24 20:59:36
Have updated the repository with the new menus to remap all missing tags, set weights, etc. This:
https://hydrogenaud.io/index.php?topic=120982.msg1000945#msg1000945
Also added the presets (masstagger) and a great optimization on speed for harmonic mixing.

If anyone want to test it, download the files directly from the repository not the releases. Please have in mind the relative path bug on SMP has not been solved yet, so I have no idea if it will work for you!
(it's recommended to also download the latest files from the rest of my scripts in that case, since I have changed all with major changes)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-08-04 10:15:06
I forgot to add that there is a difference about the way the data is added in those tags. One Tagger uses the Spotify model (which I think it's much much easier for the normal Foobar users, and I assume it's easier for you, in SMP, if you ever decide to use those tags). Picard's model I think it's more difficult (better said it's almost useless) for normal users because it's harder to use those values from tags.
For example , for Danceability :
in Picard , we have 2 tags, with these values
AB:HI:DANCEABILITY:DANCEABLE                   0.973414301872
AB:HI:DANCEABILITY:NOT DANCEABLE          0.0265856720507

In One Tagger, only one tag, easier:
1T_DANCEABILITY                        78

I noticed an interesting tag in Picard (gender tag), it's not offered by One Tagger :

AB:HI:GENDER:FEMALE             0.972042262554
AB:HI:GENDER:MALE                 0.0279577393085
This is a song by Janet Jackson.
Is it possible to add a gender filter ( for CUI filters , Album list panel, Library tree SMP, or other option) , using the data from those 2 tags?
If it is possible I could use Picard for this.
Another thing, I noticed that One tagger finds results for more songs, maybe it's possible that Spotify's data base is larger (or maybe it only happened to me).
Btw, if Spotify is not available in your country, and you need it to use One tagger (client id and client secret)I guess I can make an account for you and give you those dates.
Back to the topic, the answer was scripting. Picard allows automatic scripting, so those multiple tags can be used to set only once with numbers or labels.

To get a label:
Code: [Select]
$set(timbre,‎$if($gte($substr(%ab:hi:timbre:bright%,2,3),5),Bright,Dark))
To get a number from 0 to 100:
Code: [Select]
$set(brightness,‎$substr(%ab:hi:timbre:bright%,2,4))

Note AcousticBrainz tags are complementary, i.e. ab:hi:timbre:bright and ab:hi:timbre:dark should sum 1... so only one of them is needed for scripting.

X

X

X

X

Applying the same principle to every tag, you may get full labels for all the data tags and also one number per set of tags (danceability, gender, etc.).

Finally you can remove the unwanted tags:
Code: [Select]
$unset(ab:hi:timbre:bright)
$unset(ab:hi:timbre:dark)
...

As can be seen, it's really hard to improve this workflow... since scripting allows you to do almost anything at picard (without needing to use masstagger at a later point at foobar). In conclusion, I still find better to use AcousticBrainz data since it's open source, does not require a third party api key by a closed source program (spotify), allows scripting to modify tags to your needs and offers both full tag labeling and/or raw values (numbers) to be used at a later point by other programs or scripts (foobar and SMP). Not saying I will not look at the spotify thing, but right now  I can assure this works.

Also I know regular users are "not capable" of writing such scripts for picard... but in that case they are also not capable of setting onetagger with an spotify api or setting these SMP scripts right to use those tags. In all cases it only requires a bit of time and attention...

As a solution, I will write myself the full set of picard's scripts which along the plugin should provide all the desired tags: gender, timbre, danceability, etc. with labels and/or single number (per set of tags). Only work left at user's side would be to install the required plugin, copy/paste the scripts and decide which tags they want to retrieve. I use pìcard too so makes sense to release it publicly. That should cover all problems you have with picard while also fulfilling all the requisites.

Right now I will put my efforts only in the tagging part. Those extra tags may be used -now- as custom string tags and custom num tags on Search by Distance. Also as queries in Playlist Tools. At some point I may implement them as default tags with their own logic.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-08-05 09:06:02
Got the scripts workings and managed to retrieve/create these variables:

Code: [Select]
timbre -> bright/dark
brightness -> 0-100
danceability -> 0-100 (would prefer to move this to danceness, and use this one for Danceable/not Danceable) (*)
gender -> female/male
femaleness -> 0-100
tonality -> tonal/atonal
tonaleness -> 0-100
speechiness -> 0-100
acousticness -> 0-100 (uses mood acoustic as reference)
valence -> 0-100 ((mood happy + mood not sad) / 2) (**)
chords rate -> 0-100
chords key -> ...

(*) Would break Spotify's data direct comparisons
(**) Should be equivalent to Spotify's one


Will release them as soon as a bug is solved, since working with the scripts found the acousticBrainz plugin broke some scripts:
https://tickets.metabrainz.org/projects/PICARD/issues/PICARD-2256?filter=addedrecently
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-08-05 17:56:58
With your help, things look much much better for Picard, I will use the scripts definitely.  Btw, I didn't used scripts in Picard, until a few days ago, when I added 2 scripts
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-08-06 11:27:42
Please update AcousticBrainz Tags plugin to last version (2.2). It's a requisite, has a fix for the bug I found.
Then add these 3 scripts. Edit as needed if you want to have/delete only specific tags.
Also check the order. The "remove" script should be at the bottom (see image 1).

AcousticBrainz Tags Number
Code: [Select]
$noop(Sets -number- tags from AcousticBrainz high/low level data)
$noop(Recommended to removes all high/low level data afterwards)
$noop(Requires: AcousticBrainz Tags plugin 2.2+)
$noop(Requires: All high-level and subset of low-level tags enabled at plugin config)

$noop(Timbre tags: brightness -number-)
$set(_temp,%ab:hi:timbre:bright%)
$if($eq($substr(%_temp%,2,3),0),$set(_temp,$substr(%_temp%,3,4)),$set(_temp,$substr(%_temp%,2,4)))
$set(brightness,%_temp%)

$noop(Danceability tags: danceness -number-)
$set(_temp,%ab:hi:danceability:danceable%)
$if($eq($substr(%_temp%,2,3),0),$set(_temp,$substr(%_temp%,3,4)),$set(_temp,$substr(%_temp%,2,4)))
$set(danceness,%_temp%)

$noop(Gender tags: femaleness -number-)
$set(_temp,%ab:hi:gender:female%)
$if($eq($substr(%_temp%,2,3),0),$set(_temp,$substr(%_temp%,3,4)),$set(_temp,$substr(%_temp%,2,4)))
$set(femaleness,%_temp%)

$noop(Voice/Instrumental tags: speechiness -number-)
$set(_temp,%ab:hi:voice_instrumental:voice%)
$if($eq($substr(%_temp%,2,3),0),$set(_temp,$substr(%_temp%,3,4)),$set(_temp,$substr(%_temp%,2,4)))
$set(speechiness,%_temp%)

$noop(Acousticness tags: acousticness -number-)
$set(_temp,%ab:hi:mood_acoustic:acoustic%)
$if($eq($substr(%_temp%,2,3),0),$set(_temp,$substr(%_temp%,3,4)),$set(_temp,$substr(%_temp%,2,4)))
$set(acousticness,%_temp%)

$noop(Valence tags: Valence -number-)
$set(_tempA,%ab:hi:mood_happy:happy%)
$set(_tempB,$get(ab:hi:mood_sad:not sad))
$if($eq($substr(%_tempA%,2,3),0),$set(_tempA,$substr(%_tempA%,3,4)),$set(_tempA,$substr(%_tempA%,2,4)))
$if($eq($substr(%_tempB%,2,3),0),$set(_tempB,$substr(%_tempB%,3,4)),$set(_tempB,$substr(%_tempB%,2,4)))
$set(valence,$div($add(%_tempA%,%_tempB%),2))

$noop(Tonality tags: tonaleness -number-)
$set(_temp,%ab:hi:tonal_atonal:tonal%)
$if($eq($substr(%_temp%,2,3),0),$set(_temp,$substr(%_temp%,3,4)),$set(_temp,$substr(%_temp%,2,4)))
$set(tonaleness,%_temp%)

$noop(Chords tags: chords_rate -number-)
$set(_temp,%ab:lo:tonal:chords_changes_rate%)
$if($eq($substr(%_temp%,2,3),0),$set(_temp,$substr(%_temp%,3,4)),$set(_temp,$substr(%_temp%,2,4)))
$set(chords_rate,%_temp%)

AcousticBrainz Hi Tags Labels
Code: [Select]
$noop(Sets -label- tags from AcousticBrainz high/low level data)
$noop(Recommended to removes all high/low level data afterwards)
$noop(Requires: AcousticBrainz Tags plugin 2.2+)
$noop(Requires: All high-level and subset of low-level tags enabled at plugin config)

$noop(Timbre tags: timbre -label-)
$set(timbre,$if($gte($substr(%ab:hi:timbre:bright%,2,3),5),Bright,Dark))

$noop(Danceability tags: danceability -label-)
$set(danceability,$if($gte($substr(%ab:hi:danceability:danceable%,2,3),5),Danceable,Not danceable))

$noop(Gender tags: gender -label-)
$set(gender,$if($gte($substr(%ab:hi:gender:female%,2,3),5),Female,Male))

$noop(Tonality tags: tonality -label-)
$set(tonality,$if($gte($substr(%ab:hi:tonal_atonal:tonal%,2,3),5),Tonal,Atonal))

$noop(Chords tags: chords_key -label-)
$set(chords_key,%ab:lo:tonal:chords_key%)

AcousticBrainz High_Low Tags Remove
Code: [Select]
$noop(Removes all high/low level tags retrieved by AcousticBrainz Tags plugin)
$noop(Meant to be used along other scripts which uses this data first)
$noop(Requires: AcousticBrainz Tags plugin 2.2+)

$noop(ISMIR2004 Rhythm Classification Dataset "Ballroom dataset")
$unset(ab:hi:ismir04_rhythm:chachacha)
$unset(ab:hi:ismir04_rhythm:jive)
$unset(ab:hi:ismir04_rhythm:quickstep)
$unset(ab:hi:ismir04_rhythm:rumba-american)
$unset(ab:hi:ismir04_rhythm:rumba-international)
$unset(ab:hi:ismir04_rhythm:rumba-misc)
$unset(ab:hi:ismir04_rhythm:samba)
$unset(ab:hi:ismir04_rhythm:tango)
$unset(ab:hi:ismir04_rhythm:viennesewaltz)
$unset(ab:hi:ismir04_rhythm:waltz)

$noop(MIREX Audio Mood Classification Dataset)
$unset(ab:hi:moods_mirex:aggressive\, fiery\, tense/anxious\, intense\, volatile\, visceral)
$unset(ab:hi:moods_mirex:humorous\, silly\, campy\, quirky\, whimsical\, witty\, wry)
$unset(ab:hi:moods_mirex:literate\, poignant\, wistful\, bittersweet\, autumnal\, brooding)
$unset(ab:hi:moods_mirex:rollicking\, cheerful\, fun\, sweet\, amiable/good natured)
$unset(ab:hi:moods_mirex:passionate\, rousing\, confident\, boisterous\, rowdy)

$noop(genre_dortmund)
$unset(ab:hi:genre_dortmund:alternative)
$unset(ab:hi:genre_dortmund:blues)
$unset(ab:hi:genre_dortmund:electronic)
$unset(ab:hi:genre_dortmund:folk/country)
$unset(ab:hi:genre_dortmund:funk/soul/rnb)
$unset(ab:hi:genre_dortmund:jazz)
$unset(ab:hi:genre_dortmund:pop)
$unset(ab:hi:genre_dortmund:rap/hiphop)
$unset(ab:hi:genre_dortmund:rock)

$noop(genre_electronic)
$unset(ab:hi:genre_electronic:ambient)
$unset(ab:hi:genre_electronic:drum and bass)
$unset(ab:hi:genre_electronic:house)
$unset(ab:hi:genre_electronic:techno)
$unset(ab:hi:genre_electronic:trance)

$noop(genre_rosamerica)
$unset(ab:hi:genre_rosamerica:classical)
$unset(ab:hi:genre_rosamerica:dance)
$unset(ab:hi:genre_rosamerica:hiphop)
$unset(ab:hi:genre_rosamerica:jazz)
$unset(ab:hi:genre_rosamerica:pop)
$unset(ab:hi:genre_rosamerica:rhythm and blues)
$unset(ab:hi:genre_rosamerica:rock)
$unset(ab:hi:genre_rosamerica:speech)

$noop(genre_tzanetakis)
$unset(ab:hi:genre_tzanetakis:blues)
$unset(ab:hi:genre_tzanetakis:classical)
$unset(ab:hi:genre_tzanetakis:country)
$unset(ab:hi:genre_tzanetakis:disco)
$unset(ab:hi:genre_tzanetakis:hiphop)
$unset(ab:hi:genre_tzanetakis:jazz)
$unset(ab:hi:genre_tzanetakis:metal)
$unset(ab:hi:genre_tzanetakis:pop)
$unset(ab:hi:genre_tzanetakis:reggae)
$unset(ab:hi:genre_tzanetakis:rock)

$noop(Moods)
$unset(ab:hi:mood_acoustic:acoustic)
$unset(ab:hi:mood_acoustic:not acoustic)
$unset(ab:hi:mood_aggressive:aggressive)
$unset(ab:hi:mood_aggressive:not aggressive)
$unset(ab:hi:mood_electronic:electronic)
$unset(ab:hi:mood_electronic:not electronic)
$unset(ab:hi:mood_happy:happy)
$unset(ab:hi:mood_happy:not happy)
$unset(ab:hi:mood_party:party)
$unset(ab:hi:mood_party:not party)
$unset(ab:hi:mood_relaxed:relaxed)
$unset(ab:hi:mood_relaxed:not relaxed)
$unset(ab:hi:mood_sad:sad)
$unset(ab:hi:mood_sad:not sad)

$noop(Timbre)
$unset(ab:hi:timbre:bright)
$unset(ab:hi:timbre:dark)

$noop(Danceability)
$unset(ab:hi:danceability:danceable)
$unset(ab:hi:danceability:not danceable)

$noop(Gender)
$unset(ab:hi:gender:female)
$unset(ab:hi:gender:male)

$noop(Tonality)
$unset(ab:hi:tonal_atonal:tonal)
$unset(ab:hi:tonal_atonal:atonal)

$noop(Instrumental/Voice)
$unset(ab:hi:voice_instrumental:voice)
$unset(ab:hi:voice_instrumental:instrumental)

$noop(Chords, BMP & Key)
$unset(ab:lo:tonal:chords_key)
$unset(ab:lo:tonal:chords_changes_rate)
$unset(ab:lo:tonal:chords_scale)
$unset(ab:lo:tonal:key_key)
$unset(ab:lo:tonal:key_scale)
$unset(ab:lo:rhythm:bpm)

The set of scripts remove all high low data tags and creates these:
Code: [Select]
timbre
brightness
danceability
danceness
gender
femaleness
tonality
tonaleness
speechiness
acousticness
valence
chords rate
chords key

Note these scripts are subject to change (already swapped danceness with danceability), so if you tag your files with it beware you may need to re-tag/re-map them at some point whenever I add those variables on my multiple SMP tools.

The pts files are just text files with the picard scripts. They may be read in any text editor or you can use notepad++ with the xml language definition (for syntax highlighting). (see image 2 & 3)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-08-06 15:09:40
Well... first fix. If the high level tags are missing for the release, now nothing is written (instead of using default -wrong- values). (*)

AcousticBrainz Hi Tags Labels
Code: [Select]
$noop(Sets -label- tags from AcousticBrainz high/low level data)
$noop(Recommended to removes all high/low level data afterwards)
$noop(Requires: AcousticBrainz Tags plugin 2.2+)
$noop(Requires: All high-level and subset of low-level tags enabled at plugin config)

$noop(Timbre tags: timbre -label-)
$set(_temp,%ab:hi:timbre:bright%)
$if(%_temp%,
$set(_temp,$if($gte($substr(%_temp%,2,3),5),Bright,Dark))
$set(timbre,%_temp%)
)

$noop(Danceability tags: danceability -label-)
$set(_temp,%ab:hi:danceability:danceable%)
$if(%_temp%,
$set(_temp,$if($gte($substr(%_temp%,2,3),5),Danceable,Not danceable))
$set(danceability,%_temp%)
)

$noop(Gender tags: gender -label-)
$set(_temp,%ab:hi:gender:female%)
$if(%_temp%,
$set(_temp,$if($gte($substr(%_temp%,2,3),5),Female,Male))
$set(gender,%_temp%)
)

$noop(Tonality tags: tonality -label-)
$set(_temp,%ab:hi:tonal_atonal:tonal%)
$if(%_temp%,
$set(_temp,$if($gte($substr(%_temp%,2,3),5),Tonal,Atonal))
$set(tonality,%_temp%)
)

$noop(Chords tags: chords_key -label-)
$set(_temp,%ab:lo:tonal:chords_key%)
$if(%_temp%,
$set(danceability,%_temp%)
)

Just replace this script, the others are fine. (and hope no one tagged their files yet!) Apart from this error, the scripts are now 100% safe and working as expected. Sorry.

For a release with all the AcousticBrainz tags -and already tagged by picard previously-, you should see something like this:
X
While one without the tags (the album has not been analyzed yet), you should see something like this (no changes): (**)
X

(*) For example a track without ab:hi:timbre:bright was set as timbre = dark, which is clearly wrong... since no tag means no -known- timbre.
(**) If you have albums on music brainz database -thus tagged with MBID's- but without acousticBrainz tags... you may analyze the files and send the results to their server. All is done automatically.
https://acousticbrainz.org/download
https://musicbrainz.org/doc/How_to_Submit_Analyses_to_AcousticBrainz
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-08-06 22:25:23
Thanks for the detailed explanation , I tested on a few files and everything seems ok. Thanks once again
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-08-07 09:47:45
Updated the repository with the Picard Scripts. No further changes (also included in last update of Playlist Tools).
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-08-14 15:59:13
Pushed a new update with some additions to the graph descriptors (genre and styles on the map). With the last batch I managed to cover my entire library (+430 different genre/styles) although there are many more on the descriptors added. That means is not probable to see many more updates on that field since essentially that covers all I know.

If using Playlist Tools (*), the menu entry named 'configuration\Search by Distance\Find genres/styles not on Graph' reports any genre/style not on the graph. Now I'm open to request to add those that may be considered relevant. Note I don't care at all about Last.FM - All music tags like "world music" or "African" which mean nothing, only real genre/styles please (Flamenco, Sadcore, Kabuki, Desert Blues, etc.). In any case user-defined styles may be added at 'music_graph_descriptors_xxx_user.js' so no one have to agree with me about what qualifies as genre/style.

People may also share that descriptor file which may be of interest to other users, or even me for future releases.

(*) I will consider adding the tools to the standard buttons from here too.

Now, considering the future development of this tool I'm thinking about adding:

- Cultural links restrictions mode: currently things like 'African' or 'Argentinian Rock' are skipped since they are not genres at all... but they may point to some specific music culture (and probably shared musical character). I may consider adding a new layer to the graph where certain styles are linked to an specific cultural group (for ex. Americana to American Music or Desert Blues to North African music) which may be used to further restrict playlist creation to things within the same cultural group. In that case it would use both the "real" genre/styles if they are linked to a group and tags that usually are skipped on the graph like 'African', etc.

- Integration with World-Map: since there is already a framework to get a database of artists and countries, it may be used (if locale tags are not found on tracks) to further refine playlists (for ex. "get me similar tracks to this song of Dylan but only from artists from Europe"). Also related to previous feature. Since it would use the database from the other script, and that one may be filled with values from Last fm and the Bio script, it would work without the need of re-tagging files.

- Themes with multiple files as reference: right now the tool uses only one track as reference. I have toyed with the idea of using an entire playlist at some point... at this point I have managed to do the first step of using a virtual file as container instead of a real track, that's what's called theme (and users may create their own based on tracks as references via buttons). The solution would be simply mixing the tags from all the files and retrieving tracks according to the entire set of tags. The alternative would be getting similar tracks for every track on the list and the mixing the results, but that would take time proportional to n which is simply not feasible for real use.

- Integrating low/high level data: alternative model to the use of moods, where things like valence, danceness, brightness, etc. are used.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-09-16 13:15:35
@regor I have this problem (I noticed a few weeks ago, but somehow it wasn't time for this, to report it) Also, not only that it crashes when I do Shift L click but when I do ctrl L click to set the recipe, as you see , there's nothing there - LikeADJ (MusicBee), and the other recipes should be there. Although when I do Ctrl L click and I choose to open the folder with recipes , the folder opens correctly , the path is correct:  scripts\SMP\xxx-scripts\presets\Search by\recipes
Console :

[14:53:02] foo_spider_monkey_panel:
Error: Spider Monkey Panel v1.5.2 (Merged Buttons bar: Merged Buttons bar by xxx)
theme is null

File: buttons_sbd_menu_theme.js
Line: 101, Column: 16
Stack trace:
  createThemeMenu/<@buttons_sbd_menu_theme.js:101:16
  createThemeMenu@buttons_sbd_menu_theme.js:99:10
  newButtons.SimilarUserSet<@buttons_search_bydistance_customizable.js:44:4
  SimpleButton/this.onClick@buttons_xxx.js:138:25
  on_mouse_lbtn_up@buttons_xxx.js:222:11

And this is that error that appears in the message :

Error: Spider Monkey Panel v1.5.2 (Merged Buttons bar: Merged Buttons bar by xxx)
theme is null

File: buttons_sbd_menu_theme.js
Line: 101, Column: 16
Stack trace:
  createThemeMenu/<@buttons_sbd_menu_theme.js:101:16
  createThemeMenu@buttons_sbd_menu_theme.js:99:10
  newButtons.SimilarUserSet<@buttons_search_bydistance_customizable.js:44:4
  SimpleButton/this.onClick@buttons_xxx.js:138:25
  on_mouse_lbtn_up@buttons_xxx.js:222:11

I tested this also in a fresh portable install, but there it seems it works, no problem, so I don't know what it might me
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-16 15:58:32
One of your presets files got corrupted (maybe you edited one of them?), that's probably the problem. Overwrite this file at helpers, try to use the menus and check the console.

Somehow I missed a safecheck at that line (present at other places), so now it should not crash if the file doesn't load properly... but that still doesn't solve your installation problem. Take a look first at the console output before re-downloading and reinstalling all presets to be sure its only a local problem and not something on my side.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-09-16 17:22:56
No crash now. I think I found the problem, this is from the console :
[19:02:14] Recipe file is not valid:.\profile\scripts\SMP\xxx-scripts\presets\Search by\recipes\LikeADJ (MusicBee).json

I didn't copied all because it's the same for all presets
It seems the path to the recipe folder is wrong, I don't know how that happened . This is what I have (I have no profile folder):

foobar2000 (2019)\scripts\SMP\xxx-scripts\presets\Search by\recipes

This is the problem, the path? If yes, where should I modify the path? I did right click on the button - Properties, but I'm not sure where to modify

Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-16 18:24:30
Yep.. that's the problem. I think that's because you are using an older foobar version, don' you? (pre 1.6)

I added relative path support to all plugins but they require > 1.6, with files being within the profile folder. Not sure I'm gonna change that since it's too complex to check for 2 different paths at all instances, but right now you may either update the portable install or create a profile folder yourself. Then copy all scripts folder into it and done (it doesn't matter at all if you left the folder "foobar2000 (2019)\scripts" too, as long as there is a "foobar2000 (2019)\profile\scripts" folder with all the files).


EDIT: let me check someting.

EDIT2: well the problem was using pre 1.6 portable installs since they don't have profile folders. Have added an additional check for it at the lines of codes I found giving problems (testing it at foobar 1.4 myself). Should be solved, can not guarantee it's bug free since I only test on >1.6 portable installs.
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-09-16 18:32:36
No, it's not a old version, I have 1.6.6.
Edit.
I know, it should have been foobar2000 (2019)\profile\scripts\SMP\xxx-scripts\presets\Search by\recipes, but it's not. It's foobar2000 (2019)\scripts\SMP\xxx-scripts\presets\Search by\recipes . I have this portable install since 2019, and somehow, this is how it remained, after every update.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-16 18:38:31
Then your installation is wrong, since you are missing the profile folder. Check my install instructions, the scripts must be at the profile folder for >1.6 portable installs. And 1.6 portable installs use a profile folder for its user data.

X

Anyway ironically the pre <1.6 fix may "fix" your problem too. But you have to fix your installation path or more problems will appear at some point (and that's why you have been noticing strange behaviors and crashes at multiple places!).

Quote
foobar2000 (2019)\profile\scripts\SMP\xxx-scripts\
Title: Re: Search-by-Distance-SMP
Post by: marc2k3 on 2021-09-16 18:55:09
fb2k v1.6+ can easily not have a profile folder from using an older version and then upgrading it in place. Only clean portable installs of v1.6+ generate a profile folder on first run.

But of course you already know everything and never need anything explained because you're a ****ing genius.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-16 19:00:56
fb2k v1.6+ can easily not have a profile folder from using an older version and then upgrading it in place. Only clean portable installs of v1.6+ generate a profile folder on first run.

But of course you already know everything and never need anything explained because you're a ****ing genius.
Wow... XD @snotlicker really do yourself a favor and stop talking to me as I already asked previously, please. It really seems you have problems managing your emotions  ::)

Btw... I was talking about the installation of the scripts not foobar. So yep, the installation is wrong since I have explicitly asked in the instructions to install into the profile folder for >1.6, whether that folder exists or not, is created by foobar installation or not is totally irrelevant.
Title: Re: Search-by-Distance-SMP
Post by: marc2k3 on 2021-09-16 19:02:44
Using fb.ProfilePath would work for every scenario without hardcoding the word profile. Fighting existing standards that are there to make everyone's life easier is not the way to go.

BTW, I'm mocking you, I'm laughing. It's not something you can attribute to being overly emotional.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-16 19:20:55
Really I'm tired of this... 3rd time I'm asking you to stop.
Using fb.ProfilePath would work for every scenario without hardcoding the word profile. Fighting existing standards that are there to make everyone's life easier is not the way to go.
Is not only being condescending which is annoying, but also thinking you know the solution to a problem without even taking a look at the code.

The current "file" path is saved at properties panel, and it allows either relative paths "./profile/scripts/" or "./scripts/" or absolute paths.

Paths are also saved according to being a portable installation or not. Putting something like fb.ProfilePath does nothing, since then what you save at the properties panel becomes a simple absolute path. And when you move your foobar installation into another PC with another disk letter (USB) then bam, your code breaks. And for sure I will not use eval() to allow even another way to input stupid things there only to evaluate fb.ProfilePath on the fly.

As solution I have taken the file helpers and replace  './' at the start with fb.FoobarPath on the fly on every call , which ironically is the RIGHT solution since any relative path must be relative to the foobar installation which is the real root. Not an arbitrary path which changes according to version number or where the user chooses to install things. This is clearly stated in the readme, and I follow the internal structure of the software. Which I don't like, because hey I found stupid not having a profile folder in all versions... but that's not my problem and life continues.

So no, please, stop telling me how to do the things I wanna do. It's fine you don't like my coding practices or me, but then go on and stop behaving like an angry bully since your behavior is becoming really ridiculous. Not gonna loose more time with you.

EDIT: And for sure... I'm not the one with a history behind me about being too emotional and having stupid discussions with other users, questionable behaviors,  deleting repositories, multiple accounts with new names, etc.  ::) Like you wanna repeat the same pattern again, but look for another user because that's not gonna happen with me. Take it easy.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-16 19:33:43
And seriously this is the end of the discussion, I don't have time for these things, neither I contribute to a forum to create hostility or have personal discussions. It has gone too far by my side too, sorry for my English as always and I apologize if I don't express myself in a right way sometimes or being "too direct", but I think there are lines that must not be crossed. Will simply ignore your replies from now on, hope you do the same.

Lets go back to the topic, @Koshingg let me know if moving the files solves the problem (works for me in 1.4 and 1.6 in portable installs as far as I have checked). Thanks
Title: Re: Search-by-Distance-SMP
Post by: Koshingg on 2021-09-16 21:14:26
@snotlicker and @regor honestly, as a foobar user , I would like to see you both get along, and cooperating in a nice manner, not like this :)

regor the problem is solved if I create that profile folder and move the scripts there, The problem is once I create that profile folder foobar starts without my theme and without user components , so I have to move also the other folders in that profile folder. This is why I avoided this move

snotlicker was right here : "fb2k v1.6+ can easily not have a profile folder from using an older version and then upgrading it in place. Only clean portable installs of v1.6+ generate a profile folder on first run.''

This is exactly my situation, I upgraded and I have no profile folder, I knew about your requirements for users that have foobar 1.6.+ BUT I didn't wanted to start moving folders and components, to create possible problems
I made a quick test and everything seems ok, if I move folders in the profile folder (obviously some things must be modified but it can be done) I'll make a backup, just in case...
This situation with this profile folder (some have it , some not) it's not ideal, for sure :)
But for me, for now, everything seems ok. I think it's better to just move the folders in that profile folder, to avoid possible problems in the future

Thanks for the help
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-16 21:44:47
Will warn about the folder update misbehavior on the readmes too, so people with >1.6 always install it right no matter if they updated from an old version or not. This is affecting other scripts which rely on relative paths for user configurable files too (like the world map's image).
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-19 14:35:21
Just pushed a new update. Please read the new installation instructions. This update is required if you also update any of my other scripts due to the UTF-8 file saving/reading changes. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.
Quote
### CHANGED
- All json files are now saved as UTF-8 without BOM. All json files are now read as UTF-8 (forced).
- Link cache is now saved in an human readable structure.
- Updated installation instructions.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-23 15:49:46
Just pushed a new update. First steps on async processing for these scripts and porting of the additional tools from Playlis Tools. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.
Quote
   ### Added
   - Cache: Checks graph links cache size on startup and warns when file size > 40 Mb. This is done to avoid memory leaks, since the file is fully loaded on memory and a corrupted file may increase the map size indefinitely until crashing the panel.
   - Buttons: Customizable button now has all additional menu entries found at Playlist Tools button: debug graph, find genre/styles not on graph, reset cache, etc. i.e. both now should offer the same degree of customization and advanced tools.
   ### Changed
   - Requisites: Script requires at minimum SMP 1.5.2. now.
   - Cache: Graph links cache is now calculated asynchronously whenever it's required (on first initialization or when manually forced to do so, thus improving the startup time the first time the panel it's loaded and not blocking the UI on posterior updates.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-09-29 19:23:41
Just pushed a new update. A few bugfixes, great optimization of remove duplicates and improvements at import track list. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Quote
   ### Added
   - Buttons: buttons' text color can now be customized via menus on the bar menu (R. Click on the bar).
   ### Changed
   - Remove duplicates: optimized the code, now runs at least x2 times faster. Updated all instances where the functions were being used to call the new version.
   - Buttons: toolbar configuration menu now is opened with R. Click (instead of Shift + L. Click on empty space). This is done to allow opening the menu anywhere even when the bar has no empty space left anymore.
   - Buttons: colors are changed without reloading the panel.
   ### Removed
   ### Fixed
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-10-05 20:11:14
Just pushed a new update. Minor UI change. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.

Quote
       ### Changed
   - Buttons: When using a variable name, max graph distance is now displayed as variable along its result when evaluated.
   - Properties: max graph distance is now set at properties as a variable instead of a number. Follows the same rules found at recipes (the variable must be at the descriptors).
   - Properties: added extensive checks to most properties.

Spoiler (click to show/hide)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-10-08 21:53:34
Just pushed a new update. Improvements and bugfix. Permanent console log to bypass foobar limitation of 'saving log to file' getting reset on every startup. obviously limited to the script output. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.
Quote
   ### Added
   - Helpers: added full script console logging to file at foobar profile folder ('console.log'). File is reset when reaching 5 MB. Logging is also sent to foobar2000's console (along other components logging).
   ### Changed
   - Cache: now gets refreshed not only when the descriptors change ('music_graph_descriptors_xxx.js' & 'music_graph_descriptors_xxx_user.js') but also when the 2 functions used to calculate the paths or the own graph constructor change and the influences method. Even if changing those functions is not planned, it ensures the cache reflects the actual state of the graph in any case. In particular, the 'influences bugfix' would have required a manual cache reset by the user without this change which now will be performed automatically. The properties panel now tracks the CRC32 of those 6 items as merged strings (instead of only the first 2).
   - Influences: Added 4 methods top check influences: 'fullPath', 'adjacentNodes', 'zeroNodes' and 'direct'. 'direct' is the previous behavior ("bugged") checking only the fist against the last node. 'zeroNodes' the fix listed bellow. 'adjacentNodes' works like zeroNodes but without forcing the adjacent nodes to be substitutions (checks (A,B) against (Y,Z), i.e. max. 4 possible links). 'fullPath' checks all consecutive links on the path (A->B), (B->C), ...) and also applies 'adjacentNodes' logic (to check the origin and final nodes). 'adjacentNodes' is now the default behavior.
   - Descriptors: Added a few anti-influences.
   ### Removed
   ### Fixed
   - Influences: were not being correctly parsed when the original or the final node was a substitution (zero weight). Now adjacent nodes which may be substitutions are also checked at both sides, for ex for this path: Hip-Hop <- Rap_supergenre <- Rap_cluster <- Rythm Music_supercluster <- Blue_Note_cluster <- Blues_supergenre <- Blues. Where Hip-Hop is a substitution for Rap_supergenre,  Rap_supergenre is checked against Blues_supergenre and/or Blues for (anti)influences. Note it doesn't check for links at Hip-Hop since the influences link are always added to the generic items by design (in this case Rap_supergenre_supergenre), so there is max. 1 possible link. (note this may be overridden by the default behavior listed at top)

Spoiler (click to show/hide)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-10-10 19:13:37
Just pushed a new update. Fixed missing file on the previous update.. Clone the repository to get the latest changes (Code/Download zip) instead of using the releases page.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2021-12-24 09:12:23
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.0.1
Quote
Imported improvements from Playlist Tools and bugfixes
There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
REQUIRES SMP 1.5.2.

    Full script console logging to file at foobar profile folder ('console.log'). Meant to be used along http control on server.
    Reworked UI, colors for buttons and bar can be customized. Reworked menus order and presentation.
    Better tag remapping: There is a menu to directly remap tags.
    Harmonic Mixing: now works with Open Keys too (in addition to Camelot Keys and standard notation keys).
    Improved caching and calculations for influences.
    Improved Distance tests.
    Buttons customization, exposing now all the available variables via menus. Also adding the tools found only -previously- at the Playlist Tools button. New presets.
    Added scripts for Picard to retrieve high level tags (gender, valence, danceability, speechiness, ...) from AcousticBrainz high level data.
    Greatly optimized the code at multiple parts (faster processing): duplicate removing (minimum x2 times faster).
    Multiple important bug fixes.

See changelog for a full list: https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/CHANGELOG.md
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-02-17 10:58:02
AcousticBrainz will close.
AcousticBrainz: Making a hard decision to end the project (https://blog.metabrainz.org/2022/02/16/acousticbrainz-making-a-hard-decision-to-end-the-project/)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-02-17 11:11:50
Yep I see... it's a pitty, I don't really agree with their premises. This project is a clear example of finding similar recordings mixing AcousticBrainz features and user tags, what makes no sense is relying only on AB features and hoping for good results. No other provider does that, and most are heavily focused on user's listening history. But discarding the AB features and focusing on the rest is an error.

Also saying things like BPM are error prone it's so... stupid. Is there any software out there calculating properly BMP? No. I don't get their point with most of the written AcousticBrainz weakness.

Related to this project, everything will work the same since it's not dependent on online resources like other plugins. That's the reason I created it in the first place.

The tagging process (by the users) may require another approach. Things like key or BPM can be calculated with picard or other software even if AcousticBrainz closes. Moods can be get from last fm with picard. There may be need for additional plugins to retrieve other tags. Anyway all tags can be remapped, so the script doesn't care if you are using spotify's data, AcousticBrainz, ...
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-03-02 20:53:36
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.1.0

Quote
v2.1.0 - Buttons framework rewritten, recipes, bugfixes and new features (wip) Latest

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    Conditional anti-influences filtering which only triggers for specific genres when enabled. i.e. using a Jazz track as reference will use it, but a Rock track will skip it.
    Similar artists computation, tagging, database and filters. New option at 'Other tools', in customizable button, to compute the similar artists to those from the currently selected tracks (duplicates are filtered first). Something equivalent to 'Similar Artists Last.fm'. The process is entirely offline and uses the already coded routines of Search by Distance.
    Expanded recipe functionality: new option, in customizable button, to create a recipe file with the current config. Full documentation of allowed variables to be used is automatically generated on the recipes folder. Tag remapping, recipe nesting and modularization allowed, etc.
    Exclude same artist filter.
    Minimum score: exposed minimum score filter variable, used in case the pool doesn't have enough tracks with the desired score.
    Harmonic Mixing: new option to perform a double pass on harmonic mixing which increases the number of tracks selected for the final mix.
    Configurable playlist Name. Compatible with themes.
    Recipes and themes can be hidden on the list if the file attribute is set to hidden.
    Improved UNIX compatibility.
    Fully reworked buttons framework: configurable scale, orientation, buttons position can be changed with drag n drop, reflow of columns/rows, etc.
    Fixed multiple crashes and bugs on the customizable button.

See changelog for a full list: https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/CHANGELOG.md
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-03-06 22:31:56
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.1.1
Quote
v2.1.1 - Hotfix
There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    Fixed crash when using harmonic mixing due to a typo on the code.

See v2.1.0 release info: https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.1.0
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-03-08 22:57:22
Not sure if anyone cares, since this is mostly informative or interesting for coders, but the actual graph can now be checked via web here (it was previously only available offline with the download):
https://regorxxx.github.io/Music-Graph/Draw%20Graph.html

Full statistics can be calculated on real time (takes some minutes) browser-side along the distance between different styles/genres using shift and hovering nodes. That distance is the real one used on Foobar2000, uses the same code (contrary to the one used by the renderer which is a simplification).

At some point I may add more features:
- Calculating distance against different groups of genre/styles (essentially simulating foobar2000's tracks comparison).
- Offering downloadable XSPF or txt playlists with tracks for a given style/genre. (something which can be easily imported on foobar with Playlist Tools or Playlist Manager)
- Linking to youtube videos related to that style/genre.
- Listing similar style/genres to the selected one to discover.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-05-04 19:30:15
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.1.3

Quote
v2.1.3 - Bugfixes and QOL changes
There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<2.1.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    Descriptors: preliminary All Music and Last.fm support by linking their genre/styles to the graph with substitutions (wip).
    Totally reworked HTML presentation (wip) with a live demo available here.
    Added multiple new debug checks to descriptors.
    Debug: added accent checks (instead of single quotes) at debug.
    Debug: added ASCII compatibility checks at debug.
    Similar artists: Added new option to write similar artists tags only to previously non tagged files.
    Greatly optimized console logging when sending selected tacks to console. This reduces processing time by +2 secs for +50 tracks.

    Updated helpers.
    Multiple fixes on descriptors.
    Multiple fixes on query helpers, logging and recipe creation.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-05-23 20:51:04
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.1.5
Quote
v2.1.5 -Bugfixes and compatiblity with new scripts Latest

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<2.1.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

-Playlist Tools: Updated to match v3.0.0-beta.7 release.
-Multiple improvements when using recipes on buttons.

See changelog for a full list: https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/CHANGELOG.md

Have also updated the wiki on github.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-05 18:41:49
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.1.6

Quote
v2.1.6 - Wine fixes and other improvements
@regorxxx regorxxx released this in 1 minute
v2.1.6
31d543f

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<2.1.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    New readmes for 'Tagging requisites', 'Tags sources' and 'Other tag notes'. They should cover most frequently asked questions.
    Added new submenu with pre-defined filters (queries) to easily configure the forced query.
    Themed buttons are replaced with manually drawn buttons when the first method fails (on Wine for ex.).
    Influences filter doesn't overwrite score filter or graph distance filter. Although it was designed to do so (to output any influence without considering score), it did not work in a logical way since those filters can be manually tuned to achieve the same result while also allowing other options.
    Updated to match Playlist Tools v3.0.0-beta.8 release.
    Minor speed optimization.
    Improved readmes.
    Fixed multiple crashes on wine and using composer tag for similarity.

buttons_wine

See changelog for a full list: https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/CHANGELOG.md

Spoiler (click to show/hide)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-06 10:09:07
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.1
Quote
v2.2.1 - Hotfix Latest
@regorxxx regorxxx released this 4 minutes ago
v2.2.1
3c3ad38

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<3.0.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    Minor improvements to console logging when reporting track list.
    Fix to theme checking. Themes were being reported as non valid when they were fine.
    Forced query was not being properly saved when using pre-defined filters.
    Updated to match Playlist Tools v3.0.0-beta.9 release.

See v2.2.0 release info: https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.0

PD: Prev update was wrongly named as 2.1.6, it's 2.2.0
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-07 18:58:31
Hello Regor,

I noticed 3 things with the customizable button. It does not prevent the program from working, but I point it out.

I checked with a new portable installation, SMP 1.6.1, Search-by-Distance 2.2.1 (alone, without the other tools. It also did it with previous versions), with _switchPaths (but it also does it without _switchPaths on my installation).
 
1. Button with buttons_search_bydistance_customizable.js , without any settings. Ctrl + click on the button,  the menu is displayed but there is also a message:
"Forced theme json file (by recipe) not found:  c:\\Users\\xxx\\AppData\\Roaming\\foobar2000\\scripts\\SMP\\xxx-scripts\\presets\\Search by\\themes\\test.json"

2. The panel crashes when I right click on the button and move the mouse while the right mouse button is pressed. Spoiler (click to show/hide)

3. One of the default settings for the Graph method doesn't seem to work, or I didn't understand. By default, without settings, the Weight and Dyngenre methods work, but the Graph method does not give any results.
It's because of the setting "sbd0.Exclude any track with graph distance greater than (only GRAPH method):": "music_graph_descriptors.intra_supergenre". When I change this setting to 75, 100 or 150 it works.
I got stuck on this for a while. I was looking in the panel properties without knowing that the correct value was something like 75, 100 or 150, and I had seen that a recipe with Graph method worked so I used that. And I saw in the Ctrl + Shift menu the setting and the [intra_supergenre --> 100] indication.

Some typing errors:
 - in README.md (https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/README.md#installation) at the end in ## Installation, line 106, there is a letter missing in both github links, the P of SMP .
 - in helpers / readme / search_bydistance.txt (https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/helpers/readme/search_bydistance.txt), line 300 : AcousticBraiz (one N is missing)
In this readme, maybe indicate in the passage about AcousticBrainz that it will close? For new users.

Apart from that, thanks for your work. I was looking for an alternative to the Soft Playlists component with Last.fm recommendations for a while. Your script doesn't only give the most famous songs. I discover my music differently. It can give me two songs that sound similar, but in different genres that I wouldn't have thought to put together. You made me discover AcousticBrainz and sign up for MusicBrainz to add songs (I'll probably do it less now that you can't add anything to AcousticBrainz). But it takes time to tag a whole library.

I don't know anything about it, but I've seen essentia.js (https://mtg.github.io/essentia.js/) . It can calculate mood (https://mtg.github.io/essentia.js/examples/demos/mood-classifiers/) and genre (even in in real time (https://essentia.upf.edu/essentiajs-discogs/), I find it impressive).
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-07 20:40:19
1. Button with buttons_search_bydistance_customizable.js , without any settings. Ctrl + click on the button,  the menu is displayed but there is also a message:
"Forced theme json file (by recipe) not found:  c:\\Users\\xxx\\AppData\\Roaming\\foobar2000\\scripts\\SMP\\xxx-scripts\\presets\\Search by\\themes\\test.json"
Does that file exist? I have followed the same steps without problems... also the theme file is not used without reason unless you configure to use it (for example with a recipe). Could you send a fig or check your config? (try cleaning the properties too)

Quote
2. The panel crashes when I right click on the button and move the mouse while the right mouse button is pressed.
Just fixed it. Right click is used to move buttons, but that only was supposed to be used on a buttons bar not when you load a single button. Fixed it in that case. Thanks :)

Quote
3. One of the default settings for the Graph method doesn't seem to work, or I didn't understand. By default, without settings, the Weight and Dyngenre methods work, but the Graph method does not give any results.
It's because of the setting "sbd0.Exclude any track with graph distance greater than (only GRAPH method):": "music_graph_descriptors.intra_supergenre". When I change this setting to 75, 100 or 150 it works.
I got stuck on this for a while. I was looking in the panel properties without knowing that the correct value was something like 75, 100 or 150, and I had seen that a recipe with Graph method worked so I used that. And I saw in the Ctrl + Shift menu the setting and the [intra_supergenre --> 100] indication.
Fixed it too. You are not supposed to be forced to use a number, variable names may be used too. (the variables are in the js files, and I use that to easily update them on the fly).

Check github
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-07 20:54:13
Quote
Some typing errors:
 - in README.md at the end in ## Installation, line 106, there is a letter missing in both github links, the P of SMP .
 - in helpers / readme / search_bydistance.txt, line 300 : AcousticBraiz (one N is missing)
In this readme, maybe indicate in the passage about AcousticBrainz that it will close? For new users.
Also fixed those. Thanks!

About AcousticBrainz , it will take me more time since my idea is to totally replace AcousticBrainz features with offline binaries (right now I'm only missing moods btw, the rest is implemented). Also AcousticBrainz is going to continue with another approach instead of using Essentia.

Quote
Apart from that, thanks for your work. I was looking for an alternative to the Soft Playlists component with Last.fm recommendations for a while. Your script doesn't only give the most famous songs. I discover my music differently. It can give me two songs that sound similar, but in different genres that I wouldn't have thought to put together. You made me discover AcousticBrainz and sign up for MusicBrainz to add songs (I'll probably do it less now that you can't add anything to AcousticBrainz). But it takes time to tag a whole library.

I don't know anything about it, but I've seen essentia.js . It can calculate mood and genre (even in in real time, I find it impressive).
That was my idea, yep.

MusicBrainz will still work, along picard, though. AcousticBrainz was only a small piece for BPM, KEY and MOODS (now replaced with the essentia binaries). Also note there is a listen brainz plugin for foobar which will scroble your tracks to their server and then you may use their recommendation system too and charts:
https://listenbrainz.org/user/Isabelxxx/charts/?page=1&range=all_time&entity=artist

They will focus now on listenbrainz for music analysis. Someone may come with a plugin to integrate that part into foobar at some point (or me).
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-07 21:18:56
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.2
Quote
v2.2.2 - Hotfix
@regorxxx regorxxx released this 10 minutes ago
v2.2.2
15dcf61

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<3.0.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    Variable 'Exclude any track with graph distance greater than (only GRAPH method' was not being parsed properly when set to a string.
    Crash when trying to move a button when only a single button script was loaded on the panel.
    Updated to match Playlist Tools v3.0.0-beta.10 release.

See v2.2.0 release info: https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.0
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-08 04:08:06
Quote
Does that file exist?
This file (https://github.com/regorxxx/Search-by-Distance-SMP/tree/main/presets/Search%20by/themes) exists, I don't touch it, I leave it when I copy the files.
If it literally searches the path "c:\Users\xxx", it doesn't exist. And on the portable installation, it should not talk about the Roaming folder I think.

I have tried these possibilities:
  - whether it's my main installation, or a new portable installation (I tried again a brand new portable installation on the desktop),
  - that I use _switchPaths, or that I use the "File" option (see below), or that I put the absolute path on lines 4,5,9,10,11,12,
It's always the same thing, I get this message when I do Ctrl + click  on the button, at the same time as the menu is displayed, with buttons_search_bydistance_customizable.js.

(https://images2.imgbox.com/ef/60/u3lqhVH0_o.png)
The rest seems to work, the menus are displayed, it creates playlists with the 3 methods. I don't do any theme or recipe settings.     (https://images2.imgbox.com/24/54/UGKRLJXK_o.png)
I reset the panel properties with "Clear" many times. I stay on the default settings. When I export the panel properties to props.json, it's always this original setting:
"sbd0.Internal data": "{\"forcedTheme\":\"\",\"theme\":\"None\",\"recipe\":\"None\"}",

(https://images2.imgbox.com/9e/c3/R0MI8nGM_o.png)

If I enter the setting {"forcedTheme":"None","theme":"None","recipe":"None"}, or if I put forcedTheme: 'None', in the script at line 20, the message still appears.

I correct one thing: until now I was using _switchPaths also with my main installation, the script stayed in memory although I replaced the files. Otherwise I have the crash "Path does not point to a valid file: ...", so I had to use _switchPaths.
BUT I just found out that if I choose the option "File" instead of the "In-memory" in Configure panel... > first tab "Script", I don't need to use _switchPaths or to put absolute paths anymore. (But when I tried it, I sometimes found the .js files of the buttons empty).

The Graph method works from the beginning without touching the settings now.
Right click + move mouse does not crash anymore. Thanks for your corrections.
But I just saw that this crash is also present on buttons_search_bydistance.js (which has 4 buttons inside).

Quote
AcousticBrainz was only a small piece for BPM, KEY and MOODS. Also note there is a listen brainz plugin for foobar...
I also use Genres. I add a prefix so they don't "mix" and put them in another tag. For example: Dortmund Folk/Country; Elec class Ambient; Rosamerica Classical; Gtzan Jazz . I don't know if it's right.
Yes I have it (https://github.com/phw/foo_listenbrainz2), I'm here (https://listenbrainz.org/user/Nom%20d'utilisateur/).
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-08 05:56:59
Something to do with this file?       presets / Search by / recipes / test_with_forcedThemePath.json (https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/presets/Search%20by/recipes/test_with_forcedThemePath.json)
I just saw that in the portable installation, if I exchange in this file
c:\\\\Users\\\\xxx\\\\AppData\\\\Roaming\\\\foobar2000\\\\scripts\\\\SMP\\\\xxx-scripts\\\\presets\\\\Search by\\\\themes\\\\test.json
for
c:\\Users\\RealUserName\\AppData\\Roaming\\foobar2000\\scripts\\SMP\\xxx-scripts\\presets\\Search by\\themes\\test.json
I don't get the message anymore and it works. But I did not succeed in the main installation.

Edit: I also succeeded with the main installation after copying the files again.
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-08 07:09:45
Actually for the portable installation it should have been :  C:\\Users\\RealUserName\\Desktop\\foobar2000\\profile\\....    But it works too.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-08 07:47:30
Actually for the portable installation it should have been :  C:\\Users\\RealUserName\\Desktop\\foobar2000\\profile\\....    But it works too.
You are not supposed to use that recipe file, it's just an example to create your own. Obviously you MUST edit the path to a valid theme path  ::) Thing is that file should have a hidden flag on the download. Just open the recipes folder and set "test_with_forcedThemePath.json" to hidden.That will do (no need to edit anything)

Readme:
Code: [Select]
Both type of files may be set to 'Hidden' (file attribute) to not show them
on the menus, instead of deleting them. Some files meant for internal use
only may be hidden by default.

Quote
I correct one thing: until now I was using _switchPaths also with my main installation, the script stayed in memory although I replaced the files. Otherwise I have the crash "Path does not point to a valid file: ...", so I had to use _switchPaths.
BUT I just found out that if I choose the option "File" instead of the "In-memory" in Configure panel... > first tab "Script", I don't need to use _switchPaths or to put absolute paths anymore. (But when I tried it, I sometimes found the .js files of the buttons empty).
? Not sure why you were using "in memory" method at all. There is no place on the installation instructions telling to do so, instead it's always stated you must load a script file. Obviously if you don't do so, bad things happen.

About the buttons crash, as said, you can not move buttons if you load a button script (it may contain multiple buttons, yep, but they can not be moved and are considered a "single" piece for all purposes). There is a buttons toolbar script for a reason on the root folder.

Quote
I also use Genres. I add a prefix so they don't "mix" and put them in another tag. For example: Dortmund Folk/Country; Elec class Ambient; Rosamerica Classical; Gtzan Jazz . I don't know if it's right.
Yes I have it (https://github.com/phw/foo_listenbrainz2), I'm here (https://listenbrainz.org/user/Nom%20d'utilisateur/).
Nothing wrong having them in other tag, whatever is not in the remap tag menu is simply skipped for all purposes.

I don't support them in a fancy way (like "standard" genre/styles in "GRAPH" mode), but you may use the custom string tag (shift+L.click menu -> Remap tags) to use the rosamerica genres, obviously setting a tag weight first. It will simply compare raw multi-values between tracks without further logic. More matches will be more similar, that's all.

I think that should cover all your doubts and problems, I will check the file's flag at github though.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-08 08:25:42
Ok found the problem, files from github don't maintain the hidden flag when downloaded.

I will look for a workaround.

PD: meanwhile set these files to hidden:
Similar artists calculation (GRAPH).json
test_recipe_nesting_02.json
test_recipe_nesting_03.json
test_with_forcedTheme.json
test_with_forcedThemePath.json
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-08 09:42:48
Quote
? Not sure why you were using "in memory" method at all.
Because this is the default method selected when I create an SMP panel. In fact I click on the new SMP panel, the editor opens, File > Import... I don't even touch this setting. If it is indicated somewhere another way to do it, I apologize, I have not seen.

Indeed, now that the file is hidden, the message is no longer displayed. The problem was there.
Ok, I guess all the "Tests" at the bottom of the menu are supposed to be hidden.

(https://images2.imgbox.com/d8/a2/ZBj3M3ek_o.png)
Quote
you may use the custom string tag (shift+L.click menu -> Remap tags) to use the rosamerica genres, obviously setting a tag weight first.
Yes I do something like that. Actually the 4 genres are in one multi-value tag that I remapped to style, and I tried different weight settings. I think it brings some acoustic similarity.

Thanks a lot for your help and the fixes.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-08 10:34:11
Indeed, now that the file is hidden, the message is no longer displayed. The problem was there.
Ok, I guess all the "Tests" at the bottom of the menu are supposed to be hidden.

(https://images2.imgbox.com/d8/a2/ZBj3M3ek_o.png)
Quote
you may use the custom string tag (shift+L.click menu -> Remap tags) to use the rosamerica genres, obviously setting a tag weight first.
Yes I do something like that. Actually the 4 genres are in one multi-value tag that I remapped to style, and I tried different weight settings. I think it brings some acoustic similarity.

Thanks a lot for your help and the fixes.
Yep, in fact just set as hidden any recipe you are not gonna use. That was the original idea :)

Also you may save your tweaked config as new recipe(s).

Quote
Because this is the default method selected when I create an SMP panel. In fact I click on the new SMP panel, the editor opens, File > Import... I don't even touch this setting. If it is indicated somewhere another way to do it, I apologize, I have not seen.
You are right about the SMP thing, although you are the first user who thought about importing scripts on memory! I have edited the installation txt file and will do the same in github in case the wiki is not clear enough
https://github.com/regorxxx/Search-by-Distance-SMP/wiki/Installation

As soon as the AcousticBrainz thing settles down, I will consider adding extra tags.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-09 15:57:25
Just updated the github page with a better description of the script and this diagram to showcase the GRAPH logic.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-09 16:23:39
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.3

Quote
v2.2.3 - Hotfix Latest
@regorxxx regorxxx released this 5 minutes ago
v2.2.3
ca6920a

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<3.0.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    New: new menu entry on customizable button to show all hidden presets (recipes or themes).
    New: new option to hide selected preset (Shift + Click).
    New: any recipe or theme file starting with 'test_' or 'int_' will be hidden everytime when opening the customizable button's menu.
    Fix: None preset was not being shown as current preset when there were no more presets on the list.
    Fix: 'test_with_forcedThemePath.json' recipe is no longer available by default (see change above). Previously a warning popup was shown everytime the menus were called due to inline forced theme path being wrong.
    Updated to match Playlist Tools v3.0.0-beta.11 release.

See v2.2.0 release info: https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.0

@Terence this should solve the problem with hidden files on github (and thus popups due to example files). Recipes with an specific name pattern will be automatically hidden on the user's side now.
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-10 05:18:42
I tried the new version, yes the problem is solved, the Ctrl + click menu doesn't make popups anymore. The test recipes don't appear. The Shift + Click to hide feature works. Thank you!

I found another error message with the customizable button. And if you want, I have some questions about the diagram. I'm sorry to bother you again. There is no hurry for me.

I have a problem with the settings Composer and Custom String. With the Weight method I get an error message, and with the Graph method it doesn't seem to be taken into account. I saw it a few months ago, but I worked around by remapping to STYLE instead. And I did some more tests today with a new portable install.
An example with the Weight method :
Another example with the Weight method:
I checked that the song I select contains something in the composer or label tag.

About the diagram:
Nice, and useful.
And I looked at your other diagram (https://hydrogenaud.io/index.php/topic,120978.msg1013106.html#msg1013106) before reporting. :))

I quickly tried the essentia extractors in Playlist-Tools-SMP. It's great! And it's easy! I tried before essentia_streaming_extractor_music and saw what it does in output. Even if there is not as much data as AcousticBrainz, it is really good. And it allows to have the results of your own files. AcousticBrainz sent the first analysis and sometimes it came from a low bitrate MP3.
(and sorry if my English is not good, I use a translator)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-10 09:04:05
I have a problem with the settings Composer and Custom String. With the Weight method I get an error message, and with the Graph method it doesn't seem to be taken into account. I saw it a few months ago, but I worked around by remapping to STYLE instead. And I did some more tests today with a new portable install.
...
Somehow I totally messed that part. Fixed. It was trying to use style tag for composer and other weird things due to a typo XD

But you can totally ignore  query_combinations() errors, they may appear in multiple tools when tags are missing. It's only when the query throws a popup or other weird things happen that there is an error (like this case).

About composer or other tags being "ignored" on graph method. That's not true. Simply  It will not try to use a query as pre-filter in most cases to get better results, but it still uses the forced query and other special filters. Also it's still used on the rest of the code logic (scoring).

I have also fixed another bug where num tags (date, bpm, custom) where being skipped when equal to zero. Which may be right for bpm or date, but custom tag could also use zero in some use-cases.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-10 09:15:29
Answer in the quote:
Quote
About the diagram:
Nice, and useful.

    The dotted lines to the "Match?" diamond, is that just a visual choice or does it mean something like "This is an optional calculation"?
"optional" in the sense it's used for scoring not as a mandatory filter. There is no need to match all tags, just have a total score over minimum. Contrary to graph distance, which must be satisfied.
    What is the letter O in the formula O(i*j*k)?
https://en.wikipedia.org/wiki/Big_O_notation
    The l = # tag values : isn't that a "k"?
yep  ;)
    I wondered what the abbreviations meant:
        ML tag -> Machine Learning  tag ?
yep , reworded it
        NBA* pathfinding -> name of an algorithm for the shortest path New Bidirectional A*, right?
yep

And I looked at your other diagram before reporting. :))

I quickly tried the essentia extractors in Playlist-Tools-SMP. It's great! And it's easy! I tried before essentia_streaming_extractor_music and saw what it does in output. Even if there is not as much data as AcousticBrainz, it is really good. And it allows to have the results of your own files. AcousticBrainz sent the first analysis and sometimes it came from a low bitrate MP3.
(and sorry if my English is not good, I use a translator)

See improved version attached.

I have to create another diagram to explain how the script can calculate similar artists. (custom button-> shift+ l click -> other tools) Which then can be used as a pre-filter as can be seen on this one (another alternative is retrieving the tags from last.fm for ex with bio).
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-10 18:33:04
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.4
Quote
v2.2.4 - Hotfix
@regorxxx regorxxx released this in 2 minutes
v2.2.4
f49fcad

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<3.0.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    New menu entry, on custom button, to reset entire button configuration to default values.
    Fix composer tag not being properly used on queries and scoring, leading to wrong results or query errors.
    Fix custom string tag not being properly used on queries and scoring, leading to wrong results or query errors.
    Fix date, BPM and custom num tag being skipped on calculations when equal to zero. While that may make sense for Date or BPM in real use-cases, the custom tag could be used to also store zero values.
    Updated to match Playlist Tools v3.0.0-beta.12 release.

See v2.2.0 release info: https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.0

PD: this update should make it easier to reset the button without clearing properties (which was never intended and should not be done on buttons bar,  it's fine when loading a single button file though).
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-10 21:47:25
I tried the new version. There are no more errors with Composer and Custom String tags with the Weight method. The tags appear in the console. I quickly tried the reset button, yes it can be useful for testing. Thanks!

Thanks for the answers!

Now I look at the Mood tag: I see that its part in the queries is much more complex than the others. I saw once that it doesn't appear anymore in the query if the number of values inside goes from 7 to 8, but I only did one quick test.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-10 22:10:58
I tried the new version. There are no more errors with Composer and Custom String tags with the Weight method. The tags appear in the console. I quickly tried the reset button, yes it can be useful for testing. Thanks!

Thanks for the answers!

Now I look at the Mood tag: I see that its part in the queries is much more complex than the others. I saw once that it doesn't appear anymore in the query if the number of values inside goes from 7 to 8, but I only did one quick test.
Moods from acousticBrainz are 6., and more if you use Last.FM moods (which I do), all retrieved from picard. You can obviously merge more mood tags from Bio, etc.
To create a "good prefilter" combinations (https://en.wikipedia.org/wiki/Combination) are required not simple queries. i.e. if you want to match at least 6 from 8 moods, then you need to create all possible groups of 6 elements from the 8 elements available. A simple OR query would not ensure at least 6 of them are matched.

There are other tools at Playlist Tools using that approach (for moods, genres, styles, ...) to find "similar tracks" only with queries.

Also, as said, the queries are created dynamically according to weights + number of tags. You don't have to consider them as a static element, neither they are always present for some tags. If the script considers applying the pre-filter would remove tracks which could be a match, then it will not use it

There is obviously a catch here: you can not know how many tag [mood] matches are enough without calculating the score first, but the script tries to pre-filter the library to not calculate the score for all tracks... an analytical solution is no feasible so aproximations come to play. I apply some simply limits. Whenever I can not ensure the limit will be satisfied, then it will simply not filter the library.

As noted, the query is only for internal use. They only filter the library before calculating scores. Neither they are meant to use all tags, nor they will output "similar tracks" per se.
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-08-10 23:23:02
I understand a little better. Thank you for the explanations.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-11 10:11:47
Updated graph diagram and added similar artists calcs diagram.
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2022-08-12 11:49:20
Hi @regor

In the custom button->set method->exclude any track with graph distance greater than.. Instead of a numeric value, the default value is a text "music_graph_descriptors.intra_supergenre".
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-12 16:02:19
Hi @regor

In the custom button->set method->exclude any track with graph distance greater than.. Instead of a numeric value, the default value is a text "music_graph_descriptors.intra_supergenre".
That's fine :) If you take a look at the menu, it's translated into 100. Value is at "music_graph_descriptors_xxx.js"
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2022-08-12 16:12:08
Hi @regor

In the custom button->set method->exclude any track with graph distance greater than.. Instead of a numeric value, the default value is a text "music_graph_descriptors.intra_supergenre".
That's fine :) If you take a look at the menu, it's translated into 100. Value is at "music_graph_descriptors_xxx.js"

Ok
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-12 20:15:03
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.3.0
Quote

v2.3.0 - Similar Artists improvements Latest
@regorxxx regorxxx released this in 1 minute
v2.3.0
3c2eb32

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<3.0.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    Added diagrams explaining the design logic of similar artists calculation.
    Added 'Dembow' and 'Renaissance Rock', along their influences, to descriptors.
    Greatly improved Similar artists feature with better filtering and weighting of tracks.
    Reduced console logging at startup.
    Switched all callbacks to event listeners.
    Updated Picard AcousticBrainz presets with fixes to output when values used scientific notation and other weird situations.
    Workaround for some instances where the scripts would warn about some feature not being supported by the OS (due to an OS or SMP bug).
    Updated to match Playlist Tools v3.0.0-beta.13 release.

See changelog for a full list: https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v2.2.0
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2022-08-13 04:18:44
I would like to make a request

Could you make the music_graph_descriptors_xxx_user.js be stored in the js_data folder (for example)?

Every time I updated the scripts, I forgot about the edits and overwrite the file  :(


Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-13 08:15:40
I would like to make a request

Could you make the music_graph_descriptors_xxx_user.js be stored in the js_data folder (for example)?

Every time I updated the scripts, I forgot about the edits and overwrite the file  :(




Seems reasonable. I was thinking the same (or moving the example file to the presets folder, so it nevers gets overwritten)
Moved it to [profile folder] 'js_data/helpers/music_graph_descriptors_xxx_user.js'. Using the custom button or playlist tools, the entry to open the descriptors will create a copy at that place and open it with notepad. If the file already exists, then it will just open it.

'search_bydistance_user_descriptors.txt' must be placed at  [scripts folder]  'helpers/readme'

Thing is this change may break loading the user file within the browser using 'draw graph.html'... but I think it's better this way.
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2022-08-13 12:57:36
Cool, now I can get my changes to last more than a few days xD
It opens the file browser alongside the .js, intentional?

There a message error in the browser map
Code: [Select]
Check console 'Ctrl + Shift + K'. There are some errors on 'music_graph_descriptors_xxx.js' or 'music_graph_descriptors_xxx_user.js'
Code: [Select]
Ha fallado la carga del <script> con origen "file:///home/xxxxxxx/bin/foobar2000/profile/scripts/SMP/xxx-scripts/helpers/music_graph_descriptors_xxx_user.js". Draw Graph.html:23:1
music_graph_descriptors_xxx: Basic debug enabled music_graph_xxx.js:352:10
music_graph_descriptors_xxx Warning: 'style_anti_influence' or 'style_secondary_origin' or 'style_primary_origin' has nodes not found on any other descriptor. Check 'Graph nodes and links' section
Tuareg Music music_graph_xxx.js:526:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Forró music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Laridé music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Rumba Fusión music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Éntekhno music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Étude 2 music_graph_xxx.js:586:13
music_graph_descriptors_xxx: Advanced debug enabled music_graph_xxx.js:619:11
Warning: music_graph() used within html. You should use music_graph_fordrawing() instead! (Unless this is a call from debug func)

but accepting the graph load.

Not related:

Is a placebo effect, or are the results more varied in terms of number of different artists within the search playlist with the last releases?
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-14 00:00:06
Cool, now I can get my changes to last more than a few days xD
It opens the file browser alongside the .js, intentional?
Yep, some people may prefer to use another editor... so I open both and let the user choose what to do.

Quote
There a message error in the browser map
Code: [Select]
Check console 'Ctrl + Shift + K'. There are some errors on 'music_graph_descriptors_xxx.js' or 'music_graph_descriptors_xxx_user.js'
Code: [Select]
Ha fallado la carga del <script> con origen "file:///home/xxxxxxx/bin/foobar2000/profile/scripts/SMP/xxx-scripts/helpers/music_graph_descriptors_xxx_user.js". Draw Graph.html:23:1
music_graph_descriptors_xxx: Basic debug enabled music_graph_xxx.js:352:10
music_graph_descriptors_xxx Warning: 'style_anti_influence' or 'style_secondary_origin' or 'style_primary_origin' has nodes not found on any other descriptor. Check 'Graph nodes and links' section
Tuareg Music music_graph_xxx.js:526:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Forró music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Laridé music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Rumba Fusión music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Éntekhno music_graph_xxx.js:586:13
music_graph_descriptors_xxx Warning: 'style_supergenre' has nodes not compatible with ASCII. Check 'Graph nodes and links' section
Étude 2 music_graph_xxx.js:586:13
music_graph_descriptors_xxx: Advanced debug enabled music_graph_xxx.js:619:11
Warning: music_graph() used within html. You should use music_graph_fordrawing() instead! (Unless this is a call from debug func)

but accepting the graph load.

Not related:

Is a placebo effect, or are the results more varied in terms of number of different artists within the search playlist with the last releases?
First error, I warned about it in my previous message XD ;)

The others... known "warnings". They work fine, it just warns about using accents on genres (which is discouraged), but those genres have accents in their native language. Still deliberating what to do with those. You can ignore them.

Quote
Is a placebo effect, or are the results more varied in terms of number of different artists within the search playlist with the last releases?
Placebo. Only thing changed was the composer/custom string tags error.
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2022-08-14 07:08:18
.
Placebo. Only thing changed was the composer/custom string tags error.
Maybe too much 80's Hard Rock/heavy Metal songs in my library  :D
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-14 09:31:08
.
Placebo. Only thing changed was the composer/custom string tags error.
Maybe too much 80's Hard Rock/heavy Metal songs in my library  :D
Tip: You can create a recipe and put a query filter for those, so they don't appear anymore. Or Only 80s/heavy rock tracks with 5 rating.
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2022-08-14 10:18:41
.
Placebo. Only thing changed was the composer/custom string tags error.
Maybe too much 80's Hard Rock/heavy Metal songs in my library  :D
Tip: You can create a recipe and put a query filter for those, so they don't appear anymore. Or Only 80s/heavy rock tracks with 5 rating.

I was using an 80 metal track specifically (nostalgic syndrome), not problem about that, but was surprising the variety of artists in the result. But thinking about it is logic, I have a lot of music of that decade.

After a bit of music_graph_descriptors edits and adding a few alias, I didn't have problems anymore with strange genres or artists included in the final list.

The tagging of keys, bpm, etc is reaching a good % of the library so that's helping too.

Only thing missing at now is that I didn't have mood in almost any file (only the allmusic ones) and have to make it weight 0. Maybe if the essentia tool thing is solved this could be sorted out.



Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-14 14:09:40
Btw if you download from repository (no releases), the html has been fixed. Along the ASCII warnings, now the entire graphuses ASCII values by default (also for the genre/style tags).
See:
https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/CHANGELOG.md#unreleased
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-21 21:05:56
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v3.0.0

Quote
v3.0.0 - ASCII descriptors and QOL improvements
@regorxxx regorxxx released this in 12 hours
v3.0.0
29b67fa

There may be a SMP's bug on installation. See _TIPS and INSTALLATION.txt
PREVIOUS BUTTONS CONFIG (<3.0.0) WILL BE LOST ON UPGRADE DUE TO A CHANGE ON PROPERTIES
REQUIRES SMP 1.6.1.

    Added 'User descriptors' readme.
    User file has been moved to profile folder at 'js_data/helpers/music_graph_descriptors_xxx_user.js'.
    All style/genres on the graph use now ASCII only values, so it should be easier to match any value to them if required.
    Default genre and style tags use now '$ascii()' TF function. This will ensure a match when using accents, etc. See change above. On previous installations, change tags to (without quotes): '$ascii(%genre%)' & '$ascii(%style%)'
    After tag remapping, a popup asks to rebuild the cache.
    Improved graph links cache asynchronous calculation.
    Fixed console logging to file (lines were not being split properly).
    Updated to match Playlist Tools v3.0.0-beta.14 release.

See changelog for a full list: https://github.com/regorxxx/Search-by-Distance-SMP/blob/main/CHANGELOG.md
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-08-28 19:28:26
I continue working, specially in the similar artist calculation with great results. The github is always up to date with working changes (along the changelog).

To show the strengths of this approach lets take into considerations some artists:
- Riff: a classic heavy metal band from Argentina lead by Pappo. 80s
- Hermética: a thrash metal band from Argentina. 90s
- Rival Sons: hard rock/contemporary rock band. 2000s.
- Blind Faith: Rock, psych rock band from late 60s heavily focused on blues rock. Colead by Eric Clapton and Steve Winwood (from traffic).

According to Last.Fm data... the 5 most similar artists:
- Riff: it recommends Pappo even if Pappo did only blues on solitary XD also recommends other Argentinian bands
X
- Hermética: it simply recommends other Argentinian bands even if they dont't share the same metal style
X
- Rival Sons:
X
- Blind Faith: recommends bands from artists featured on it. Traffic has nothing to do with Blind Faith
X

The problem? Recommendation systems based on popularity and collaborative listening analysis are highly biased.

Those recommendation systems are inherently flawed from the design stage because they don't take into account at all the actual content of the music, genre, rarity of recordings, cultural biases, listening behaviours, etc.

Now lets use this script to look for similar artists to those and compare the results. Workflow: Custom Search by Distance button -> Shift + Control + L. Click -> 'Other tools\Calculate similar artist tags'. I'm giving some video examples which clearly showcase their similarities.

- Riff: V8; Baron Rojo; Judas Priest; Ozzy Osbourne; Iron Maiden
All classic metal bands
Spoiler (click to show/hide)
- Hermética: Voivod; Metallica; V8; Suicidal Tendencies; Megadeth; Pantera; Slayer
All Thrash Metal bands not just Argentinian bands without any reason Note RIff is clearly different to Hermética.
Spoiler (click to show/hide)
- Rival Sons:  Spacelord, Deep Purple, UFO, Kaleo, Scorpions, Gotthard
All hard rock bands
Spoiler (click to show/hide)
- Blind Faith: La Pesada; Jimi Hendrix; The Jimi Hendrix Experience
All blues rock / psych bands
Spoiler (click to show/hide)

Do you see (listen) the difference? ;)

Note results are always based on what you have on your library. So these are MY similar artist to those I selected, other people with different artist or a more extensive collection may got different or more precise results. Hope this makes more clear the difference between my approach and the one provided by Spotify/Last.FM/Listen Brainz. Also note this critic is focused on the recommendation system, there are other data provided by listens which may be interesting (like popularity or rating).
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2022-08-28 21:38:38
Any algorithm that recommends Barón Rojo is a good algorithm.

;-)
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2022-09-08 19:17:43
Do you see (listen) the difference? ;)
Yes, it shows the bias of last.fm recommendations.
With your script, the result is really good. As you noted, you also tagged your files very well.
I think the Blind Faith video goes in the next drop down box.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2022-09-20 21:13:50
Just a note that all my scripts work fine on foobar 2.0 too, but queries must be changed to use the proper rating tag if needed. There are tons of threads speaking about that.

There is only a problem with foobar 2.0. Tag retrieval is much slower, so this script takes up to 5x more time in foobar 2.0 than in fobar 1.6. Right now I see no reason to "upgrade". If a SMP update improves use-cases like retrieving a few tags for the entire library... then maybe...

EDIT: I could try caching the entire set of tags for the library, but that seems overkill to me...

For reference, tag retrieval for 20K tracks took 400 ms in foobar 1.6 and now it takes 20 secs on foobar 2.0. Which is crazy...
Title: Re: Search-by-Distance-SMP
Post by: marc2k3 on 2022-09-21 01:14:19
EvalWithMetadbs can be improved in SMP. It will still be slower than old code in v1 but should be faster than old code in v2.

You can compare against JSP 3.1.0 which is optimised for v2.

JSP 3.1.0 code
Code: [Select]
var test = utils.CreateProfiler("test");
var tfo = fb.TitleFormat("%artist% - %title%");
var items = fb.GetLibraryItems();
var arr = tfo.EvalWithMetadbs(items).toArray();
test.Print();

SMP code
Code: [Select]
var test = fb.CreateProfiler("test");
var tfo = fb.TitleFormat("%artist% - %title%");
var items = fb.GetLibraryItems();
var arr = tfo.EvalWithMetadbs(items);
test.Print();
Title: Re: Search-by-Distance-SMP
Post by: mjm716 on 2023-02-09 04:51:31
I'm guessing this might just be a SMP problem choking on large collections, but just reporting for reference...

FB 1.6.16 SMP 1.6.1, latest script version from your github. Script consistently crashes on install after presenting info pop-up windows





Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-09 08:21:25
Dumps are only for main foobar and components developers. I just need the console log or popup error.

Can't help without giving a number about what 'large collection' is, and the specific point where it fails.

Although theoretically, yep, in x32 version, there is a limit until the panel crashes due to big libraries.

PD: And yes, this clearly smells to a SMP limit... so I can only recommend you to delete the search by distance buttons, and don't use them. I could disable part of the caching, but if it fails getting a handle list for the entire library, can't do anything with it since it will fail every time on all tools (?).
Title: Re: Search-by-Distance-SMP
Post by: mjm716 on 2023-02-09 14:57:17
specific point where it fails.

The script technically loads (the script info pop-ups appear), but FB crashes before the window is even rendered.

Library is 343K tracks, and other SMP scripts (e.g. Find and Play) crash out as well over time, so I'm guessing there is a mem leak in SMP somewhere.

Hoping FBv2 will eventually resolve some of that.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-09 16:36:09
specific point where it fails.

The script technically loads (the script info pop-ups appear), but FB crashes before the window is even rendered.

Library is 343K tracks, and other SMP scripts (e.g. Find and Play) crash out as well over time, so I'm guessing there is a mem leak in SMP somewhere.

Hoping FBv2 will eventually resolve some of that.
Yep, seems so.

But if we find the points where it fails, maybe I can help with some workarounds. In your case it seems to fail when trying to retrieve tags from the entire library. Usually if a panel memory usage goes over the allowed one, it just crash the panel. If the entire foobar crash, then SMP is failing in some way to avoid such situation.

If you are interested on workarounds, let me know and I will write you by PM to test different things. My library is not so huge, so I can not do it myself. Although I had this kind of problem with fingerprints on 1.6 using too much memory and managed to solve it with external tools.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-15 19:54:09
New release:
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.0.0

Please read the instructions carefully.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-19 10:41:52
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.0.1

Workaround for the SMP bug, until it gets fixed, in case someone more keeps getting the initial popups on every startup.
Title: Re: Search-by-Distance-SMP
Post by: InchPerfect on 2023-02-19 19:31:16
Thanks. Those problems seem solved. I'll get back to you about the playlists bugs (which don't seem related to your scripts) later in the other thread.

---
I can't get Nearest Tracks or Similar Genres to work.

I've simplified the Forced query to: NOT (%RATING% EQUAL 2 OR %RATING% EQUAL 1)
I've changed the Method to: WEIGHT

But I just get this when I click the buttons:

Nearest Tracks:
Quote
Query not valid. Check query:
(NOT (%RATING% EQUAL 2 OR %RATING% EQUAL 1)) AND ((GENRE IS Rock OR GENRE IS Pop) OR (KEY IS ) OR ("$year(%DATE%)" GREATER 1957 AND "$year(%DATE%)" LESS 1987))

Similar Genres:
Quote
Query not valid. Check query:
(NOT (%RATING% EQUAL 2 OR %RATING% EQUAL 1)) AND ((KEY IS ) OR ("$year(%DATE%)" GREATER 1957 AND "$year(%DATE%)" LESS 1987))

I don't know how to get rid of AND ((KEY IS ). I thought maybe that was the issue, because I don't have any KEY tags.

The Search By Distance readme says: "All settings are configurable on the properties panel and/ or menus." It took me a while to remember that I have to do Win-key+Shift+Right click. I did that hovered over the Similar Genres button and I hope that's the properties panel you mean?:
Spoiler (click to show/hide)

but, as you can see, the plto0.Global forced query entry still says:

NOT (%RATING% EQUAL 2 OR %RATING% EQUAL 1) AND NOT (STYLE IS live AND NOT STYLE IS hi-fi) AND %CHANNELS% LESS 3 AND NOT COMMENT HAS quad

even though I've changed it via the menu.

I basically don't know how to get started  :(
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-20 22:03:05
That's the point. It tries to create a query according to your selected track, but I suppose the track has no key tag.

The forced query is then added to such query. It's the first filter applied to the library before comparisons.

That's not supposed to happen. Reproduced it, it's a bug due to a typo on a variable.

 You don't need to open the properties panel. There is an 'or' because in fact all you need is now on the menus.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-20 22:10:53
Fixed previous problem and this (https://hydrogenaud.io/index.php/topic,120978.msg1022864.html#msg1022864):
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.0.2
Title: Re: Search-by-Distance-SMP
Post by: InchPerfect on 2023-02-21 11:14:39
Thanks, regor.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-21 22:38:09
Another 2 bug-fixes:
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.0.3
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2023-02-22 09:35:14
Calculate same zone artists crash with;
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({33D6B51D-9256-4D68-AB5D-D309DFEB72E0}: Playlist Tools: Buttons Bar v3.0.0-beta.18 by XXX)
include failed:
include failed:
Path does not point to a valid file: helpers_xxx_prototypes.js

File: world_map_tables.js
Line: 109, Column: 3
Stack trace:
  @world_map_tables.js:109:3
  getArtistsSameZone@search_by_distance_extra.js:247:2
  func@buttons_sbd_menu_config.js:618:5
  _menu/this.btn_up/<@menu_xxx.js:324:15
  _menu/this.btn_up@menu_xxx.js:314:24
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:41:27
  themedButton/this.onClick@buttons_xxx.js:427:21
  @buttons_xxx.js:664:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-22 09:40:44
Calculate same zone artists crash with;
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({33D6B51D-9256-4D68-AB5D-D309DFEB72E0}: Playlist Tools: Buttons Bar v3.0.0-beta.18 by XXX)
include failed:
include failed:
Path does not point to a valid file: helpers_xxx_prototypes.js

File: world_map_tables.js
Line: 109, Column: 3
Stack trace:
  @world_map_tables.js:109:3
  getArtistsSameZone@search_by_distance_extra.js:247:2
  func@buttons_sbd_menu_config.js:618:5
  _menu/this.btn_up/<@menu_xxx.js:324:15
  _menu/this.btn_up@menu_xxx.js:314:24
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:41:27
  themedButton/this.onClick@buttons_xxx.js:427:21
  @buttons_xxx.js:664:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30
There may be some more errors like that, I changed the file paths of most files and probably missed some.
Thanks. Fixed.
'xxx-scripts\main\world_map\world_map_tables.js'
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-22 19:51:13
New release:
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.1.0

Fixes the crash and all instances of weird chars on Wine. Fonts are now configurable globally.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-25 12:13:58
@paregistrase
Would you mind checking this?
https://github.com/MTG/essentia/discussions/1295

Not sure if this finally would solve the builds for Windows. Really if I finally get my hands on Essentia+Gaia binaries for windows I could expand this so much.
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2023-02-25 12:46:26
@paregistrase
Would you mind checking this?
https://github.com/MTG/essentia/discussions/1295

Not sure if this finally would solve the builds for Windows. Really if I finally get my hands on Essentia+Gaia binaries for windows I could expand this so much.

Still not support to build gaia in win32_3rdparty.
Only improvements in the Linux build (to make it less painfully) but anyway that was possible before (with some hacks).
This gaia thing is only to be used as a part of essentia?
I said that because gaia github said that you can build a Windows installer with QtCreator. That build "install_gaia2.exe".
Doesn't know if this could be used like a standalone program.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-25 13:09:35
@paregistrase
Would you mind checking this?
https://github.com/MTG/essentia/discussions/1295

Not sure if this finally would solve the builds for Windows. Really if I finally get my hands on Essentia+Gaia binaries for windows I could expand this so much.

Still not support to build gaia in win32_3rdparty.
Only improvements in the Linux build (to make it less painfully) but anyway that was possible before (with some hacks).
This gaia thing is only to be used as a part of essentia?
I said that because gaia github said that you can build a Windows installer with QtCreator. That build "install_gaia2.exe".
Doesn't know if this could be used like a standalone program.
Uhm... I could try playing with it, it's supposed you extract features with essentia and then you use some models within Gaia to analyze such features. Maybe it's possible to do it in 2 steps, yes.
Title: Re: Search-by-Distance-SMP
Post by: paregistrase on 2023-02-25 13:17:33
Uhm... I could try playing with it, it's supposed you extract features with essentia and then you use some models within Gaia to analyze such features. Maybe it's possible to do it in 2 steps, yes.

Because waiting for an update in the windows cross-compiling is not working very well......  ;D
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-02-25 13:58:21
Uhm... I could try playing with it, it's supposed you extract features with essentia and then you use some models within Gaia to analyze such features. Maybe it's possible to do it in 2 steps, yes.

Because waiting for an update in the windows cross-compiling is not working very well......  ;D
Definitely nope XD I would pay money for this.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-03-04 10:55:52
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.2.0

Quote
[4.2.0] - 2023-03-04
Added
Changed

    UI: tweaked and unified buttons weight and margins, adjusted to scale set and DPI.
    UI: minor improvements to readme sub-folders names.
    UI: cursor now changes when over a button.
    UI: cursor now changes while performing buttons drag n' drop. It now clearly indicates when a move is allowed or it's outside the allowed range.
    UI: drag n' drop now only works when the mouse is over a button position. i.e. both the functionality and position rectangle are disabled if the mouse is not on a valid position. Previously moving the button to a blank part of the bar would have simply sent it to the first/last position for ex. This is disallowed now, which makes drag n' drop a bit more intuitive and offers an overall more cohesive experience. It also respects orientation and reflow settings.
    Internal code cleanup of menus.

Removed
Fixed

    UI: minor improvements to drag n drop behavior when mouse remains static and R. Click is released. Panel is redrawn immediately instead of waiting to move the mouse, current button remains hovered.
    UI: minor improvements to drag n drop behavior when R. Click menu is called in rapid succession. Panel is redrawn on the background now.
    Console: logging of null value not working properly (totally irrelevant except for debug purposes).
    Missing buttons' readme list.

Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-05-08 14:52:56
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.4.0
v4.4.0 - Smart shuffle improvements

Quote
## [4.4.0] - 2023-05-08
### Added
- Smart shuffle: additional option to scatter instrumental, live and other tracks while respecting the smart pattern by Artist. For ex. if it can swap tracks without altering the Artist proportion for a given range of tracks, thus moving an instrumental track to another position to soft-limit the appearance of consecutive instrumental tracks. Same rationale applies for live tracks or other special conditions. This somewhat ensures any cluster of tracks is as diverse as possible.
- Smart shuffle: additional options to prioritize tracks by Rating, Play Count (original Spotify's behavior), Last played date, randomly...
- Tags: new menu entry on customizable button to edit raw JSON entry for every tag (in case advanced flags want to be edited, like combinations).
### Changed
- UI: additional info shown according to current settings on customizable button.
- Helpers: updated helpers.
- Console: multiple improvements when logging to file for FbMetadbHandle, FbMetadbHandleList, Error and unknown instances (totally irrelevant except for debug purposes).
- Console: menu entries are no longer logged to console after clicking.
- Descriptors: updated descriptors with multiple additions.
### Removed
### Fixed
- Tags: incorrect query parsing of multi-value tags, with combinations, if number of available values was lower than required.
- Tags: multi-value tags, with combinations (like MOOD), containing TF functions, were not using 'HAS' instead of 'IS' on queries to ensure multi-value tags are taken into consideration.
- UI: tooltip was not showing some settings forced by the current recipe and using the properties instead. Only affected the 'Method' line.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-06-29 13:54:48
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.4.1

Quote
[4.4.1] - 2023-06-27
Added
Changed

    Buttons: after a query error, input box is shown again with last input to fix the error and retry.
    Remove duplicates: when removing duplicates, tracks left for comparison are now preferred by a configurable TF expression. By default higher rating and not live tracks is preferred. This is apart from the forced query filtering (which may result on this feature being irrelevant in some use cases). Delete '[foobar_profile]\js_data\presets\global\globQuery.json' and '[foobar_profile]\foobar2000\js_data\presets\global\globTags.json' files after installation.

Removed
Fixed

    Buttons: setting the forced query always returned 'Query returns zero items on current library.' error, for any query. Bug introduced on 4.0.0.
    Buttons: crash while editing a tag directly in JSON. Bug introduced on 4.4.0.
    UI: tooltip flickering while pressing Shift/Ctrl over a button in icon-only mode.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-06-29 21:39:20
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.4.2
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-07-28 22:40:15
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.5.0

Quote
[4.5.0] - 2023-07-28
Added

    Selection manipulation\Shuffle: new sorting bias settings. Key (sorted from 12A to 1B), Key 6A centered (starting from 6A). Using these is like merging Harmonic Mix (consecutive tracks should have similar keys) and Smart Shuffle.

Changed

    Configuration: ALBUM ARTIST is now used instead of ARTIST by default (on new installations). This ensures better compatibility with classical music, where the artist is the actual performer but the album artist is the original composer/artist. To apply the change on existing installations, delete '[foobar_profile]\js_data\presets\global\globQuery.json' and '[foobar_profile]\foobar2000\js_data\presets\global\globTags.json' files. Further configuration may be needed via menus.
    Descriptors: updated descriptors with multiple additions and improvements for Folk and Progressive Rock music.
    Descriptors: improved debug checks for the genre/style graph.
    Helpers: updated helpers.

Removed
Fixed

    Fix for non standard hyphen chars on path names.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-09-20 15:09:52
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.6.0

Quote
[4.6.0] - 2023-09-20
Added
Changed

    Descriptors: updated descriptors with addition of 'Electrorock', 'Sephardic', 'Classical Sufi' and 'Electronic Sufi'. New 'Progressive Psychedelic Fusion XL' cluster.
    Helpers: updated helpers

Removed
Fixed

    HTML: fix broken rendering due to file path change.
    Cultural Regions: name replacers not being used at some stages of the code.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-09-25 21:31:45
https://github.com/regorxxx/Playlist-Manager-SMP/releases/tag/v0.6.2

Quote
[0.6.2] - 2023-09-25
Added
Changed

    Helpers: updated helpers.
    Documentation: updated readme PDF to be up to date with all latest changes.

Removed
Fixed

    UI: wrong tooltip on folder button.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-09-25 21:46:13
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.7.0

Quote
[4.7.0] - 2023-09-25
Added

    Cultural Regions: new artist cultural filter -for the customizable button- which allows to output only tracks by artists from same country, region, continent or worldwide. There is also an opposite version to output from different regions. 'LOCALE LAST.FM' tag must be set on files, or World-Map-SMP installed (its database is used).
    Cultural Regions: new genre/style cultural filter -for the customizable button- which allows to output only tracks whose genres/styles originate from same region, continent or worldwide. There is also an opposite version to output from different regions. No need for external scripts.

Changed

    Themes: now also save the ISO country code from selected track when created (to be used with the new cultural filter).

Removed
Fixed

    Tags: filters using queries related to genre/styles (influences filter) were not working as intended for multivalue-tags.


With this update a new set of filters become available to manipulate playlists by cultural links. Either belonging to same group or forcing another group.

Example:
Spoiler (click to show/hide)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-09-28 18:56:33
Next version will have configurable tags (+weight) for cultural related tags. One for artist's country and another one for genre/style's cultural region.

This will allow to finetune playlists a bit more than using the filters added above, giving scores according to cultural distances. For ex. to prioritize similar artists from same continent (without totally discarding artists from others). Data will be retrieved from tags or the World-Map-SMP script (which also extracts data from Bio panel).

The genre/style version is a bit more complex since a genre's origin may be found on multiple regions at the same time (and also is independent of the artist's origin). It uses the cultural map added on previous versions, so every genre on the graph (https://github.com/regorxxx/Music-Graph) is there too.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-10-05 19:44:45
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v5.0.0

Quote
[5.0.0] - 2023-10-05
Added

    Cultural Regions: new virtual tag named 'artistRegion' which uses artist's country data from 'locale last.fm' file tag or World-Map-SMP's database for comparison with a weight according to distance between cultural groups. i.e. a Spanish artist would be considered more similar to French than American artists. It can currently differentiate by country, region or continent. Note this is obviously not mean to be used along, since the genre similarities between different cultural groups/continents (i.e. Spanish rock vs American rock) are already managed by using the 'GRAPH' method or the new tag below, but it may come handy to prioritize tracks from the same region. This is the "tag scoring" version of the cultural filters 4.7.0. Check 'Tags & Weights: cultural' in the customizable button for more info.
    Cultural Regions: new virtual tag named 'genreStyleRegion' which uses internal genre mapping to cultural regions for comparison with a weight according to distance between cultural groups. i.e. instead of using the artist's origin, it uses the track genre's origin; therefore a blues track is considered similar -at least for this weight- no matter if it's played by a Japanese or American artist. This is the "tag scoring" version of the cultural filters 4.7.0. Check 'Tags & Weights: cultural' in the customizable button for more info.
    Configuration: new setting to invert the picking order for any method (i.e. taking tracks by lowest score first).
    Configuration: new setting to invert the sorting order for any method (independent to the picking method).
    Descriptors: updated descriptors with multiple additions: Kuduro, Semba, Kizomba, African Ritual-Tribal, Afro-Latin Ritual-Tribal, Asian Ritual-Tribal, Aboriginal Folk, Pre-Columbian Ritual-Tribal, Mbalax, Melodic Techno-House.
    Debug: cultural regions are now also checked to ensure every item on the graph is also included.

Changed

    Configuration: pool picking submenu on customizable button is now disabled when using harmonic mixing.
    Configuration: expanded user configurable files at '[FOOBAR PROFILE FOLDER]\js_data\presets\global' with new queries. File will be automatically updated with new values (maintaining the user settings).
    Configuration: improved the user configurable files update check for missing keys.
    UI: menus to remap tags on customizable button now show the weight on the submenu name to easily have a general vision of all tag weights.
    UI: global genre/style filter property has been renamed to 'Filter for genre/style' (old setting will be lost).
    Tags: changed default weight values for tags. 'dynGenre' weight is now 15, 'artistRegion' weight is 5, 'genreStyleRegion' is 7, '. To apply these changes, restore defaults at 'Set Tags and weighting...'.
    Tags: changed default range values and scoring method for tags.'key' scoring distribution is LOGARITHMIC and range set to 3, 'date' scoring distribution is NORMAL and range set to 30, 'BPM' scoring distribution is NORMAL and range set to 50. To apply these changes, restore defaults at 'Set Tags and weighting...'.
    Tags: improved handling when some of the default tags are missing.
    Tags: improved logging when reference track does not have a tag.

Removed

    UI: tags cache menu entry on customizable button has been removed (the setting is still accessible via the properties panel).
Fixed
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2023-11-09 22:29:39
Speaking of popups, I commented some stuff in helpers_xxx_so, so those popups don't show up anymore...
They are supposed to be taken into consideration to be fixed, but yep, they can become annoying if you don't want to. I will add a new file at 'profile\js_data\presets\global\' (along the other global config files), with a toggle to simply omit the popups.
That would be great.

Quote from: regor
Quote from: Terence
I've made some small modifications for my use in Search by distance...
Then you seem to have a "fix" for an incomplete commit of mine.
That 'bitmasksorterjs' was giving me an error message after a recent update so I commented it out (I have a single customizable button).

Quote
EDIT: To remove borders, just set buttons colors to -1 at properties. It also affects the highlighting. The code is already there for that, no need to touch the files. Just click ctrl when on the buttons color menu entry, as indicated at the header of the menu.
Thanks for the tip. I've tried it below.

Quote
I'm not sure about your rationale to changing the width of the button to 1 px. though. That makes the button invisible (?) Neither why you changed the coordinates in some functions at the buttons framework file, which affects all buttons (?)
I try things without understanding what I'm doing. It was to align the button with my toolbar, or adjust its width (the icon still appears). And make a lighter highlight. Here's what I'm doing:

Before:

X        X

After:

X        X
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-09 23:11:52
Quote
That would be great.
Probably on next week.

Quote
That 'bitmasksorterjs' was giving me an error message after a recent update so I commented it out (I have a single customizable button).
Next time report, it was a missing file. Fixed now!

Quote
I try things without understanding what I'm doing. It was to align the button with my toolbar, or adjust its width (the icon still appears). And make a lighter highlight. Here's what I'm doing:
You have a setting at the toolbar to use icon-only mode, there is no need at all to edit the files for that.

X

Now, if you record again the gifs with the new files and proper settings:
- Color button to none
- Icon-only mode
- Adjust scale if needed

Then maybe I may offer an alternative highlighting behavior. Right now it mimics the one at win for the native buttons.
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2023-11-10 23:46:28
I was already in icon-only mode and at scale 1 (0.93 by default).

I'm not sure my layout is worth the hassle (and I'm fine like that). To find out if I understand the settings correctly, and if I'm doing what you say, I did a step-by-step. You can skip to the end, but there are two comments.

Spoiler (click to show/hide)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-11 00:24:11
5. Nope, because the background thing is provided by win theme (or in your case Wine theme applied to foobar), so then you can not customize the button itself. Only when you override the theme you can change the color and transparency. (I may rename it to "themed buttons" or something like that). You must use no background buttons.

7. As far as I see you need some kind of way to apply a manual offset to the button, which would work on any system. I can provide that for the entire toolbar (it's somewhat trivial), adding it as a config per button is too complex. For ex. forcing the bar to start some pixels to the left and top.

8. If I understand, the panel is paint to gray even if you set pseudo-transparency and there is no color on the bar. That's a SMP or DUI/CUI bug though... Does that happen with a blank panel? That is not how it works, if you have no background then the color should match the black or white theme. Otherwise you may set the bar color to match your desired color...

Also set the 'Edge style' of the SMP panel to none. With both settings, it works fine in 1.6 in CUI (latest versions). There was a bug related to this some time ago now fixed. Check it.

Finally I see the highlighting color may not match in dark mode. Note the color is provided by the windows theme; unless you use 'no background buttons' in which case it's white (mouse over) or black (clicking). I could also provide some settings for that, which I think would complete all the available customization for buttons.
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2023-11-11 23:45:57
5. The linux Wine? I'm on Windows 10 + Columns UI 2.1.0 (which is also why I think I don't need those SO features popups...)
"You must use no background buttons.": okay, that's what I was doing before in my first post.

7. I don't know if my layout deserves settings especially for it... whether for manual offset or highlight color. I'm already happy with my little changes (what I showed you at the beginning). I can go on like this.

8. buttons_toolbar.js + pseudo-transparency enabled: yes, the background color is light or dark gray depending on the theme (like the toolbar). Even if the menu displays "Set custom bar color...   [-none-]".    X
No, a blank panel (In-memory) is white or ~black (even with pseudo-transparency).    X

It seems I'm already on "No edge".

Thanks for the tips and explanations.  :)
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-13 15:35:38
Check latest commits.
Quote
- Buttons bar: added custom button hover color and customization.
- Buttons bar: added custom offset for buttons along X/Y axis.
- Buttons bar: added full size mode for buttons, which will use full Width/Height according to Y/X orientation.
- Buttons bar: renamed background buttons to 'Use themed buttons', which depends on the windows theme.
- Added setting to disable popups related to features not being supported by the OS (at startup). Found at '[FOOBAR PROFILE FOLDER]\js_data\presets\global\globSettings.json', by changing 'bPopupOnCheckSOFeatures'. By default popups are always shown. This setting will never be exposed within foobar, only at this file.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-15 18:06:08
v5.1.0 - Full AllMusic genre support + toolbar customization Latest
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v5.1.0

Quote
Added

    Auto-update: added -optional- automatic checks for updates on script load; enabled by default. Compares version of current file against GitHub repository. Manual checking can also be found at the settings menu. For buttons within the toolbar every button will check for updates independently (although the toolbar menu has an entry for batch checking). Setting may also be globally switched at '[FOOBAR PROFILE FOLDER]\js_data\presets\global\globSettings.json', by changing 'bAutoUpdateCheck'. It will apply by default to any new installed script (previous scripts will still need to be manually configured to change them).
    Descriptors: AllMusic support linking their genre/styles to the graph with substitutions. These tags are usually added by Biography script. It may be enabled at the tags remap submenu of the customizable button. Setting is applied per panel (i.e. shared between different buttons on the same bar).
    Descriptors: added 'Chamber Music XL', Orchestral Music XL', 'Ballroom Music XL', 'Poetry-Secular Music XL', 'Choral-Spiritual Music XL' and 'Choral-Orchestral Music XL' classical music style clusters.
    Descriptors: added 'Kawaii Metal', 'Branle' and 'Darksynth' styles.
    Buttons bar: added some safe-checks to panel properties.
    Buttons bar: added custom button hover color and customization.
    Buttons bar: added custom offset for buttons along X/Y axis.
    Buttons bar: added full size mode for buttons, which will use full Width/Height according to Y/X orientation.
    Added setting to disable popups related to features not being supported by the OS (at startup). Found at '[FOOBAR PROFILE FOLDER]\js_data\presets\global\globSettings.json', by changing 'bPopupOnCheckSOFeatures'. By default popups are always shown. This setting will never be exposed within foobar, only at this file.

Changed

    UI: toolbar's color menu entries now show the color name along the menu entry. 'none' equals to no color.
    Buttons bar: renamed background buttons to 'Use themed buttons', which depends on the windows theme.
    Helpers: updated helpers.

Removed
Fixed

    Tags: improved logging when reference track does not have a tag.

Removed

    UI: tags cache menu entry on customizable button has been removed (the setting is still accessible via the properties panel).

Fixed

Spoiler (click to show/hide)
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2023-11-15 21:09:16
With the new options and the three offsets, we can do a lot of things. I've done that:               
And updates will be easy now. Thank you so much.

Otherwise I saw this (but I haven't tried today's version yet):
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-15 23:00:51
I haven't found out what 'Active button color' is.
For animations. It depends on the button used.

Quote
  • Idea for the Transparency option: indicate in the window that 0 = transparent, 100 = not transparent.
Makes sense.

Quote
  • Colors > Use buttons' borders on hover: grayed out if 'Custom button color' is chosen, but remains in its previous state. The option is disabled, but you can choose its state when it's disabled. So what's the point of it being disabled?
When it's grayed out the setting is simply not used. Only when you can use it, you can change its state. If you set the buttons color, then you always have borders, thus there is no need  for a setting to show/hide them.

I prefer to left things without changing the state, because otherwise you have to reset things... It's the same in a lot of my scripts. Unused things are grayed out (but the setting is not necessarily reset).

Will check the other errors, thanks!
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-15 23:56:47
v5.1.1 - Full AllMusic genre support + toolbar customization Hotfix
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v5.1.1
Quote
## [5.1.1] - 2023-11-16
### Added
### Changed
- Buttons bar: transparency input popup now has a description for the values.
- Descriptors: improved debug routines to avoid situations where a susbstitution term doesn't exist in the graph (see below).
- Descriptors: improved pathfinder routines to throw -with a descriptive error- when a path is not found due to some genre not being connected to the graph (see below).
### Removed
### Fixed
- Descriptors: added 'Kawaii Metal' and 'Darksynth' styles to cultural map.
- Descriptors: crash in some cases due to malformed descriptor. 'Kuduro' genre was not added properly as substitution.
Title: Re: Search-by-Distance-SMP
Post by: Terence on 2023-11-16 01:40:53
Quote
When it's grayed out the setting is simply not used.
The setting is used even though it's grayed out. It can have two different states when it's grayed out (on the button too, not just in the menu).

Spoiler (click to show/hide)

But that's really not important. Maybe I'm missing something.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-16 10:06:17
My fault, I was confused with other setting. It should be configurable and applied in both cases, yes. Will be fixed.

Quote
Verified on a new portable installation: even after activating the Dyngenre method, some recipes with Dyngenre display errors.            For example: "Tag missing multi-value type (multiple, single): dynGenre"
Also this one. Will upload the fix on a few hours, with extra checks to ensure it doesn't happen again when editing tags by me or an user.

X
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-16 17:04:16
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v5.1.2

Quote
[5.1.2] - 2023-11-16
Added

    Configuration: 'Restore defaults' menu entry at tag configuration.
    Configuration: base tags checking at init, when running the tool or editing tags in some way. A descriptive popup will show instructions about what to do if an error is found (see below).

Changed
Removed
Fixed

    Buttons bar: border setting was grayed out when the buttons color had been set.
    "Tag missing multi-value type (multiple, single): dynGenre" warnings with dynGenre recipes, due to missing key at the base tags at properties. Use the 'Restore defaults' menu entry above for dynGenre tag to fix it on previous installations, new installations will use the right values automatically.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2023-11-24 19:23:34
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v6.0.0

Quote
[6.0.0] - 2023-11-24
Added

    Buttons: added new button 'search_by_distance_info', which pretty basic functionality right now, to display general statistics for a genre/style from the selected track. That data may come handy in creating new playlists (for tuning settings or filters), or to be used along Timeline-SMP or World-Map-SMP statistics.
    Buttons bar: new setting to enable asynchronous loading of buttons, now the default behavior.
    Descriptors: added Country Rap, Square Dance, Rodeo, Jug Band, K-Pop, J-Pop, Kayokyoku styles.
    Descriptors: improved debug tests to avoid duplicates entries in substitutions, influences, etc.
    Dynamic queries: added dynamic queries (like those found at Playlist Tools) for tracks and themes. Dynamic queries are like standard queries but with placeholders (#DATE#) which are evaluated on-the-fly, before running the query, using the selected reference track (or theme). These queries are then used to filter the library at pre-scoring stage, changing the filter according to the reference For ex. for a Bob Dylan's track: COMPOSER IS #ARTIST# -> COMPOSER IS Bob Dylan. Full documentation can be found on the associated readme.
    Readmes: added readmes for dynamic queries, cultural filters and influence filters.
    HTML: added buttons to graph html page to directly go to live version or open the GitHub repository.

Changed

    Descriptors: improved AllMusic support.
    Descriptors: extended debug tests for accents, ASCII compatibility and capitalization for all entries (including AllMusic).
    Configuration: extended tag checking at init also for user settings (and not only default values). They were already tagged with actual values at runtime and after editing tags.
    UI: tooltip while calculating the link cache (the button is animated) now shows the remaining percentage for every step.
    UI: minor cleanup of menus. Negative scoring for out of range tags setting may be reset after installation.
    Readmes: improved cultural and tags readme.
    HTML: minor UI tweaks to graph html page.
    HTML: moved HTML related scripts to its own folder.
    HTML: updated jquery dependency of graph html page.
    Debug: cleanup of debug routines, added comments about symmetries for distance calculation and better logging.
    Helpers: updated helpers.
    Console: reduced max log file size to 1 MB.
    Minor speed optimizations when looking for similar tracks using 'GRAPH' method.

Removed

    Buttons bar: 'buttons\examples' folder, for file examples check Playlist Tools.

Fixed

    Pathfinder: fix long time bug on A* pathfinder which made it unusable. NBA* was used anyway so it doesn't affect at all current functionality.
    Pathfinder: fix distances output by getDistanceFromPath() due to incorrect handling of multi-edge graphs on ngraph.graph, where only the first link found was used. As result new distance values could be lower in some cases.
    Presets: non valid keys error on 'Similar genres (DYNGENRE)' recipe. Issue #16
    Descriptors: cleanup of duplicates entries and other minor errors in substitutions, influences, etc.
    Auto-update: changed logic to check Playlist Tools's buttons updates independently to the toolbar version, so mixed scripts versions no longer produce false negatives.
Title: Re: Search-by-Distance-SMP
Post by: regor on 2024-02-29 00:53:34
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v7.0.0

Quote
7.0.0 - 2024-02-28
Added

    Tags: added 'RELATED' and 'UNRELATED' tags which may be used to specify tracks which are considered similar or not similar by the user. Matching the tag adds the given weight as absolute score to the total, i.e. it's not averaged with all weights. These special tags may use as values any combination of 'TITLE', 'ARTIST' or 'MUSICBRAINZ_TRACKID'. As expected, giving a title, would match any track with such title (from any artist). Giving an artist would match any track from such artist. And using the id value, would ensure only specific tracks are matched. This is something similar to the love/hate feature on Spotify (to make tracks appear or not on generated playlists), although in this case these special tags ensure you are only excluding/including specific tracks in relation to others, not globally. See the readme for more info.
    Tags: to simplify the usage of 'RELATED' and 'UNRELATED' tags (see above), new entries at the customizable button (see Other tools\Relate selected tracks...) have been added. They allow to add the 'MUSICBRAINZ_TRACKID' values to 'RELATED' or 'UNRELATED' tags for the selected tracks or the last track used as reference in a few clicks.
    Dynamic queries: added new dynamic queries for tracks within a date period relative to the reference track.
    Dynamic queries: added 'None' entry to clean all dynamic queries. If the entry is not checked, then there is at least a dynamic query set (even if it's not shown on the menus).
    Configuration: added COMPOSER to the list of global tags.
    Configuration: added LOCALE LAST.FM to the list of global tags.
    Configuration: added integrity checks to global user settings files, found at '[FOOBAR PROFILE FOLDER]\js_data\presets\global[...].json'. In particular queries are now check to ensure they are valid and will throw a popup at init otherwise. Other settings are check to ensure they contain valid values too.
    Configuration: expanded user configurable file at '[FOOBAR PROFILE FOLDER]\js_data\presets\global\globSettings.json' with a new setting to output to console profiling logs at script init. They work globally. Disabled by default.
    Descriptors: added Symphonic Rap style.
    Toolbar: new settings for text (or icon) position: left, right (default), top and bottom. These settings mimic CUI options at the buttons bar.
    Toolbar: new settings for text scale (now independent of button and icon scale).
    Toolbar: new settings for icon scale (now independent of button and text scale).

Changed

    Info: improved genre/style identification for substitutions and clusters.
    Tags: improved queries created according to tags and weights when using 'Negative score for tags out of range'; as result processing time may be lower in some cases (if weight is not high enough to filter a track by such tag but negative cases would exclude it).
    Cultural Regions: improvements to processing when using cultural filters in some cases.
    Cache: changed cache structure to minimize file size (up to 50%) and loading time (up to 30%). Link cache will need to be rebuilt on update.
    Configuration: changed the remove duplicates bias to prefer tracks with higher play-counts and positive feedback tag (love/hate).
    Helpers: updated helpers.
    Console: removed unnecessary logging in some cases.
    Console: improved log file formatting on windows text editors which parse new lines only with CR+LF instead of LF.
    UI: wrong parsing of png masks on unix systems (currently, it only affected the ListenBrainz icon when changing the font color).
    Code cleanup.

Removed
Fixed

    Scoring Method: fix to incorrect handling of (negative) values outside range for some methods ('NORMAL' and 'LOGISTIC').
    Readmes: minor fix to 'search_by_distance_info.txt' file.
    Info: minor fixes to reports provided by 'search_by_distance_info' button.
    Tags: incorrect handling of single-value tags in some cases. Issue #22.
    Tags: incorrect handling of empty tags in some cases.
    Tags: incorrect graph distance of genre/style tags if there were zero values. A reference with no genre/style tags should fallback to WEIGHT method and compared tracks should report infinite distance when missing the tags in GRAPH method. Issue #27.
    Tags: incorrect scoring of genre/style tags when they were put on custom tags. Issue #25.
    Tags: incorrect handling of genre/style tags not present on the graph for the reference track. Issue #26.
    Toolbar: buttons' size not restored back to normal height after disabling 'Full size buttons' without reloading the panel.
    Internal errors with set.add().
    Crash when using a probability of picking lower than 100 in some cases.
    Minor fixes.