Code Monkey home page Code Monkey logo

Comments (59)

regorxxx avatar regorxxx commented on May 30, 2024 1

Nah, it was due to having so many tracks by same artist; there was only an exact solution for the smart shuffle (with an error there), and thus only crashed in that use-case, took me some time trying with combinations of tracks following your same pattern. Now hopefully fixed.

image
->
image
(note the only solution for such artist's proportion is intercalation, the thing not working before)

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024 1

@username116

Please take a look at the [custom-tags] branch. Once ready, next release will use the new tag system, which allows fully tag behavior customization. Is WIP, so there are probably errors here and there.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024 1

Now. Checked it myself.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024 1

Yeah, variable name was already used below 🙄 now

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024 1

I "could" add a check against queries returning nothing on a library, but that's just adding a new feature to check for user's error, not my fault.

Done. Also the share settings feature.
share
Will check your report tomorrow and try to find what's going on, thanks :)

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Hello Regor,

I can't get the customizable button to work since the changes due to foobar v2. As soon as I add a remapped tag, the results are often empty or almost empty playlists.

For example I try to do this :

* Load the script buttons_search_bydistance_customizable.js

* Wait for the calculation of the cache with the console

* Name the button

* Select the Graph method with the Ctrl + Shift menu

* Test : it gives results, more or less

* Add a custom tag : Ctrl + Shift menu > Remap tags > Set genre tag: `GENRE,DISCOGS_GENRE`

* Reset link cache now ?  Yes. Wait for the cache calculation with the console.

* The results are empty playlists.

Beware tags cache is not fully tested, so running directly from github you will continue getting errors with things being WIP.
Have uploaded a commit which should fix it. Reset tags cache after installing it and retry.

If it doesn't work, to disable tags cache:
image

I tried several tags, several songs. I tried the options. I compared the results with the v3.1.0 release. I tried with a new portable installation foobar v2.0 beta 12 x86 + Spider Monkey Panel v1.6.1 + the Search-by-Distance code downloaded two days ago. The button is used alone and there were no other settings before.

I saw in the js_data\tagsCache folder, after closing foobar, two files: %GENRE%, %DISCOGS_GENRE%.json, with all tag values. %GENRE, DISCOGS_GENRE%.json, with only question marks instead of values.

Another detail I saw: there is a setting Remove duplicates by : ["$ascii($lower($trim(%TITLE%)))","ARTIST","$year(%DATE%)"] I feel like ARTIST is missing the percentage symbols : %ARTIST%.

Remove duplicates thing is right, percents are only needed when using functions.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Another remark (sorry it's not the bug but I take the opportunity): The Discogs genre Folk, World, & Country appears as "Folk", "World", "& Country". I saw that in the console too. It's a pretty important / common tag for them. This is not a request, it's just to point it out.

Well tag values are divided by comma, so there is nothing I can do with that. There is no single genre on the world using commas.

Folk, World & country is not a genre, is a collection of genres, so being strict, that value is wrong and should be split first. There is no thing as 'Folk, World & Country' on the graph since that goes against the design of this script. 2 of them are genres, and World is not a genre.

Obviously users may want to use it that way for queries or whatever, but it has zero use on Search by distance anyway so... There are several warnings about this on the tagging readmes and that's the standard on Foobar when you query all tags at once.

If you use 'Debug\Find genre/styles not on graph,' you will see all values discarded for the graph. They are still used for scoring purposes though, as stated on the method readmes.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I've done some testing and it seems to work. I'm getting results now, where before I just had empty playlists.
I'll take a little more time the next few days to try it out.
Thanks a lot.

Yes, maybe I am impatient and should wait for the releases.
Thanks for your answers.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Don't get me wrong, this helps me to find broken things faster; just warning you, in case you want a "tested" release.
Foobar 2.0 tag caching is mostly a beta thing, just finished implementing it tonight -at least in some tools-.

About the Discogs tags, you could try using TF:

  • Add a custom tag : Ctrl + Shift menu > Remap tags > Set genre tag: GENRE,$replace(%DISCOGS_GENRE%,', &',',')
  • Which will make '& Country' -> 'Country'.
  • Since all tracks witch such value will match the 3 resulting tags, it will work "fine" on any method.
  • GRAPH method will match Country and Folk. Which should not be intended, but since you tagged your files as both Country and Folk then it's "fine" for you I suppose.
  • Bonus: the tagging will be consistent with any track you tagged as Country or Folk on GENRE tag.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Have touched a lot of things on the latest commits to better support Tag remapping with TF functions, and under the hood changes which hopefully will make my life easier on the future. Also some tag cache fixes. Let me know if it works as intended.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I have an error with today's version, with the default settings, when I click on the button.
(When I deselect the menu Ctrl + Shift > Set final sorting > Smart Shuffle by Artist, it works, I have results.)

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
shuffleByTags is not defined

File: search_bydistance.js
Line: 1577, Column: 21
Stack trace:
  do_searchby_distance@search_bydistance.js:1577:21
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:57:5
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 135 foobar2000

I don't know if this is right, but I tried to add this line at the top: include('..\\main\\scatter_by_tags.js');, and I got this:

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
ReverseIterableMap is not defined

File: scatter_by_tags.js
Line: 211, Column: 15
Stack trace:
  shuffleByTags@scatter_by_tags.js:211:15
  do_searchby_distance@search_bydistance.js:1578:21
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:57:5
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 136 foobar2000

I wondered what is the new format to add a remapped tag, it says (JSON) ["GENRE"]. I looked in the .json files, and I deduced that it should be something like ["GENRE","TAG 2","TAG 3"].

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I don't know if this is right, but I tried to add this line at the top: include('..\main\scatter_by_tags.js');, and I got this:
Yep, just uploaded the missing dependencies and works fine on my tests. I'm now loading the button on a single panel, instead of a Playlist Tools toolbar to have your same settings.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I wondered what is the new format to add a remapped tag, it says (JSON) ["GENRE"]. I looked in the .json files, and I deduced that it should be something like ["GENRE","TAG 2","TAG 3"].

Yep, I have added an example about what JSON format means for casual users on the Input popup. It's just values quoted within an array [], but probably other users will have doubts. Will add it later at the readmes.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I found 3 other menu errors:
Ctrl + Shift menu > Debug and testing > Debug Graph
Ctrl + Shift menu > Debug and testing > Run distance tests
Ctrl + Shift menu > Debug and testing > Graph statistics

Maybe missing sbd. before panelProperties:
File: buttons_sbd_menu_config.js
Line: 556, Column: 9
Line: 562, Column: 9
Line: 596, Column: 8

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
panelProperties is not defined

File: buttons_sbd_menu_config.js
Line: 556, Column: 9
Stack trace:
  func@buttons_sbd_menu_config.js:556:9
  _menu/this.btn_up/<@menu_xxx.js:305:15
  _menu/this.btn_up@menu_xxx.js:295:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 137 foobar2000

And here maybe a typo? helpers/helpers_xxx.js, line 94
"iI.E. these tracks would not be"
In the window that appears with Ctrl + Shift menu > Other playlist attributes > Duplicates advanced RegExp title matching?

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

All fixed now.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I've seen other errors.
Ctrl + Shift menu > Special playlist rules > Recursive playlist creation, uses output as new references

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
do_searchby_distance(...) is not iterable

File: search_bydistance.js
Line: 1607, Column: 57
Stack trace:
  do_searchby_distance@search_bydistance.js:1607:57
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:57:5
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 146 foobar2000

This one seems to come from my settings (with several remapped tags), because it worked without error on a new portable installation.
Ctrl + Shift menu > Debug and testing > Graph statistics
This is the console :

Called: Debug and testing\Graph statistics
Calculating graph links 0%.
Calculating graph links 25%.
Calculating graph links 50%.
Calculating graph links 75%.
Calculating graph links 100%.
foo_spider_monkey_panel:
Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
invalid array length

File: music_graph_xxx.js
Line: 715, Column: 20
Stack trace:
  histogram@music_graph_xxx.js:715:20
  graphStatistics@music_graph_xxx.js:770:2
  async*func@buttons_sbd_menu_config.js:598:5
  _menu/this.btn_up/<@menu_xxx.js:305:15
  _menu/this.btn_up@menu_xxx.js:295:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 142 foobar2000

Another, when no track is selected and I press the button. With the default settings. I don't know exactly how to reproduce it, but I tried before some options in the Set pre-scoring filters menu.

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
tracks is undefined

File: scatter_by_tags.js
Line: 262, Column: 21
Stack trace:
  shuffleByTags/<@scatter_by_tags.js:262:21
  shuffleByTags@scatter_by_tags.js:259:11
  do_searchby_distance@search_bydistance.js:1578:21
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:57:5
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 147 foobar2000

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I compared the results with a version from two or three months ago. I found very similar results with the Weight method. With the Graph method, the results have changed. I see in the console that the similarity scores are the same, and the Graph scores are higher overall. I see that there were changes in the Changelog, I guess that's why.

This is the first time I've had fast results with foobar v2. Before it took about 10 seconds. Thank you very much for your help and for all the improvements. I guess it's good news if the internal changes are not visible.
A detail: now I can put an empty value directly in Remap tags with []. Before it would restore the default value.

I saw another site where the Folk, World, & Country tag is used. But anyway, I agree with what you wrote here and in the Readmes.
Thanks for the tips on Title Formatting. I've tried it. This answers another question I had: Since there is only one custom string, how to differentiate tags coming from different sources or models. This seems appropriate for the genres calculated by AcousticBrainz which do not always correspond to reality, and which have different definitions for the same genre name. Dortmund Jazz does not necessarily equal Rosamerica Jazz and does not necessarily equal real jazz. I imagine adding the name of the source before the values. I know it won't work with the Graph method, but maybe with the similarity score, or recipes with Weight method, there is also the weight setting. Now I know it is possible with Title Formatting as you have shown.
I thought of this expression:
"[$replace($insert($meta_sep(DISCOGS_GENRE,', 'Discogs ),Discogs ,0),Folk',' World',' & Country,Folk World & Country)]".
A difference with this expression is that the lack of value gives "" in the tag cache, before it was "?".

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I compared the results with a version from two or three months ago. I found very similar results with the Weight method. With the Graph method, the results have changed. I see in the console that the similarity scores are the same, and the Graph scores are higher overall. I see that there were changes in the Changelog, I guess that's why.

Yep, there have been some improvements on the calculations (and some bugs fixed). That's said, the results are dependent on your settings, which you can fine tune (weights and score filter), but the internals should better reflect now the similarity.

This is the first time I've had fast results with foobar v2. Before it took about 10 seconds. Thank you very much for your help and for all the improvements. I guess it's good news if the internal changes are not visible.
A detail: now I can put an empty value directly in Remap tags with []. Before it would restore the default value.

That's right. Doing so will not use the tag, which is intended behavior. Previously was wrong.

This is the first time I've had fast results with foobar v2. Before it took about 10 seconds. Thank you very much for your help and for all the improvements. I guess it's good news if the internal changes are not visible.

My cache attempts are anyway a dirty patch for something which should be fixed by Peter on the main program; I would suggest you to report it anyway on the Foobar forums...In particular here:
https://hydrogenaud.io/index.php/topic,123044.msg1016438.html#msg1016438
I find foobar v2 unusable for me and you will experience really slow processing in other scripts of mine which heavily rely on tag usage, while they take a few ms on foobar v1.

If you find any particular use-case where processing time is clearly much higher on v2, please open a new issue pointing to it (so I can have a clear view of the things I should focus on for V2). That part will take some time though.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I saw another site where the Folk, World, & Country tag is used. But anyway, I agree with what you wrote here and in the Readmes.

I know... well my design philosophy is linking genres by similarity, which requires some kind of uniqueness. Allowing things like that would go against that base; although as said nothing stops you to use it like that with the TF remap. I added a note about it on the readme.

This seems appropriate for the genres calculated by AcousticBrainz which do not always correspond to reality, and which have different definitions for the same genre name. Dortmund Jazz does not necessarily equal Rosamerica Jazz and does not necessarily equal real jazz. I imagine adding the name of the source before the values. I know it won't work with the Graph method, but maybe with the similarity score, or recipes with Weight method, there is also the weight setting. Now I know it is possible with Title Formatting as you have shown.

Custom string is compared against custom string values, so they don't get mixed with the genre/styles neither used on the graph, right.

Now... if you are talking about putting genre_dortmund and genre_rosamerica, both on the same stag slot.... yep, that would mean all values would be joined together and compared without caring about the "source". You can fix that with TF as you noted. BUT scoring is affected. If you add a prefix to the source, then you are not matching 10 values against 10 values, but 3 to 10. And the max score would always be 3/10.... not really giving you the results you want.

At some point I plan to add unlimited custom tags, so you could have lets say 3 custom tags, which would not be mixed. One slot for genre_dortmund and another one for genre_rosamerica for ex. That would cover any use-case. I have not given that any priority because that doesn't really bring something new to the table.... since it's simple string matching.

I would prefer to implement a real code logic to use things like genre_rosamerica or genre_dortmund, but let's say unlimited custom tags is on roadmap.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I thought of this expression:
"[$replace($insert($meta_sep(DISCOGS_GENRE,', 'Discogs ),Discogs ,0),Folk',' World',' & Country,Folk World & Country)]".
A difference with this expression is that the lack of value gives "" in the tag cache, before it was "?".

Not sure what you are trying but that gives me this result on tracks not having the tag, which I don't think it's intended.
Discogs

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I've seen other errors.
Ctrl + Shift menu > Special playlist rules > Recursive playlist creation, uses output as new references

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
do_searchby_distance(...) is not iterable

File: search_bydistance.js
Line: 1607, Column: 57
Stack trace:
do_searchby_distance@search_bydistance.js:1607:57
async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:57:5
themedButton/this.onClick@buttons_xxx.js:297:21
@buttons_xxx.js:480:21
fireEvents/</<@callbacks_xxx.js:148:37
fireEvents/<@callbacks_xxx.js:145:30

Fixed.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Another, when no track is selected and I press the button. With the default settings. I don't know exactly how to reproduce it, but I tried before some options in the Set pre-scoring filters menu.

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
tracks is undefined

File: scatter_by_tags.js
Line: 262, Column: 21
Stack trace:
  shuffleByTags/<@scatter_by_tags.js:262:21
  shuffleByTags@scatter_by_tags.js:259:11
  do_searchby_distance@search_bydistance.js:1578:21
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:57:5
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 147 foobar2000

This one will require some time... It's not possible to run the button when there is no selection. In case you have nothing selected (try it), it takes the focused track, which may be the first track on a playlist. And if you have an empty playlist, it does nothing.
So it points to other error I can not find.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

This one seems to come from my settings (with several remapped tags), because it worked without error on a new portable installation. Ctrl + Shift menu > Debug and testing > Graph statistics This is the console :

Called: Debug and testing\Graph statistics
Calculating graph links 0%.
Calculating graph links 25%.
Calculating graph links 50%.
Calculating graph links 75%.
Calculating graph links 100%.
foo_spider_monkey_panel:
Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
invalid array length

File: music_graph_xxx.js
Line: 715, Column: 20
Stack trace:
  histogram@music_graph_xxx.js:715:20
  graphStatistics@music_graph_xxx.js:770:2
  async*func@buttons_sbd_menu_config.js:598:5
  _menu/this.btn_up/<@menu_xxx.js:305:15
  _menu/this.btn_up@menu_xxx.js:295:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:297:21
  @buttons_xxx.js:480:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 142 foobar2000

It seems so. I know where the error comes from though, it essentially warns about trying to make an histogram with infinite columns... which would only happen if when there is no "data". And that points to some kind of weird tag remapping, yep.
Could you post your tag settings? And then try with this file, it should bypass the error. Post me the results.
music_graph_xxx.zip

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

This one will require some time... It's not possible to run the button when there is no selection. In case you have nothing selected (try it), it takes the focused track, which may be the first track on a playlist. And if you have an empty playlist, it does nothing.
So it points to other error I can not find.

I reproduced it:

  • I tried some options in the "Set pre-scoring filters" menu. It created playlists.
  • Ctrl + Shift menu > Reset to default.
  • Click on the button without selecting anything

Here is my console: Gist

Capture d'écran 148 foobar2000

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

This one will require some time... It's not possible to run the button when there is no selection. In case you have nothing selected (try it), it takes the focused track, which may be the first track on a playlist. And if you have an empty playlist, it does nothing.
So it points to other error I can not find.

I reproduced it:

* I tried some options in the "Set pre-scoring filters" menu. It created playlists.

* Ctrl + Shift menu > Reset to default.

* Click on the button without selecting anything

Here is my console: Gist

Capture d'écran 148 foobar2000

Can not reproduce it. Must be something related to your files (and their tags). Try with this file, the console log will output more things now.
scatter_by_tags.zip

Note you are calling the button on different tracks each time, it has nothing to do with the 'Reset to defaults' or the filters. This is the track crashing:

Using selection as reference: 05 - If you could let me be (file://D:\Audio\Musique\Pop, rock\Jeanne Added\2020 - Air\05. If you could let me be.flac)

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

. Try with this file, the console log will output more things now.
scatter_by_tags.zip

Here it is

I see "hugar". I don't know if it's that, but there are special characters in the name of the album and the songs and in the name of the composer.
https://musicbrainz.org/release/6ebb2773-9ea3-4640-a2aa-4767a9764d20
https://www.discogs.com/release/14102594-Hugar-Var%C3%B0a

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I reproduced this bug with Debug and testing > Graph statistics.

Capture d'écran 149 foobar2000

There doesn't seem to be any remapping, it looks like the default properties (no I see lines 72 and 73).
Here are the current panel properties.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

Could you post your tag settings? And then try with this file, it should bypass the error. Post me the results.
music_graph_xxx.zip

I tried with your file. It crashed. Here is the console.

Capture d'écran 150 foobar2000

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Thing is I can not reproduce your error in any way.
music_graph_xxx.zip

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

Here is the console with the new file.

Capture d'écran 151 foobar2000

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

music_graph_xxx.zip
Have zero idea what's going on. Clean properties from panel, reload script, reset link cache on debug and reset tags cache on debug. Then retry.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

Here it is. I did what you asked. No error this time. I don't know what happened.
Thanks for your help.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I thought of this expression:
"[$replace($insert($meta_sep(DISCOGS_GENRE,', 'Discogs ),Discogs ,0),Folk',' World',' & Country,Folk World & Country)]".
A difference with this expression is that the lack of value gives "" in the tag cache, before it was "?".

Not sure what you are trying but that gives me this result on tracks not having the tag, which I don't think it's intended. Discogs

Maybe the outside brackets are missing, this is only a part. The complete expression is:
["GENRE","[$replace($insert($meta_sep(DISCOGS_GENRE,', 'Discogs ),Discogs ,0),Folk',' World',' & Country,Folk World & Country)]"] , and it gives me results like this. The result is what I was trying to do. Separate a source with a prefix. The question marks don't seem important. I hadn't thought about the score.

Unlimited custom tags: I had thought of additional tags, but didn't dare to ask. So unlimited tags, yes that would be nice, but I don't know if many people will use it.
From what little I have seen, there now seem to be other models that are perhaps different or better than the AcousticBrainz ones (but to make them work on windows, I don't know at all).

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

["GENRE","[$replace($insert($meta_sep(DISCOGS_GENRE,', 'Discogs ),Discogs ,0),Folk',' World',' & Country,Folk World & Country)]"]

I suppose the '?' is related to GENRE not being on those tracks, and "" value when the second one is missing. I will see how to avoid that, but meanwhile add "?" to the list of values filtered.
image

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I suppose the '?' is related to GENRE not being on those tracks, and "" value when the second one is missing.

Yes that's right. I checked by looking at the tags in my files. It's not because they are mp3s, it's the same for mp3s and flacs that don't have tags. The second empty value, I think it's because I used square brackets, to have a result only when the value is present. And the question mark is when the Genre tag is empty. I have very few Style tags, and the %STYLE% file in js_data\tagsCache is full of "?".
Thanks for the advice.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I tried the [custom-tags] branch, with a new foobar2000 v2.0 beta 16 x86 portable. It looks promising.
When I load the file the first time, it asks me if I want to look for the missing genres in the graph. If I put yes, it crashes.

Capture d'écran 160 foobar2000

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
properties.genreTag is undefined

File: search_bydistance.js
Line: 1643, Column: 4
Stack trace:
  findStyleGenresMissingGraphCheck@search_bydistance.js:1643:4

Capture d'écran 162 foobar2000

Something similar with Debug and testing > Find genres/styles not on Graph :

properties.genreTag is undefined

File: buttons_sbd_menu_config.js
Line: 578, Column: 6

First try, when I click on the button, without setting :
(If I remove the "Read tags from cache instead of files?" option, it works.)

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
Object.keys(...).map(...).push(...).map is not a function

File: search_bydistance.js
Line: 891, Column: 6
Stack trace:
  searchByDistance@search_bydistance.js:891:6
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:61:5
  themedButton/this.onClick@buttons_xxx.js:323:21
  @buttons_xxx.js:506:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 165 foobar2000

The default search method is Graph. Wasn't it Weight before?

I tried to add a new custom tag. It might be easier with examples or definitions for the questions:
Enter name: (should it be TAG or ["tag"]?)
Is a string?
Uses absolute range?

When I change the weight of Genre or Style:

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
properties[key] is undefined

File: buttons_sbd_menu_config.js
Line: 223, Column: 20
Stack trace:
  func@buttons_sbd_menu_config.js:223:20
  _menu/this.btn_up/<@menu_xxx.js:317:15
  _menu/this.btn_up@menu_xxx.js:307:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:323:21
  @buttons_xxx.js:506:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 167 foobar2000

When I change the scoring method, for example:
Set Tags and weighting > Style > Scoring... > LINEAR / LOGARITHMIC / LOGISTIC / NORMAL,
the checkbox in the contextual menu no longer appears.

I take this opportunity to point out an error that is there on the main branch, when I delete or move a file:

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
libItems.forEach is not a function

File: helpers_xxx_tags_cache.js
Line: 131, Column: 13
Stack trace:
  tagsCache.deleteTags/<@helpers_xxx_tags_cache.js:131:13
  tagsCache.deleteTags@helpers_xxx_tags_cache.js:128:11
  tagsCache.enable/this.listeners<@helpers_xxx_tags_cache.js:201:10
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 163 foobar2000

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

Have you seen this change with foobar 2.0 beta 13? (Change Log)
"Workarounds for poor performance of metadb_index operations compared to v1.x series (affects third party components only). "
I haven't done a serious before and after comparison, so I don't know.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Fixed all those, including the cache one (you can use the updated file on the main branch too). You will have to change the scoring again to get it working,

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Have you seen this change with foobar 2.0 beta 13? (Change Log) "Workarounds for poor performance of metadb_index operations compared to v1.x series (affects third party components only). " I haven't done a serious before and after comparison, so I don't know.

Yep, took a look at it. Have not done any test with a portable install yet.

I created a few threads bothering about the use of plugins like httpcontrol, mine, etc. and slow startup. So that may be it. But no idea if that will be just a small improvement or the end of tag caching.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

Thanks for the fixes.
There's that again when I click the button for the first time:
(If I remove the "Read tags from cache instead of files?" option, it works.)

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
Object.values(...).filter(...).map(...).push(...).map is not a function

File: search_bydistance.js
Line: 889, Column: 6
Stack trace:
  searchByDistance@search_bydistance.js:889:6
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:61:5
  themedButton/this.onClick@buttons_xxx.js:323:21
  @buttons_xxx.js:506:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 169 foobar2000

The default search method is Graph ?

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Should be fixed. And yes

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

It doesn't look like:

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
tagName.map is not a function

File: search_bydistance.js
Line: 889, Column: 39
Stack trace:
  searchByDistance/missingOnCache<@search_bydistance.js:889:39
  searchByDistance@search_bydistance.js:889:6
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:61:5
  themedButton/this.onClick@buttons_xxx.js:323:21
  @buttons_xxx.js:506:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 170 foobar2000

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024
  • I tried to reproduce my previous settings. Some songs have a different Graph score. I searched a little in the settings but I couldn't find why.

  • I can't uncheck the filters in Set pre-scoring filters > Additional pre-defined filters... > ... (in the main branch too)

  • Debug and testing > Reset tags cache

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
properties[key] is undefined

File: buttons_sbd_menu_config.js
Line: 619, Column: 146
Stack trace:
  func/keys<@buttons_sbd_menu_config.js:619:146
  func@buttons_sbd_menu_config.js:619:132
  _menu/this.btn_up/<@menu_xxx.js:317:15
  _menu/this.btn_up@menu_xxx.js:307:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:323:21
  @buttons_xxx.js:506:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 171 foobar2000

  • Other tools > Calculate similar artists tags
Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
newConfig.genreTag is undefined

File: search_bydistance_extra.js
Line: 18, Column: 19
Stack trace:
  calculateSimilarArtists@search_bydistance_extra.js:18:19
  calculateSimilarArtistsFromPls@search_bydistance_extra.js:129:24
  async*func@buttons_sbd_menu_config.js:564:5
  _menu/this.btn_up/<@menu_xxx.js:317:15
  _menu/this.btn_up@menu_xxx.js:307:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:339:21
  @buttons_xxx.js:522:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 174 foobar2000

  • Set playlist rules > DJ-like playlist creation + Harmonic mixing double pass
Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
keyHandle is not defined

File: search_bydistance.js
Line: 1330, Column: 26
Stack trace:
  searchByDistance/matchIdx<@search_bydistance.js:1330:26
  searchByDistance@search_bydistance.js:1326:47
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:61:5
  themedButton/this.onClick@buttons_xxx.js:339:21
  @buttons_xxx.js:522:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 175 foobar2000

  • With the option Set final sorting > Intercalate instrumental tracks
Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
genreWeight is not defined

File: search_bydistance.js
Line: 1458, Column: 25
Stack trace:
  searchByDistance@search_bydistance.js:1458:25
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:61:5
  themedButton/this.onClick@buttons_xxx.js:339:21
  @buttons_xxx.js:522:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 176 foobar2000

I did some testing in a portable foobar. I added custom tags. It works, it gave good results. That's great, congrats!
I'll be able to make all the settings per tag and per source that I want. Thanks a lot.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I tried to reproduce my previous settings. Some songs have a different Graph score. I searched a little in the settings but I couldn't find why.

There is nothing touched there, so that's on your side (or maybe you have new tracks, etc.). Different tags, or whatever. Are you sure you mean the GRAPH score and not the similarity score?
Ensumo l'abril - 79.3/100 Simil. - 0 Graph

I can't uncheck the filters in Set pre-scoring filters > Additional pre-defined filters... > ... (in the main branch too)

Can't reproduce it. They work fine here. Delete your forced query, and start from blank. I changed some things there since they were not working. (or give me more clues)

Debug and testing > Reset tags cache

Fixed now.

Other tools > Calculate similar artists tags

Will require some time, I discovered one thing I simplified I should "fix" too now. Fixed the crash, but maybe tomorrow I will make it to use any "graph" related tag, not just genre/style.

Set playlist rules > DJ-like playlist creation + Harmonic mixing double pass

Fixed now.

With the option Set final sorting > Intercalate instrumental tracks

And fixed. Maybe tomorrow I will make it to use any "graph" related tag, not just genre/style to look for "instrumental".

Now that tags are fully customizable, I have to consider the possibility of multiple "genre"-like tags at places not considered before.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

On next releases I plan to add a "share config" entry which will copy the config of the button to other panels, so tags only need to be set once. Because the idea is to have 3/4 customizable buttons loaded at the same time, each one with different sorting/special settings to create different types of playlists, not having to change all the config every time. Or well.... use recipes, that do the same.

And... loading a single button will not be supported anymore. You will have to load the buttons bar script, and then load the button you want from there. I will add a few presets the first time the bar is loaded, to make it easier.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

Thanks for the fixes and info.
There is one still there on the [custom-tags] branch.

Debug and testing > Reset tags cache

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
calcTags is not defined

File: buttons_sbd_menu_config.js
Line: 619, Column: 18
Stack trace:
  func@buttons_sbd_menu_config.js:619:18
  _menu/this.btn_up/<@menu_xxx.js:317:15
  _menu/this.btn_up@menu_xxx.js:307:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:339:21
  @buttons_xxx.js:522:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 179 foobar2000

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Fixed. Was a typo.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

There seems to be something else:
Debug and testing > Reset tags cache

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
can't access lexical declaration `tags' before initialization

File: buttons_sbd_menu_config.js
Line: 619, Column: 18
Stack trace:
  func@buttons_sbd_menu_config.js:619:18
  _menu/this.btn_up/<@menu_xxx.js:317:15
  _menu/this.btn_up@menu_xxx.js:307:24
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:40:27
  themedButton/this.onClick@buttons_xxx.js:339:21
  @buttons_xxx.js:522:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 181 foobar2000

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

I tried to reproduce my previous settings. Some songs have a different Graph score. I searched a little in the settings but I couldn't find why.

There is nothing touched there, so that's on your side (or maybe you have new tracks, etc.). Different tags, or whatever. Are you sure you mean the GRAPH score and not the similarity score? Ensumo l'abril - 79.3/100 Simil. - 0 Graph

Yes, that was it. Maybe it needed a Reset link cache. It happened to me again (but it's rare):

Kaleidoscope - 65.3/100 Simil. - 39.4 Graph       (main branch)
Kaleidoscope - 65.3/100 Simil. - 30.6 Graph       (custom-tags branch)

Midnight Sun - 65.6/100 Simil. - 22.3 Graph       (main branch)
Midnight Sun - 65.6/100 Simil. - 16.7 Graph       (custom-tags branch)

I can't uncheck the filters in Set pre-scoring filters > Additional pre-defined filters... > ... (in the main branch too)

Can't reproduce it. They work fine here. Delete your forced query, and start from blank. I changed some things there since they were not working. (or give me more clues)

In the [custom-tags] branch, with default settings (Only Stereo is checked):
Click on No Female vocals (Female vocals becomes checked too).
I can't remove No Female vocals by clicking on it (it remains checked in the menu).
Same with No Instrumentals and No Acoustic tracks.

And if I set Set Global Forced Query... to [], it doesn't do anything when I click on the button (I know it works if I don't put anything).

I'm not sure about all of this, but here's what I thought while testing:
With the default settings it's the same results between the [main] and [custom-tags] branches. And when I add a tag in the settings, I see small differences in the results (it's more frequent), more or less, even when I don't use the cache. I don't know. It's quite possible that it's a setting I didn't see.

In the [custom-tags] branch:
["TAG 1","TAG 2","TAG 3"] gives really different results than ["TAG 1"], ["TAG 2"] and ["TAG 3"] in several custom tags. And with this second configuration, the Graph scores are much less varied (often all 0, or three or four values out of 50 results), which is like doing a Weight calculation.

In the [custom-tags] branch:
I also see that ["GENRE","TAG 2","TAG 3"] gives some differences from ["GENRE"] (with weight at 0) + ["GENRE","TAG 2","TAG 3"] in a new custom tag.

I see in the %TITLE% cache file that if there is a comma in the title, the title is cut in two:

		[
			"file://D:\\Audio\\Feist - Pleasure (2017)\\03. Get not high, get not low.flac,0",
			[
				"Get not high",
				"get not low"
			]
		],

If I replace what is in the Other playlist attributes > Remove duplicates by ... option with this []:
In the [custom-tags] branch:

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
handleList is undefined

File: search_bydistance.js
Line: 916, Column: 22
Stack trace:
  searchByDistance@search_bydistance.js:916:22
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:61:5
  themedButton/this.onClick@buttons_xxx.js:339:21
  @buttons_xxx.js:522:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 182 foobar2000

Also in the main branch:

handleList is undefined

File: search_bydistance.js
Line: 990, Column: 22

In the [custom-tags] branch, if I set Genre to []:

Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
calcTags.genre is undefined

File: search_bydistance.js
Line: 719, Column: 3
Stack trace:
  searchByDistance@search_bydistance.js:719:3
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:61:5
  themedButton/this.onClick@buttons_xxx.js:339:21
  @buttons_xxx.js:522:21
  fireEvents/</<@callbacks_xxx.js:148:37
  fireEvents/<@callbacks_xxx.js:145:30

Capture d'écran 183 foobar2000

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

In the [custom-tags] branch, with default settings (Only Stereo is checked):
Click on No Female vocals (Female vocals becomes checked too).
I can't remove No Female vocals by clicking on it (it remains checked in the menu).
Same with No Instrumentals and No Acoustic tracks.

Got it. Fixed. It's really difficult to add pre-defined queries to an existing expression, since I have to check parentheses, the possibility of an expression being preceded by a NOT, etc. Think I finally fixed it.

And if I set Set Global Forced Query... to [], it doesn't do anything when I click on the button (I know it works if I don't put anything).

That works as intended (?). The query is not an array, is a string. If you want no query, put it blank. But if you put [] you are asking to look for [], which obviously gives no tracks (and this is stated at the console log). I don't think that's my problem, I mean if the user puts that in any search tool within foobar it's considered a valid query. I "could" add a check against queries returning nothing on a library, but that's just adding a new feature to check for user's error, not my fault.

If I replace what is in the Other playlist attributes > Remove duplicates by ... option with this []:
In the [custom-tags] branch:

This was never intended to be empty, but fixed now. Maybe users don't want duplication removal, so it's a valid setting.

In the [custom-tags] branch, if I set Genre to []:

Fixed.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

With the default settings it's the same results between the [main] and [custom-tags] branches. And when I add a tag in the settings, I see small differences in the results (it's more frequent), more or less, even when I don't use the cache. I don't know. It's quite possible that it's a setting I didn't see.

About your other tests, can't really understand your settings. Please send me some screenshots with how you configure tags, like this:
image
For all relevant tags you are changing. And the scores with a given reference track in all those cases.

A track should always give the same results whenever you use the same settings, Enable "Sort final playlist by scoring" and disable "Take randomly from pool". It will always output the same list of tracks ordered the same way. Then with that maybe I can find your problems... also I need to know how you are adding those tags. Which type of tags are those (the answers to the popups).

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

With the default settings it's the same results between the [main] and [custom-tags] branches. And when I add a tag in the settings, I see small differences in the results (it's more frequent), more or less, even when I don't use the cache. I don't know. It's quite possible that it's a setting I didn't see.

About your other tests, can't really understand your settings. Please send me some screenshots with how you configure tags, like this:
For all relevant tags you are changing. And the scores with a given reference track in all those cases.

To show that I don't always have the same result, with two new portable foobars (I used yesterday's versions):

Screenshots and logs.zip

  1. Load button, wait for calculations, name the button

  2. Enable "Sort final playlist by score" and disable "Take randomly from pool"

  3. Test: same results
    Screenshots 1 and 2

  4. Replace ["GENRE"] with ["GENRE","ACOUSTICBRAINZ GENRE"]
    (here is what can be found in my tag Acousticbrainz genre: gist)
    Reset link cache now? Yes
    Screenshots of the popup: 3 and 4
    Screenshots of the menu: 5 and 6

  5. New test: there are differences in the playlists.
    Screenshots 7 and 8
    Console Main : gist
    Console Custom-tags : gist

  6. I restart foobar. It seems to be a little different each time I restart (maybe that's the thing ?)
    Screenshots 9 and 10
    Console Main : gist
    Console Custom-tags : gist

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

Capture d’écran 2022-12-13 005953

Diff buttons_sbd_menu_config.js

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

With the default settings it's the same results between the [main] and [custom-tags] branches. And when I add a tag in the settings, I see small differences in the results (it's more frequent), more or less, even when I don't use the cache. I don't know. It's quite possible that it's a setting I didn't see.

About your other tests, can't really understand your settings. Please send me some screenshots with how you configure tags, like this:
For all relevant tags you are changing. And the scores with a given reference track in all those cases.

To show that I don't always have the same result, with two new portable foobars (I used yesterday's versions):

Screenshots and logs.zip

1. Load button, wait for calculations, name the button

2. Enable "Sort final playlist by score" and disable "Take randomly from pool"

3. Test: same results
   Screenshots 1 and 2

4. Replace ["GENRE"] with ["GENRE","ACOUSTICBRAINZ GENRE"]
   (here is what can be found in my tag Acousticbrainz genre: [gist](https://gist.github.com/username116/97e9f6681187721a5cf4ce4d40c68c75))
   Reset link cache now? Yes
   Screenshots of the popup: 3 and 4
   Screenshots of the menu: 5 and 6

5. New test: there are differences in the playlists.
   Screenshots 7 and 8
   Console Main : [gist](https://gist.github.com/username116/0bc7d03e840e04a49e3843cf4351d8d1)
   Console Custom-tags : [gist](https://gist.github.com/username116/39d14afdaa7a576c2fc8104a4543baee)

6. I restart foobar. It seems to be a little different each time I restart (maybe that's the thing ?)
   Screenshots 9 and 10
   Console Main : [gist](https://gist.github.com/username116/e559ae3fc4d7fb51fa78d89b8172dbfa)
   Console Custom-tags : [gist](https://gist.github.com/username116/7c594172dc99d70eb051a7cd8de84ba2)

There are a few misunderstandings on your side and things not related to my scripts.

First, if some tracks magically appear after restarting, that's related to Foobar or tags, not my scripts. If you check the scores, all are exactly the same before or after restarting, so the scores are not changing in fact as you previously reported. Now... why some tracks are added sometimes and not other times... a library error? A foobar bug related to tags? But you can clearly see the scoring is consistent across different tests, for the tracks that are present on all the tests.

You may compare tests done on the same session. And if all of them match, then there is no error. i.e. if you use the same reference track and run the scripts 4 times in a row, do the results match? There are zero lines of code related in any way to foobar startup which could affect how tags are retrieved (at least in fb 1.6 without cache)-

Second, ["GENRE"] vs ["GENRE","ACOUSTICBRAINZ GENRE"] will give different results by design. Because the scoring will be different since you are adding 4 more values to compare. So tests at point 3 will be different than those at point 5 and 6. I think you already know that, but just to be sure. This only taking into consideration the weight/scoring part.

Now, tests at point 5 and 6 should give the same results. And they do, if we ignore the foobar bug related to your library.

Third, the misunderstanding... you are adding "ACOUSTICBRAINZ GENRE" to a tag which will be checked against the graph and that's plainly wrong. There is no value on that tag (for ex. Dortmund Electronic) present on the graph, so you are just increasing the processing time and also polluting the graph scoring because everytime the genre/style values are compared you are comparing +4 values against a set of other +4 values, when 4 of them will never match. (*)

The proper way to do it on the new branch is adding a new custom tag, not included for the graph calculations, and add there "ACOUSTICBRAINZ GENRE". Note ["GENRE"] vs ["GENRE","ACOUSTICBRAINZ GENRE"] vs ["GENRE"] & ["ACOUSTICBRAINZ GENRE"] all give different results, as intended. They are not equivalent.

Also you should check all your genre/styles tags are present on the graph (with the tool given); and in case they are not, either re-tag properly the files or add substitutions to the user descriptor file.

(*) Now, I could think about adding those genre models to the graph. But have to cautious about it, since they are just musical groups (like R&B cluster), not specific genres. There is another thing I "found", genre/styles not present on graph are not counted for the graph distance BUT are counted to calculate the mean. So adding 4 values to the genre tag which are never matched also interfere with the graph distance, I may look at it but that's not related at all to your problem.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Let's try with tests on the same session. Make sure these are set to true.
image

Also try the "Run distance tests" and "Debug graph".

If you find nothing wrong in that case, try looking for errors in your library (?)
image

Also, you could try checking the tags. I mean... if some tracks sometimes appear and others not, that's because the tags loaded by foobar are different. You may check that with the tags panel or try to reload tags.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

That's said, maybe we can finetune the search of this problem if you isolate the reference track and the 43 tracks which are output, add them to a portable installation and check from there. Since there would be no more tracks, the results/tags/etc. can be easily checked. I could even test it by myself on my system in such case, since I have not been able to replicate any of your results with those steps and my own library.

from search-by-distance-smp.

username116 avatar username116 commented on May 30, 2024

so the scores are not changing in fact as you previously reported.

Yes it's with other settings.

You may compare tests done on the same session. And if all of them match, then there is no error. i.e. if you use the same reference track and run the scripts 4 times in a row, do the results match?

4 searches in a row in the same session (as long as I don't restart foobar) give the same results in the same foobar. The results do not change in the session. But there are small differences between the two foobars, for this reference track, as the screenshots show.

you are adding "ACOUSTICBRAINZ GENRE" to a tag which will be checked against the graph and that's plainly wrong. There is no value on that tag (for ex. Dortmund Electronic) present on the graph

Yes I know, I did that for the comparison. I thought it would be simpler this way, there were no additional settings for custom tags (here I have a doubt about the right setting to make it comparable). I did this to show that I wasn't dreaming when I said I saw differences (and you asked for screenshots).
And it seemed to me that the differences increased when I put more tags in the settings (I'm not sure about that).

(*) Now, I could think about adding those genre models to the graph. But have to cautious about it, since they are just musical groups (like R&B cluster), not specific genres.

Maybe they correspond to acoustic characteristics (rhythm, dynamics, I don't know), but I don't think these models are reliable enough to be compared to real genres. Or I really wonder where they will be on the graph. For example Enter Sandman by Metallica is Gtzan Jazz (at least on this analysis - instead of Gtzan Metal or Gtzan Rock). A piece of classical music is also Gtzan Jazz and Dortmund Electronic. That's why I put prefixes, so they don't get mixed up. And I think it gives me accoustic similarities, maybe like the moods of AcousticBrainz. But maybe there are more reliable models. Now with ilimited custom tags, I can change the way I make my tags.

Also try the "Run distance tests" and "Debug graph".

"Run distance tests" gives the same results, it looks good. "Debug Graph": All tests passed.

If you find nothing wrong in that case, try looking for errors in your library (?)

The "Show errors" button remains grayed out, I guess there are no errors. I did the right click: "Rescan now". But it doesn't change the results.

Capture d'écran 218 foobar2000

Also, you could try checking the tags. I mean... if some tracks sometimes appear and others not, that's because the tags loaded by foobar are different. You may check that with the tags panel or try to reload tags.

I tried to do the right click "Tagging > Reload info from files". The search results do not change.
Not all tags appear in the Selection Properties panel in Default UI (I'm not talking about the right click > Properties. I didn't see any differences there). With columns UI on another foobar, I didn't see any difference on these two tags (for a disappearing song) on the Item properties panel, before and after restart.

if you isolate the reference track and the 43 tracks which are output, add them to a portable installation and check from there. Since there would be no more tracks, the results/tags/etc. can be easily checked.

I did that. I put in the library only a folder with the 43 songs. There the results are identical (and instantaneous!) in both foobars: 43 songs in both.
Yes, maybe something with the library as you say.

Thanks for the attention and time spent on this, and the advice, and sorry because this issue does not seem to be caused by your script.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

I did that. I put in the library only a folder with the 43 songs. There the results are identical (and instantaneous!) in both foobars: 43 songs in both.
Yes, maybe something with the library as you say.

I have had problems lately with tagging tracks on foobar 1.6 too btw, Sometimes when I tag hundred of tracks, at the same time, adding a new tag... some other tag disappears randomly in a few of them. I have not been able to reproduce it on purpose but it definitely has happen to me 3 or 4 times, so maybe this is related to it. I will create a report on the forum, maybe there is real bug here.

Maybe they correspond to acoustic characteristics (rhythm, dynamics, I don't know), but I don't think these models are reliable enough to be compared to real genres. Or I really wonder where they will be on the graph. For example Enter Sandman by Metallica is Gtzan Jazz (at least on this analysis - instead of Gtzan Metal or Gtzan Rock). A piece of classical music is also Gtzan Jazz and Dortmund Electronic. That's why I put prefixes, so they don't get mixed up. And I think it gives me accoustic similarities, maybe like the moods of AcousticBrainz. But maybe there are more reliable models. Now with ilimited custom tags, I can change the way I make my tags.

According to the docs they are "real" genres, BUT the problem is how to design it. Picard tags a track with all 4 models at the same time. You added a prefix, but by default it would be something like...
image
Can't do anything useful with that, because the Electronic model (2n value) only applies when the track is really a electronic track. So the "ambient" tag should be discarded here. Then, that track is in fact a rock track, so the jazz GTzan value is also noise (4th value), the same than the Dortmund electronic value (1st value).
After thinking about it, there is no easy way to selectively discard/use some of those 4 tag values, without some kind of base reference. That's said, they can be put in their own custom tag and just skip the graph thing. That's fine. Similar tracks would in fact match the 4 values.

from search-by-distance-smp.

regorxxx avatar regorxxx commented on May 30, 2024

Btw on the presets folder there are tons of scripts to make use of the acousticbrainz tags to add things like brightness, acousticness, etc., the language (although it requires some manual correction sometimes), instruments (without the performers) or the folksonomy tags from last.fm too.
image

image

image

image

BUT take in mind adding more and more tags to the comparison will probably narrow down the results unless you also alter the min. scoring and the weights, etc.

Also whenever a tag is missing it scores 0% for it, I have yet to add a config to consider it a 100% match in such case. That way if you use a track with instruments, when you compare it against tracks without that tag, you may choose to either consider it totally different, or matching all by default. (or even allow to add a base value like 75% by default) This way the similarity score would be calculated with just the other tags, but not so penalized due to missing tags.

from search-by-distance-smp.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.