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 25854 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Search-by-Distance-SMP

Reply #100
Actually for the portable installation it should have been :  C:\\Users\\RealUserName\\Desktop\\foobar2000\\profile\\....    But it works too.

Re: Search-by-Distance-SMP

Reply #101
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, I'm here.
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.

Re: Search-by-Distance-SMP

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

Re: Search-by-Distance-SMP

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


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.

Re: Search-by-Distance-SMP

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


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.

Re: Search-by-Distance-SMP

Reply #105
Just updated the github page with a better description of the script and this diagram to showcase the GRAPH logic.

Re: Search-by-Distance-SMP

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

 

Re: Search-by-Distance-SMP

Reply #107
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 :
  • New button    buttons_search_bydistance_customizable.js
  • Test: it works, it gives a new playlist
  • Set composer weight -> 15
  • Error message, with OR (undefined)) at the end. A simplified example: Spoiler (click to show/hide)
  • On the console : query_combinations(): tagsArray [] was null, empty or not an array. queryKey = composer    (this message is also displayed with the Graph method)
Another example with the Weight method:
  • "Clear" properties
  • Test: it works
  • Set customStr weight -> 15
  • Set customStr tag  -> label                        (It's for the test. It's the same with other tags.)
  • The same kind of error message.
  • Console : query_combinations(): tagsArray [] was null, empty or not an array. queryKey = label      (also with the Graph method)
I checked that the song I select contains something in the composer or label tag.

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"?
  • What is the letter O in the formula O(i*j*k)?
  • The l = # tag values : isn't that a "k"?
  • I wondered what the abbreviations meant:
    • ML tag -> Machine Learning  tag ?
    • NBA* pathfinding -> name of an algorithm for the shortest path New Bidirectional A*, right?
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)

Re: Search-by-Distance-SMP

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

Re: Search-by-Distance-SMP

Reply #109
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).

Re: Search-by-Distance-SMP

Reply #110
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).

Re: Search-by-Distance-SMP

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

Re: Search-by-Distance-SMP

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

Re: Search-by-Distance-SMP

Reply #113
I understand a little better. Thank you for the explanations.

Re: Search-by-Distance-SMP

Reply #114
Updated graph diagram and added similar artists calcs diagram.

Re: Search-by-Distance-SMP

Reply #115
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".

Re: Search-by-Distance-SMP

Reply #116
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"

Re: Search-by-Distance-SMP

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

Re: Search-by-Distance-SMP

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

Re: Search-by-Distance-SMP

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



Re: Search-by-Distance-SMP

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

Re: Search-by-Distance-SMP

Reply #121
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?

Re: Search-by-Distance-SMP

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


Re: Search-by-Distance-SMP

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