Skip to main content

Notice

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

Re: Search-by-Distance-SMP

Reply #125
.
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.




Re: Search-by-Distance-SMP

Reply #126
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

Re: Search-by-Distance-SMP

Reply #127
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

Re: Search-by-Distance-SMP

Reply #128
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.
  • Most times similar artists are chosen just because people from that country also listen to them (even if they are not related), so cultural bias is a really big problem.
  • Also, whenever an artist is featured on a band, it's considered a similar artist. Are Eric Clapton's works similar to Blind Faith? I don't think so XD Not at all.
  • There are other biases like that... but you take the idea.

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

Re: Search-by-Distance-SMP

Reply #129
Any algorithm that recommends Barón Rojo is a good algorithm.

;-)

Re: Search-by-Distance-SMP

Reply #130
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.

Re: Search-by-Distance-SMP

Reply #131
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...

Re: Search-by-Distance-SMP

Reply #132
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();

Re: Search-by-Distance-SMP

Reply #133
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






Re: Search-by-Distance-SMP

Reply #134
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 (?).

Re: Search-by-Distance-SMP

Reply #135
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.

Re: Search-by-Distance-SMP

Reply #136
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.

Re: Search-by-Distance-SMP

Reply #137
New release:
https://github.com/regorxxx/Search-by-Distance-SMP/releases/tag/v4.0.0

Please read the instructions carefully.

Re: Search-by-Distance-SMP

Reply #138
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.

Re: Search-by-Distance-SMP

Reply #139
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  :(

Re: Search-by-Distance-SMP

Reply #140
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.


Re: Search-by-Distance-SMP

Reply #142
Thanks, regor.


Re: Search-by-Distance-SMP

Reply #144
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

Re: Search-by-Distance-SMP

Reply #145
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'

Re: Search-by-Distance-SMP

Reply #146
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.

Re: Search-by-Distance-SMP

Reply #147
@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.

Re: Search-by-Distance-SMP

Reply #148
@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.

Re: Search-by-Distance-SMP

Reply #149
@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.