Git Product home page Git Product logo

regorxxx / search-by-distance-smp Goto Github PK

View Code? Open in Web Editor NEW
35.0 3.0 7.0 35.78 MB

An implementation of Music-Graph for foobar2000, using Spider Monkey, which creates intelligent "spotify-like" playlist using high-level data from tracks and computing their similarity using genres/styles.

Home Page: https://regorxxx.github.io/foobar2000-SMP.github.io/scripts/search-by-distance-smp/

License: GNU Affero General Public License v3.0

JavaScript 97.28% HTML 2.68% Batchfile 0.01% CSS 0.03%
foobar2000 foobar2000-component foobar2000-smp-script playlist-generator music

search-by-distance-smp's Introduction

Search-by-Distance-SMP

version CodeFactor Codacy Badge GitHub
An implementation of Music-Graph for foobar2000 using Spider Monkey Panel, which creates intelligent "spotify-like" playlist using high-level data from tracks and computing their similarity using genres/styles.

Animation11

Features

Creates playlists using high-level data from tracks similar to the currently selected one according to genre, style, key, etc. When their score is over a threshold, they are included in the final pool. After all tracks have been evaluated and the final pool is complete, some of those tracks are chosen to populate the playlist. You can choose whether this final selection is done according to score, randomly, using Harmonic mixing rules, etc. All settings are configurable via button's menus (on customizable button) or the properties panel (static buttons).

To use this plugin at its best and to benefit the most from your library, you will want to make sure that your songs have the most possible information on genre, style, key, moods, etc.

Graph method

There are 3 methods to calculate similarity between tracks: WEIGHT, GRAPH (see above) and DYNGENRE.

  • WEIGHT: -> Score
    Calculates similarity (score) according to tags. Similarity is calculated by simple string matching ('Rock' != 'Soul'), range comparison for numeric tags and a special algorithm for Key tags (harmonic mixing). This means some coherence in tags is needed to make it work, and the script only works with high level data (tags) which should have been added to files previously using manual or automatic methods (like MusicBrainz Picard, see note at bottom).

  • GRAPH: -> Score + Distance
    Apart from scoring, it compares the genre/styles tags to the ones of the reference track using a graph and calculating their minimum mean distance. Imagine Google maps for genre/styles, and looking for the distance from Rock to Jazz for ex. Note this is totally different to simple string matching, so 'Acid Rock' may be similar to 'Psychedelic Rock' even if they are totally different tag values (or strings). This method is pretty computational intensive (but tons of optimizations have been taken in place).

  • DYNGENRE: -> Score + Simplifed Distance Uses a simplification of the GRAPH method. Let's say we assign a number to every "big" cluster of points on the music graph, then we can simply put any genre/style point into any of those clusters and give them a value.

Other features

  • Fully configurable tag remmaping, weights, etc.
  • The comparison pool can be filtered with multiple filters:
    • Global forced query (for example to always exclude live tracks).
    • Dynamic queries based on the reference track.
    • Genre cultural filters.
    • Artist cultural filters (using World-Map-SMP's database).
    • Similar artists.
    • Genre influences.
  • The final selection can be choosen from the pool following 4 methods.
  • The final selection (aka playlist) can be sorted following 3 methods:
    • Smart shuffle: like Spotify, intercalating artists with configurable bias.
    • Scattering instrumentals: Intercalate instrumental tracks breaking clusters if possible.
    • By score.
    • Randomly.
  • Recursive playlist creation (where output tracks are used as new references, and so on).
  • Influences and anti-influences playlists.
  • There are some custom buttons which may be set according to user preferences, even its own name: 'buttons_search_bydistance_customizable.js'.
  • Computing of 'Similar artist' tags using tracks from your library (and thus not based on popularity like online sources).
  • Much more...

Animation12

Note about editing 'helpers/music_graph_descriptors_xxx.js' or user file

Graph behavior, new genres or substitutions may be tweaked by the use. Changes to the descriptors may be added to an user file instead of editing the original descriptor: 'helpers/music_graph_descriptors_xxx_user.js'. Check sample for more info.

Also integrates

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

Draw Graph_05

Compatible with (toolbar)

  1. Playlist-Tools-SMP: Offers different pre-defefined examples for intelligent playlist creation.
  2. Device-Priority-SMP: Automatic output device selection.
  3. ListenBrainz-SMP: Integrates Listenbrainz's feedback and recommendations.
  4. Autobackup-SMP: Automatic saving and backup of configuration and other data in foobar2000.

playlist_tools_menu_05

Installation

See _TIPS and INSTALLATION (txt) and the Wiki. Not properly following the installation instructions will result in scripts not working as intended. Please don't report errors before checking this.

search-by-distance-smp's People

Contributors

imgbotapp avatar regorxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

search-by-distance-smp's Issues

Remap tags menu errors

I have an error in the Remap tags menu of the customizable button.

Ctrl + Shift + click > Remap tags > Set genre tag
Put GENRE,STYLE or GENRE,A for example, it doesn't matter. And OK.
See error.

'Set style tag' is concerned too.

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

File: buttons_sbd_menu_config.js
Line: 377, Column: 21
Stack trace:
  func@buttons_sbd_menu_config.js:377:21
  _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:42: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

foobar2000

This is a new button used alone, there was no other settings before. I tried with a new portable installation foobar2000 v2.0 beta 12 x86 + Spider Monkey Panel v1.6.1 + the current Search-by-Distance-SMP code downloaded today.

I see other errors in this menu, but maybe it's better to see them one by one in this report, if they are still present?

No results with remapped tag

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

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

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.

[FEATURE] Unlimited custom tag slots

Add support for unlimited custom tag slots. For strings/numbers.

Current approach mixes values from different tags, by design, which limits the usage of ML tags like those from AcousticBrainz:
#8 (comment)

[BUG] missing property (baseScore)

I'm using the customizable search by distance button. I add a new custom tag. This message appears:

Error on tags settings.
To fix it, restore defaults on affected tags (customizable button) or globally (non-customizable buttons). These options are usually found by Shift + L. Clicking on the button. Then reload the panel.
If the error continues, report it as a bug.
------------------------------------------------------------------------
Tag missing property (baseScore): My tag name
Screenshots

Screenshot

Screenshot 2

I add a base score value and the messages disappear.
As this appears for each new custom tag, it seems that the default property is missing. Unless this is intentional.

[BUG] Recipe non valid: Similar genres (D)

Errors with recipes have been corrected in version 5.1.2, but one error remains:

Recipe non valid: Similar genres (D)

	- Recipe contains non valid key: dyngenreWeight
	- Recipe contains non valid key: dyngenreRange
Screenshots

1

2

I checked with a new portable installation. I've also tried 'Restore defaults...' for the dynGenre tag.

In the Similar genres (DYNGENRE) file, there's this:

{
	"name": "Similar genres (D)",
	"tags": {

(...)

		"dynGenre": {
			"weight": 40,
			"range": 2
		},

(...)

	},
	"scoreFilter": 70,
	"method": "DYNGENRE",
	"dyngenreWeight": 10,
	"dyngenreRange": 1
}

tagsCache.cacheLibraryTags is not a function

Hello,

I have an error with the customizable button, used alone. It happens when I click on the button, after creating and naming it. I haven't made any settings.

I tried with a new portable installation foobar2000 v2.0 beta 12 x86 + Spider Monkey Panel v1.6.1 + the current Search-by-Distance-SMP code downloaded today (not the release).

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

File: search_bydistance.js
Line: 923, Column: 21
Stack trace:
  do_searchby_distance@search_bydistance.js:923:21
  ["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:59: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 117 foobar2000

[BUG] tagNameTF.some is not a function

Describe the bug

I use the Search-by-Distance customizable button, with custom tags. With a certain configuration, I get this crash:

Error: Spider Monkey Panel v1.6.1-mod ({17ED3B57-8282-4682-8D93-A1390E2008B1}: Search by Distance Customizable Button v6.1.2 by regorxxx)
tagNameTF.some is not a function

File: search_by_distance.js
Line: 1049, Column: 31
Stack trace:
  searchByDistance@search_by_distance.js:1049:31
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:66:5
  themedButton/this.onClick@buttons_xxx.js:510:21
  @buttons_xxx.js:838:21
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30

To Reproduce

  1. Load buttons_toolbar.js, then insert a search-by-distance customizable button with the menu.
  2. Set Style weight to 0.
  3. Set Mood weight to 0.
  4. Add a MusicBrainz genre tag. Is multi-valued? Yes. Is a genre/style-like tag? No. Remap to MUSICBRAINZ_GENRE. Set weight to 2.
    {"weight":2,"tf":["MUSICBRAINZ_GENRE"],"baseScore":0,"scoringDistribution":"LINEAR","type":["multiple","string"]}
  5. Add a AB genre Gtzan tag. Is multi-valued? No. Are tag values strings? Yes. Is a genre/style-like tag? No. Remap to AB:GENRE_GTZAN. Set weight to 4.
    {"weight":4,"tf":["AB:GENRE_GTZAN"],"baseScore":0,"scoringDistribution":"LINEAR","type":["single","string"]}
  6. Click on the button to launch a search, see error.

Additional context

The complete configuration is as follows:

Tags used for scoring (from panel properties)

{
  "genre": {
    "weight": 15,
    "tf": ["GENRE"],
    "baseScore": 0,
    "scoringDistribution": "LINEAR",
    "type": ["string", "multiple", "graph"]
  },
  "style": {
    "weight": 0,
    "tf": ["STYLE"],
    "baseScore": 0,
    "scoringDistribution": "LINEAR",
    "type": ["string", "multiple", "graph"]
  },
  "dynGenre": {
    "weight": 15,
    "tf": [],
    "baseScore": 0,
    "scoringDistribution": "LINEAR",
    "type": ["number", "single", "virtual", "absRange"],
    "range": 1
  },
  "mood": {
    "weight": 0,
    "tf": ["MOOD"],
    "baseScore": 0,
    "scoringDistribution": "LINEAR",
    "type": ["string", "multiple", "combinations"],
    "combs": 6
  },
  "key": {
    "weight": 5,
    "tf": ["KEY"],
    "baseScore": 0,
    "scoringDistribution": "LOGARITHMIC",
    "type": ["string", "single", "keyMix", "keyRange"],
    "range": 3
  },
  "bpm": {
    "weight": 5,
    "tf": ["BPM"],
    "baseScore": 0,
    "scoringDistribution": "NORMAL",
    "type": ["number", "single", "percentRange"],
    "range": 50
  },
  "date": {
    "weight": 10,
    "tf": ["$year(%DATE%)"],
    "baseScore": 0,
    "scoringDistribution": "NORMAL",
    "type": ["number", "single", "absRange"],
    "range": 30
  },
  "composer": {
    "weight": 0,
    "tf": ["COMPOSER"],
    "baseScore": 0,
    "scoringDistribution": "LINEAR",
    "type": ["string", "multiple"]
  },
  "artistRegion": {
    "weight": 5,
    "tf": ["LOCALE LAST.FM"],
    "baseScore": 0,
    "scoringDistribution": "LOGISTIC",
    "type": ["string", "single", "virtual", "absRange", "tfRemap"],
    "range": 5
  },
  "genreStyleRegion": {
    "weight": 7,
    "tf": [],
    "baseScore": 0,
    "scoringDistribution": "LOGISTIC",
    "type": ["string", "single", "virtual", "absRange"],
    "range": 5
  },
  "MusicBrainz genre": {
    "weight": 2,
    "tf": ["MUSICBRAINZ_GENRE"],
    "baseScore": 0,
    "scoringDistribution": "LINEAR",
    "type": ["multiple", "string"]
  },
  "AB genre Gtzan": {
    "weight": 4,
    "tf": ["AB:GENRE_GTZAN"],
    "baseScore": 0,
    "scoringDistribution": "LINEAR",
    "type": ["single", "string"]
  }
}

Same on one line

{"genre":{"weight":15,"tf":["GENRE"],"baseScore":0,"scoringDistribution":"LINEAR","type":["string","multiple","graph"]},"style":{"weight":0,"tf":["STYLE"],"baseScore":0,"scoringDistribution":"LINEAR","type":["string","multiple","graph"]},"dynGenre":{"weight":15,"tf":[],"baseScore":0,"scoringDistribution":"LINEAR","type":["number","single","virtual","absRange"],"range":1},"mood":{"weight":0,"tf":["MOOD"],"baseScore":0,"scoringDistribution":"LINEAR","type":["string","multiple","combinations"],"combs":6},"key":{"weight":5,"tf":["KEY"],"baseScore":0,"scoringDistribution":"LOGARITHMIC","type":["string","single","keyMix","keyRange"],"range":3},"bpm":{"weight":5,"tf":["BPM"],"baseScore":0,"scoringDistribution":"NORMAL","type":["number","single","percentRange"],"range":50},"date":{"weight":10,"tf":["$year(%DATE%)"],"baseScore":0,"scoringDistribution":"NORMAL","type":["number","single","absRange"],"range":30},"composer":{"weight":0,"tf":["COMPOSER"],"baseScore":0,"scoringDistribution":"LINEAR","type":["string","multiple"]},"artistRegion":{"weight":5,"tf":["LOCALE LAST.FM"],"baseScore":0,"scoringDistribution":"LOGISTIC","type":["string","single","virtual","absRange","tfRemap"],"range":5},"genreStyleRegion":{"weight":7,"tf":[],"baseScore":0,"scoringDistribution":"LOGISTIC","type":["string","single","virtual","absRange"],"range":5},"MusicBrainz genre":{"weight":2,"tf":["MUSICBRAINZ_GENRE"],"baseScore":0,"scoringDistribution":"LINEAR","type":["multiple","string"]},"AB genre Gtzan":{"weight":4,"tf":["AB:GENRE_GTZAN"],"baseScore":0,"scoringDistribution":"LINEAR","type":["single","string"]}}

AB genre Gtzan type set to multiple instead of single: no crash

Mood weight set to 7: crash
Mood weight set to 8: no crash

MusicBrainz genre can have several Genres values.
AB genre Gtzan has one of these values: Blues, Classical, Country, Disco, Hiphop, Jazz, Metal, Pop, Rock

Screenshots

Screenshot

1

Desktop

  • OS: Windows 10
  • foobar2000 v2.1 preview 2023-12-11 x86
  • Spider Monkey Panel v1.6.1 mod
  • Search-by-Distance-SMP downloaded today, commit 4fb8de9

[TODO] Cultural distance

Describe the feature
Add cultural weighting by associating genre/styles to cultural regions.

Simplify to subregion/region, with no connection to real geographic distance. Meant to be used along other weightings not as a single cultural similarity score.

Additional context
Reuse region framework.

[BUG] Tag cache with empty values

Describe the bug
Tags not found on files may return a '?' or '' when having brackets.

Expected behavior
'' values are probably fine, since there must be a way to show the file has no tag, although array could be empty too.
? values should probably be filtered though. They are filtered now on the genre/style retrieval, but should be done globally.

Additional context
Add any other context about the problem here.

[FEATURE] Essentia

Hi,

This is not a request, it's just to let you know.

I've been able to use Essentia for a few days now, and I can find the same kind of results as with AcousticBrainz. I can calculate several genre and mood tags. It seems to me that the Tensorflow models are replacing the old Gaia models (I haven't made a comparison though).

I can use Essentia in 3 different ways:

  • on Windows with Python and Tensorflow
    I followed this step by step (with a few changes). It takes time. (I don't know if this procedure will always remain valid.)
    I can give my .whl file for windows x64 (the Python wheel). I don't know if it works, it would allow to go directly to step E. It would be much easier.

    Screenshot

    I've copied the messages here.
    Here the results are percentages, but it's just a formatting, initially the results are a number between 0 and 1 with many decimals, like this.

    cmd

    Example of a python script to calculate a mood

    In the working directory of your choice:
    In a tracks subfolder, I've placed my .flac audio file (adapt the path according to the name of your audio file).
    In a models subfolder, I've placed the .pb and .json files of the tensorflow models.
    (otherwise, you need to adapt the paths)
    Link to the 'happy' model for this example: .pb file, .json file.

    Copy this into a .py file, e.g. my_script.py:

    import json
    
    from essentia.standard import MonoLoader, TensorflowPredictMusiCNN
    
    audio_file = 'tracks/07. Dancing barefoot.flac'
    audio = MonoLoader(sampleRate=16000, filename=audio_file)()
    
    with open('models/mood_happy-musicnn-msd-2.json', 'r') as json_file:
        metadata = json.load(json_file)
    
    activations = TensorflowPredictMusiCNN(graphFilename='models/mood_happy-musicnn-msd-2.pb')(audio)
    
    for label, probability in zip(metadata['classes'], activations.mean(axis=0)):
        print(f'{label}: {100 * probability:.1f}%')

    (I don't claim it's a good script. Chances are it's a bad one.)

    In a command prompt, navigate to this working directory with the cd command, and launch the script with my_script.py in Windows, or python3 my_script.py in Ubuntu.

    A result:

    happy: 78.5%
    non_happy: 44.8%
    

    The other model files can be found here, or here with descriptions, or here.
    In the essentia repository, you'll find examples of python scripts and tutorials with Jupyter notebooks (so you can run code directly in the tutorial). Or simply start here: documentation. Or there are examples at the end of the article.

  • installation in WSL (Windows Subsystem for Linux) with Python and Tensorflow (I'm on Windows 10)

    Details

    (maybe there's a Windows feature to enable first elsewhere)
    Install WSL in PowerShell as administrator:

    wsl --install
    

    Possibly in PowerShell, if you get an error message:

    wsl --update
    

    If Ubuntu is not installed automatically (you know it's installed when it asks you to choose a username and password):

    wsl --install -d Ubuntu
    

    I had some difficulties with Debian to install Essentia, so I recommend Ubuntu (it's the default distribution).

    In an Ubuntu terminal, install Python:

    sudo apt install python3-pip
    

    Install essentia with this command:

    pip install essentia-tensorflow
    

    Screenshot

    The same script in an Ubuntu terminal:

    ubuntu

  • with essentia.js and converted Tensorflow models

    Details

    I've modified this demo page a little to use other genre and mood models. My version is here (repository). You need to open the console and look at the *. What I've done is a rough draft, then I found the other methods, so I didn't go much further.

    I'm not sure it works well in Firefox, apparently there are differences in how Firefox and Chrome work, so it's best to try it in a Chrome-based browser (Vivaldi in my case).

    I manage to run this page locally with some kind of server (the Live Preview extension in VS Codium), otherwise there are errors because of the scripts that are downloaded. I haven't looked any further.

    You need converted models for essentia.js (.bin + .json). Most of them are already on the models repository. Otherwise I've managed to do some conversions following this tutorial, but it doesn't work with all models.

bTagsCache is not defined

I have an error with the customizable button.

  • Load the script buttons_search_bydistance_customizable.js
  • Wait for the console to display : Calculating tags 100%. Calculating graph links 100%.
  • Name the button
  • Select a track and click on the button.
  • Wait 10 seconds.
  • Error
Error: Spider Monkey Panel v1.6.1 (Search by Distance Customizable Button: Search by Distance Customizable Button by xxx)
bTagsCache is not defined

File: remove_duplicates.js
Line: 256, Column: 6
Stack trace:
  removeDuplicatesV3@remove_duplicates.js:256:6
  do_searchby_distance@search_bydistance.js:955:23
  async*["Search by Distance Customizable"]<@buttons_search_bydistance_customizable.js:58: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 129 foobar2000

This is a new button used alone, there was no other settings before. I tried with a new portable installation foobar2000 v2.0 beta 12 x86 + Spider Monkey Panel v1.6.1 + the current Search-by-Distance-SMP code downloaded today.

Didn't you restore an old version?
56efb59
e8cbbd5

I keep downloading the latest version because there is something I can't get to work with the previous version (add a custom tag in Genre with Graph method, I can make another report after this one if needed).

[BUG] remove_duplicates.js

Hi,

Describe the bug
I have an error after an update today. The error appears when I click on the button (customizable button) to launch a search.

On a new portable installation with Search-by-Distance 36a7232, I get this:

Error: Spider Monkey Panel v1.6.1-mod ({598402E9-4AA5-4FA9-8FBC-9ABACC58FD3B}: Playlist Tools: Buttons Bar v1.1.0 by regorxxx)
dics[j] is undefined

File: remove_duplicates.js
Line: 312, Column: 69
Stack trace:
  removeDuplicates/</<@remove_duplicates.js:312:69
  removeDuplicates/<@remove_duplicates.js:312:49
  removeDuplicates@remove_duplicates.js:312:13
  searchByDistance@search_by_distance.js:1503:17
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:81:5
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30
Screenshot

Screenshot

On my main installation with Search-by-Distance 7c61181, I had a different line number, but I'm not sure because there are also personal modifications:

Details

Error: Spider Monkey Panel v1.6.1-mod ({63AB1237-372D-479D-984F-84E3C32C3665}: Playlist Tools: Buttons Bar v1.1.0 by regorxxx)
dics[j] is undefined

File: remove_duplicates.js
Line: 326, Column: 69
Stack trace:
  removeDuplicates/</<@remove_duplicates.js:326:69
  removeDuplicates/<@remove_duplicates.js:326:49
  removeDuplicates@remove_duplicates.js:326:13
  searchByDistance@search_by_distance.js:1503:17
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:81:5
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30
Screenshot

Screenshot

If I go back to commit 611816e on my main installation, there is no more error.

System info:

  • OS: Windows 10 x64 22H2
  • Related software: foobar2000 v2.1.5 x86 (portable installation) / foobar2000 v2.2 preview 2024-03-14 x86
  • Github commit: 36a7232 / 7c61181

[BUG] titleHandle is undefined

Describe the bug
I'm trying to test the new filter, and during my test I came across this bug.

Error: Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx)
titleHandle is undefined

File: search_by_distance.js
Line: 1945, Column: 32
Stack trace:
  searchByDistance@search_by_distance.js:1945:32
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:81:5
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:191:37
  fireEvents/<@callbacks_xxx.js:187:30

To Reproduce

  1. In a new panel, load buttons_toolbar.js
  2. Right-click to add a customizable button
  3. Select the WEIGHT method
  4. In the same submenu, set: Exclude any track with similarity lower than... to 50
  5. Set: Minimum in case there are not enough tracks... to 40
  6. Click on the button to launch a search
  7. See error

Screenshot

Screenshot

Screenshot

System info:

  • OS: Windows 10 x64 22H2
  • Related software: Foobar2000 v2.1.5 x86, portable installation
  • Github release: Search-by-Distance commit 893b2af

Edit: I have the same error, on a new portable installation, with last commit 8d9ea0e

Additional context

Console

Components loaded in: 0:00.020379
Configuration read in: 0:00.001688
foobar2000 v2.1.5 x86 [portable]
Watching: D:\Audio\Musique
Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}): initialized in 140 ms
Playlist #2 loaded in 0:00.000225
Album List refreshed in: 0:00.000234
User Interface initialized in: 0:00.338108
FFmpeg version: 6.0
Startup time : 0:00.442854
Album List refreshed in: 0:00.067196
Library initialized after 0:00.555131
Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx): initialized in 6752 ms
Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx): initialized in 289 ms
Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx): initialized in 274 ms
profiler (Music Graph: node list): 49ms
Buttons loaded: Search by Distance Customizable
Search by Distance: tags used for cache - %GENRE%|%STYLE%
Calculating tags 0%.
Calculating tags 25%.
Calculating tags 50%.
Calculating tags 75%.
Calculating tags 100%.
Calculating graph links 0%.
Calculating graph links 25%.
Calculating graph links 50%.
Calculating graph links 75%.
Calculating graph links 100%.
Search by Distance: New Cache - cacheLink
Search by Distance: New Cache - cacheLinkSet
Using selection as reference: 11 - To the dancers on the ice (file://D:\Audio\Musique\Pop, rock\Émilie Simon\2005 - La marche de l'empereur\11. To the dancers on the ice.flac)
Weight was not zero but selected track had no style tags for: [STYLE]
Weight was not zero but selected track had no mood tags for: [MOOD]
getZoneArtistFilter: no world map data available
Weight was not zero but selected track had no artist region tags for: [LOCALE LAST.FM]
Weight was not zero but selected track had no related tags for: [RELATED]
Weight was not zero but selected track had no unrelated tags for: [UNRELATED]
Items retrieved by query: 3474 tracks
Items retrieved by query (minus duplicates): 3331 tracks
foo_spider_monkey_panel:
Error: Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx)
titleHandle is undefined

File: search_by_distance.js
Line: 1945, Column: 32
Stack trace:
searchByDistance@search_by_distance.js:1945:32
["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:81:5
ThemedButton/this.onClick@buttons_xxx.js:604:21
@buttons_xxx.js:964:21
fireEvents/</<@callbacks_xxx.js:191:37
fireEvents/<@callbacks_xxx.js:187:30

[BUG] 0 Graph score with empty tags

Hi,

Describe the bug
Is it an expected result to have a 0 Graph score with values like this? :

  • Reference track:
    Custom tag A: Psychedelic Rock
    Custom tag B: Funk; Lounge; Psychedelic Soul

  • Some tracks in the results with a 0 Graph score:
    Custom tag A : (empty, no values)
    Custom tag B : (empty, no values)

These custom tags A and B are the only ones with the "graph" type.

Additional context
I've lowered the setting Set Search method > Minimum in case there are not enough tracks... to 50.

I've checked that these genres are present in the descriptors file.

I can provide a detailed description if required.

I've also seen 0 Graph scores with empty tags on both sides. But maybe that's what's expected.

Idea: show in the console next to the score, if the "graph" tags are empty for these tracks.

Desktop

  • OS: Windows 10
  • foobar2000 v2.1.1 x86, new portable installation
  • Spider Monkey Panel v1.6.1-mod, new panel without settings
  • Search-by-Distance-SMP downloaded today, commit 954791f

Different results with custom tag slot

Hi,

Maybe it's not a bug, it's something I don't understand.

Describe the bug

If I "move" the GENRE tag to a custom tag slot, the results are different. By move I mean: duplicate the tag and set the first one to 0. I sort results by score (not random). Shouldn't playlists be the same? Is the calculation of custom tag slots different?

To Reproduce

  1. Load buttons_toolbar.js, then insert a search-by-distance customizable button with the menu.
  2. Wait for cache calculation in console, and rename button.
  3. Uncheck option Set pool picking > Random picking (not sorted by score)
  4. Uncheck option Set final sorting > Smart Shuffle by Artist
  5. Choose a reference track, click on the button to launch a search with this first configuration (first screenshot)
  6. Set Tags and weighting > Genre > Set Weight to 0
  7. Set Tags and weighting > Genre > Remap... to []. Reset link cache now? No
  8. Set Tags and weighting > New tag.... Enter a name for the tag: Genre 2. Is multi-valued? Yes. Is a genre/style-like tag? Yes
  9. Set Tags and weighting > Genre 2 > Remap... to ["GENRE"]. Reset link cache now? No
  10. Set Tags and weighting > Genre 2 > Set Weight to 15
  11. With the same reference track, click on the button to launch a search with this second configuration (second screenshot). This playlist is different from the first.

Expected behavior
I don't understand why the playlists are different.

Screenshots

Playlist with 1st configuration (default)

1

Playlist with 2nd configuration

2

Desktop

  • OS: Windows 10
  • foobar2000 v2.1.1 x86, new portable installation
  • Spider Monkey Panel v1.6.1-mod, new panel without settings
  • Search-by-Distance-SMP downloaded yesterday, commit 68bf6bf

Additional context

1st configuration (default) : tags used for scoring (from panel properties)

{
   "genre": {
      "weight": 15,
      "tf": ["GENRE"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "graph"]
   },
   "style": {
      "weight": 15,
      "tf": ["STYLE"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "graph"]
   },
   "dynGenre": {
      "weight": 15,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["number", "single", "virtual", "absRange"],
      "range": 1
   },
   "mood": {
      "weight": 10,
      "tf": ["MOOD"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "combinations"],
      "combs": 6
   },
   "key": {
      "weight": 5,
      "tf": ["KEY"],
      "baseScore": 0,
      "scoringDistribution": "LOGARITHMIC",
      "type": ["string", "single", "keyMix", "keyRange"],
      "range": 3
   },
   "bpm": {
      "weight": 5,
      "tf": ["BPM"],
      "baseScore": 0,
      "scoringDistribution": "NORMAL",
      "type": ["number", "single", "percentRange"],
      "range": 50
   },
   "date": {
      "weight": 10,
      "tf": ["$year(%DATE%)"],
      "baseScore": 0,
      "scoringDistribution": "NORMAL",
      "type": ["number", "single", "absRange"],
      "range": 30
   },
   "composer": {
      "weight": 0,
      "tf": ["COMPOSER"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple"]
   },
   "artistRegion": {
      "weight": 5,
      "tf": ["LOCALE LAST.FM"],
      "baseScore": 0,
      "scoringDistribution": "LOGISTIC",
      "type": ["string", "single", "virtual", "absRange", "tfRemap"],
      "range": 5
   },
   "genreStyleRegion": {
      "weight": 7,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LOGISTIC",
      "type": ["string", "single", "virtual", "absRange"],
      "range": 5
   },
   "related": {
      "weight": 25,
      "tf": ["RELATED"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "virtual", "tfRemap", "bNegative"]
   },
   "unrelated": {
      "weight": -25,
      "tf": ["UNRELATED"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "virtual", "tfRemap", "bNegative"]
   }
}

2nd configuration

{
   "genre": {
      "weight": 0,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "graph"]
   },
   "style": {
      "weight": 15,
      "tf": ["STYLE"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "graph"]
   },
   "dynGenre": {
      "weight": 15,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["number", "single", "virtual", "absRange"],
      "range": 1
   },
   "mood": {
      "weight": 10,
      "tf": ["MOOD"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "combinations"],
      "combs": 6
   },
   "key": {
      "weight": 5,
      "tf": ["KEY"],
      "baseScore": 0,
      "scoringDistribution": "LOGARITHMIC",
      "type": ["string", "single", "keyMix", "keyRange"],
      "range": 3
   },
   "bpm": {
      "weight": 5,
      "tf": ["BPM"],
      "baseScore": 0,
      "scoringDistribution": "NORMAL",
      "type": ["number", "single", "percentRange"],
      "range": 50
   },
   "date": {
      "weight": 10,
      "tf": ["$year(%DATE%)"],
      "baseScore": 0,
      "scoringDistribution": "NORMAL",
      "type": ["number", "single", "absRange"],
      "range": 30
   },
   "composer": {
      "weight": 0,
      "tf": ["COMPOSER"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple"]
   },
   "artistRegion": {
      "weight": 5,
      "tf": ["LOCALE LAST.FM"],
      "baseScore": 0,
      "scoringDistribution": "LOGISTIC",
      "type": ["string", "single", "virtual", "absRange", "tfRemap"],
      "range": 5
   },
   "genreStyleRegion": {
      "weight": 7,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LOGISTIC",
      "type": ["string", "single", "virtual", "absRange"],
      "range": 5
   },
   "related": {
      "weight": 25,
      "tf": ["RELATED"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "virtual", "tfRemap", "bNegative"]
   },
   "unrelated": {
      "weight": -25,
      "tf": ["UNRELATED"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "virtual", "tfRemap", "bNegative"]
   },
   "Genre 2": {
      "weight": 15,
      "tf": ["GENRE"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["multiple", "string", "graph"]
   }
}

I've tried doing Reset link cache and restarting foobar with both configurations, it doesn't change the playlists.
I saw this several weeks ago, before the cache structure change. It's not a recent change.

[BUG] Menu with selected recipe

Describe the bug
I create a recipe and select it (with the Ctrl menu).
Then I try to open the Shift + click menu.

Error: Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx)
CheckMenuRadioItem failed:
Index is out of bounds

File: menu_xxx.js
Line: 465, Column: 34
Stack trace:
  _menu/this.checkMenu/<@menu_xxx.js:465:34
  _menu/this.initMenu/<@menu_xxx.js:586:4
  _menu/this.initMenu@menu_xxx.js:585:23
  _menu/this.btn_up@menu_xxx.js:617:30
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:60:27
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:191:37
  fireEvents/<@callbacks_xxx.js:187:30

To Reproduce

  1. In a new panel, load buttons_toolbar.js
  2. Right-click to add a customizable button
  3. Ctrl + click: Create recipe file with current config
  4. Enter Recipe name: my recipe
  5. Include tag remapping? Yes
  6. Also add additional variables? Yes
  7. The folder opens, the file is created.
  8. Ctrl + click: select "my recipe"
  9. Open Shift + click menu
  10. See error

Screenshot

Screenshot

Screenshot

System info:

  • OS: Windows 10 x64 22H2
  • Related software: Foobar2000 v2.1.5 x86, new portable installation
  • Github release: Search-by-Distance commit 7df4ae9

[BUG] Custom tag names displayed incorrectly in the menu

Describe the bug

Some words in custom tag names are displayed unexpectedly in the menu. I think this is due to a capitalization regular expression.

The words Genre, Style and Region display a slash or a space before them (screenshot 4).

To Reproduce

  1. Load buttons_toolbar.js, then insert a search-by-distance customizable button with the menu.
  2. Set Tags and weighting > New tag.... Enter a name for the tag: Genre 2.
  3. Set Tags and weighting > New tag.... Enter a name for the tag: Style 2.
  4. Set Tags and weighting > New tag.... Enter a name for the tag: Region 2 (screenshots 1, 2, 3).
  5. In the menu, new slots have an extra slash or space at the beginning of the name (screenshot 4).

Expected behavior

Slot names should be displayed correctly in the menu, without an extra slash or space.

Additional context

Tags used for scoring (from panel properties)

{
   "genre": {
      "weight": 15,
      "tf": ["GENRE"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "graph"]
   },
   "style": {
      "weight": 15,
      "tf": ["STYLE"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "graph"]
   },
   "dynGenre": {
      "weight": 15,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["number", "single", "virtual", "absRange"],
      "range": 1
   },
   "mood": {
      "weight": 10,
      "tf": ["MOOD"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple", "combinations"],
      "combs": 6
   },
   "key": {
      "weight": 5,
      "tf": ["KEY"],
      "baseScore": 0,
      "scoringDistribution": "LOGARITHMIC",
      "type": ["string", "single", "keyMix", "keyRange"],
      "range": 3
   },
   "bpm": {
      "weight": 5,
      "tf": ["BPM"],
      "baseScore": 0,
      "scoringDistribution": "NORMAL",
      "type": ["number", "single", "percentRange"],
      "range": 50
   },
   "date": {
      "weight": 10,
      "tf": ["$year(%DATE%)"],
      "baseScore": 0,
      "scoringDistribution": "NORMAL",
      "type": ["number", "single", "absRange"],
      "range": 30
   },
   "composer": {
      "weight": 0,
      "tf": ["COMPOSER"],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["string", "multiple"]
   },
   "artistRegion": {
      "weight": 5,
      "tf": ["LOCALE LAST.FM"],
      "baseScore": 0,
      "scoringDistribution": "LOGISTIC",
      "type": ["string", "single", "virtual", "absRange", "tfRemap"],
      "range": 5
   },
   "genreStyleRegion": {
      "weight": 7,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LOGISTIC",
      "type": ["string", "single", "virtual", "absRange"],
      "range": 5
   },
   "Genre 2": {
      "weight": 0,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["multiple", "string", "graph"]
   },
   "Style 2": {
      "weight": 0,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["multiple", "string", "graph"]
   },
   "Region 2": {
      "weight": 0,
      "tf": [],
      "baseScore": 0,
      "scoringDistribution": "LINEAR",
      "type": ["multiple", "string", "graph"]
   }
}

I found line 173 in the buttons_sbd_menu_config.js file.

If I remove the slash and the space before the $1, the new names are displayed correctly in the menu. But the two previous slots Artist Region and Genre/Style Region are displayed incorrectly (screenshot 5).

Screenshots

Screenshots

Screenshots 1, 2, 3:

1

2

3

Screenshot 4:

4

Screenshot 5:

5

Desktop

  • OS: Windows 10
  • foobar2000 v2.1, new portable installation
  • Spider Monkey Panel v1.6.1 mod, new panel without settings
  • Search-by-Distance-SMP downloaded a few days ago, commit 115ae3a

[BUG] Readme not found

I'm using the customizable search by distance button.

When I press Shift + click on the button to open the menu, the console says that the shuffle_by_tags readme file is missing.

Readme not found: D:\foobar-portable\profile\scripts\SMP\xxx-scripts\helpers\readme\shuffle_by_tags.txt
Screenshot

1

It's requested in the buttons_sbd_menu_config.js file on this line.

[BUG] Recipe error

Describe the bug
I use a customizable button. I create a recipe. When I run a search with this recipe, I get this error:

Error: Spider Monkey Panel v1.6.1-mod ({43278289-DA92-4882-9B7A-72C55888539A}: Playlist Tools: Buttons Bar v1.1.0 by regorxxx)
JSON.parse: unexpected character at line 1 column 1 of the JSON data

File: search_by_distance.js
Line: 895, Column: 31
Stack trace:
  searchByDistance@search_by_distance.js:895:31
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:81:5
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30

To reproduce
With a customizable button:

  1. Ctrl + click: Create recipe file with current config
  2. Enter Recipe name: my recipe
  3. Include tag remapping? Yes
  4. Also add additional variables? Yes
  5. The folder opens, the file is created.
  6. Ctrl + click: select "my recipe"
  7. Click on the button to do a search
  8. See error

Screenshot

Screenshot

1

Additional context
New portable installation with default settings.

my recipe.json

Another error when the recipe is selected, with Shift + click on the button

Error: Spider Monkey Panel v1.6.1-mod ({43278289-DA92-4882-9B7A-72C55888539A}: Playlist Tools: Buttons Bar v1.1.0 by regorxxx)
JSON.parse: unexpected character at line 1 column 1 of the JSON data

File: buttons_sbd_menu_config.js
Line: 42, Column: 23
Stack trace:
  createTagMenu/<@buttons_sbd_menu_config.js:42:23
  createTagMenu@buttons_sbd_menu_config.js:39:11
  createConfigMenu@buttons_sbd_menu_config.js:372:4
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:60:4
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30
Screenshot

2

System info

  • OS: Windows 10 x64 22H2
  • Related software: foobar2000 v2.2 preview 2024-03-14 x86, Spider Monkey Panel v1.6.1-mod
  • Github release: Search-by-Distance-SMP v7.2.0

[BUG]

Describe the bug
Reference track's score not being 100 when using genre/style tags not present on the Graph.

To Reproduce
Enable or disable "Set search method\Filter values not present in the graph" for tracks with genres not being on the graph.

Expected behavior
Score of 100.

Additional context
See this

[FEATURE] Custom graph for custom tag

I'd like to use custom graphs with Search-by-Distance custom tags. To use genres from online music databases. For example a Discogs graph with Discogs tags.

I've made graphs here. It's a start, they can be improved.

I could make substitutions in the descriptor files for graphs that aren't complex. You've done it for AllMusic. But it seems difficult to merge a large graph with the original one.

[TODO] Cultural filter

Describe the feature
Filter tracks at pre-filter stage with artists from same country, subregion or region.

Additional context
Reuse region framework.

[BUG] Nearest genres filter

Describe the bug
Since the last version with the new Nearest genres filter (in Automatic), I have an error with a particular configuration.
If I disable the filter, there are no more errors. So I can go on like this, disabling the filter.

To Reproduce

  1. In a new panel, load buttons_toolbar.js
  2. Right-click to add a search_by_distance_customizable.js button
  3. Select WEIGHT method
  4. In the panel properties, replace the sbd0.Tags used for scoring setting with this one:
Details

{

"genre"                 :{"weight": 0,   "tf": ["GENRE"],                            "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["string", "multiple", "graph"]},
"style"                 :{"weight": 0,   "tf": ["STYLE"],                            "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["string", "multiple", "graph"]},
"dynGenre"              :{"weight": 15,  "tf": [],                                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["number", "single", "virtual", "absRange"],                "range": 1  },
"mood"                  :{"weight": 0,   "tf": ["MOOD"],                             "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["string", "multiple", "combinations"],                     "combs": 6  },
"key"                   :{"weight": 0,   "tf": ["KEY"],                              "baseScore": 0, "scoringDistribution": "LOGARITHMIC", "type": ["string", "single", "keyMix", "keyRange"],                 "range": 8  },
"bpm"                   :{"weight": 0,   "tf": ["BPM"],                              "baseScore": 0, "scoringDistribution": "NORMAL",      "type": ["number", "single", "percentRange"],                       "range": 50 },
"date"                  :{"weight": 0,   "tf": ["$year(%DATE%)"],                    "baseScore": 0, "scoringDistribution": "NORMAL",      "type": ["number", "single", "absRange"],                           "range": 500},
"composer"              :{"weight": 0,   "tf": ["COMPOSER"],                         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["string", "multiple"]},
"artistRegion"          :{"weight": 0,   "tf": ["LOCALE LAST.FM"],                   "baseScore": 0, "scoringDistribution": "LOGISTIC",    "type": ["string", "single", "virtual", "absRange", "tfRemap"],     "range": 5  },
"genreStyleRegion"      :{"weight": 0,   "tf": [],                                   "baseScore": 0, "scoringDistribution": "LOGISTIC",    "type": ["string", "single", "virtual", "absRange"],                "range": 5  },
"related"               :{"weight": 0,   "tf": ["RELATED"],                          "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["string", "multiple", "virtual", "tfRemap", "bNegative"]},
"unrelated"             :{"weight": 0,   "tf": ["UNRELATED"],                        "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["string", "multiple", "virtual", "tfRemap", "bNegative"]},

"Key es"                :{"weight": 1,   "tf": ["ES:KEY"],                           "baseScore": 0, "scoringDistribution": "LOGARITHMIC", "type": ["string", "single", "keyMix", "keyRange"],                 "range": 8  },
"Bpm es"                :{"weight": 1,   "tf": ["ES:BPM"],                           "baseScore": 0, "scoringDistribution": "NORMAL",      "type": ["number", "single", "percentRange"],                       "range": 150},

"Rosa Classic"          :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,0)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Rosa Dance"            :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,1)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Rosa Hip hop"          :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,2)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Rosa Jazz"             :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,3)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Rosa Pop"              :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,4)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Rosa Rhythm and blues" :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,5)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Rosa Rock"             :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,6)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Rosa Speech"           :{"weight": 4,   "tf": ["$meta(ES:GENRE_ROSAMERICA,7)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Blues"            :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,0)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Classic"          :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,1)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Country"          :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,2)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Disco"            :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,3)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Hip hop"          :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,4)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Jazz"             :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,5)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Metal"            :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,6)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Pop"              :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,7)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Reggae"           :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,8)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tzan Rock"             :{"weight": 4,   "tf": ["$meta(ES:GENRE_TZANETAKIS,9)"],     "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma Electronic"        :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,0)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma Experimental"      :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,1)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma Folk"              :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,2)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma Hip-hop"           :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,3)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma Instrumental"      :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,4)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma International"     :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,5)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma Pop"               :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,6)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Fma Rock"              :{"weight": 4,   "tf": ["$meta(ES:GENRE_FMA_SMALL,7)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},

"Discogs 90-100 %"      :{"weight": 4,   "tf": ["ES:DISCOGS_G01"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 80-100 %"      :{"weight": 4,   "tf": ["ES:DISCOGS_G02"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 70-100 %"      :{"weight": 4,   "tf": ["ES:DISCOGS_G03"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 60-100 %"      :{"weight": 4,   "tf": ["ES:DISCOGS_G04"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 50-100 %"      :{"weight": 4,   "tf": ["ES:DISCOGS_G05"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 45-100 %"      :{"weight": 2,   "tf": ["ES:DISCOGS_G06"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 40-100 %"      :{"weight": 2,   "tf": ["ES:DISCOGS_G07"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 35-100 %"      :{"weight": 2,   "tf": ["ES:DISCOGS_G08"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 30-100 %"      :{"weight": 2,   "tf": ["ES:DISCOGS_G09"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 25-100 %"      :{"weight": 2,   "tf": ["ES:DISCOGS_G10"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 22.5-100 %"    :{"weight": 1,   "tf": ["ES:DISCOGS_G11"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 20-100 %"      :{"weight": 1,   "tf": ["ES:DISCOGS_G12"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 17.5-100 %"    :{"weight": 1,   "tf": ["ES:DISCOGS_G13"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 15-100 %"      :{"weight": 1,   "tf": ["ES:DISCOGS_G14"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 12.5-100 %"    :{"weight": 1,   "tf": ["ES:DISCOGS_G15"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 10-100 %"      :{"weight": 1,   "tf": ["ES:DISCOGS_G16"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 7.5-100 %"     :{"weight": 1,   "tf": ["ES:DISCOGS_G17"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},
"Discogs 5-100 %"       :{"weight": 1,   "tf": ["ES:DISCOGS_G18"],                   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["multiple","string"]},

"Not approachable"      :{"weight": 4,   "tf": ["$meta(ES:APPROACHABILITY,0)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Approachable"          :{"weight": 4,   "tf": ["$meta(ES:APPROACHABILITY,1)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Not engaging"          :{"weight": 4,   "tf": ["$meta(ES:ENGAGEMENT,0)"],           "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Engaging"              :{"weight": 4,   "tf": ["$meta(ES:ENGAGEMENT,1)"],           "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Valence"               :{"weight": 4,   "tf": ["$meta(ES:AROUSAL_VALENCE_DEAM,0)"], "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":9  },
"Arousal"               :{"weight": 4,   "tf": ["$meta(ES:AROUSAL_VALENCE_DEAM,1)"], "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":9  },
"Danceable"             :{"weight": 4,   "tf": ["$meta(ES:DANCEABILITY,0)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Not danceable"         :{"weight": 4,   "tf": ["$meta(ES:DANCEABILITY,1)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Aggressive"            :{"weight": 4,   "tf": ["$meta(ES:MOOD_AGGRESSIVE,0)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Not aggressive"        :{"weight": 4,   "tf": ["$meta(ES:MOOD_AGGRESSIVE,1)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Happy"                 :{"weight": 4,   "tf": ["$meta(ES:MOOD_HAPPY,0)"],           "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Non happy"             :{"weight": 4,   "tf": ["$meta(ES:MOOD_HAPPY,1)"],           "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Non party"             :{"weight": 4,   "tf": ["$meta(ES:MOOD_PARTY,0)"],           "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Party"                 :{"weight": 4,   "tf": ["$meta(ES:MOOD_PARTY,1)"],           "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Non relaxed"           :{"weight": 4,   "tf": ["$meta(ES:MOOD_RELAXED,0)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Relaxed"               :{"weight": 4,   "tf": ["$meta(ES:MOOD_RELAXED,1)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Non sad"               :{"weight": 4,   "tf": ["$meta(ES:MOOD_SAD,0)"],             "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Sad"                   :{"weight": 4,   "tf": ["$meta(ES:MOOD_SAD,1)"],             "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Acoustic"              :{"weight": 4,   "tf": ["$meta(ES:MOOD_ACOUSTIC,0)"],        "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Non acoustic"          :{"weight": 4,   "tf": ["$meta(ES:MOOD_ACOUSTIC,1)"],        "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Electronic"            :{"weight": 4,   "tf": ["$meta(ES:MOOD_ELECTRONIC,0)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Non electronic"        :{"weight": 4,   "tf": ["$meta(ES:MOOD_ELECTRONIC,1)"],      "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Instrumental"          :{"weight": 4,   "tf": ["$meta(ES:VOICE_INSTRUMENTAL,0)"],   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Voice"                 :{"weight": 4,   "tf": ["$meta(ES:VOICE_INSTRUMENTAL,1)"],   "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Female"                :{"weight": 4,   "tf": ["$meta(ES:VOICE_GENDER,0)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Male"                  :{"weight": 4,   "tf": ["$meta(ES:VOICE_GENDER,1)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Bright"                :{"weight": 3,   "tf": ["$meta(ES:TIMBRE,0)"],               "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Dark"                  :{"weight": 3,   "tf": ["$meta(ES:TIMBRE,1)"],               "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Tonal"                 :{"weight": 4,   "tf": ["$meta(ES:TONAL_ATONAL,0)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100},
"Atonal"                :{"weight": 4,   "tf": ["$meta(ES:TONAL_ATONAL,1)"],         "baseScore": 0, "scoringDistribution": "LINEAR",      "type": ["single","number","absRange"],     "range":100}

}

(everything is on one line, but here it's formatted)

  1. Click on the button to launch a search
  2. See the error:
v7.4.0:

Error: Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx)
calcTags.genreStyle.referenceSet is undefined

File: search_by_distance.js
Line: 1417, Column: 48
Stack trace:
  searchByDistance@search_by_distance.js:1417:48
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:81:5
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:191:37
  fireEvents/<@callbacks_xxx.js:187:30

with the last commit 1285846:

Error: Spider Monkey Panel v1.6.1-mod ({436C553D-9DC7-49AF-9047-C311FEF2FCDB}: Playlist Tools: Buttons Bar v1.1.1 by regorxxx)
calcTags.genreStyle.referenceSet is undefined

File: search_by_distance.js
Line: 1419, Column: 48
Stack trace:
  searchByDistance@search_by_distance.js:1419:48
  ["Search by Distance Customizable"]<@buttons_search_by_distance_customizable.js:81:5
  ThemedButton/this.onClick@buttons_xxx.js:604:21
  @buttons_xxx.js:964:21
  fireEvents/</<@callbacks_xxx.js:191:37
  fireEvents/<@callbacks_xxx.js:187:30

Screenshots

Screenshots

v7.4.0:

Screenshot

with the last commit 1285846:

Screenshot2

System info:

  • OS: Windows 10 x64 22H2
  • Related software: Foobar2000 v2.1.5 x86, new portable installation
  • Github release: Search-by-Distance-SMP 7.4.0

Additional context
I've set the default tags weight to 0.
I use a lot of custom tags, with the Weight method.
There are none with the graph genres. I guess that's why.

[BUG] missing range property

Describe the bug
I use a customizable button. I add a new custom tag. As in #19, this message appears:

Error on tags settings.
To fix it, restore defaults on affected tags (customizable button) or globally (non-customizable buttons). These options are usually found by Shift + L. Clicking on the button. Then reload the panel.
If the error continues, report it as a bug.
------------------------------------------------------------------------
Tag missing range property: My custom tag

To reproduce

  1. With a customizable button, create a new tag
  2. Enter a name for the tag: My custom tag
  3. Is multi-valued? No
  4. Are tag values strings? No
  5. Uses absolute range? No
  6. Uses percent range? Yes
  7. See error

Screenshot

Screenshot

1

Additional context

Tag properties in the "Edit tag..." menu

{
  "weight": 0,
  "tf": [],
  "baseScore": 0,
  "scoringDistribution": "LINEAR",
  "type": ["single", "number", "percentRange"]
}

New portable installation with default settings.

System info

  • OS: Windows 10 x64 22H2
  • Related software: foobar2000 v2.2 preview 2024-03-14 x86, Spider Monkey Panel v1.6.1-mod
  • Github release: Search-by-Distance-SMP v7.2.0

Primary Origin keys order

Hi. Сould you please explain the order of writing in the style_primary_origin section in the file music_graph_descriptors_xxx.js? The description says:

// Primary influence. For example one style being the origin of other.
// For ex. 'Rockabilly' and 'Rockabilly revival'.

That means the origin to the left and the influenced sub-genres to the right, right?
Or the primary genres that influenced the genre at the left are the right?
I don't understand some of the entries like this one:

	['Nu-Disco'							,	['Electro','Disco XL','Post-Disco XL']],

This confuses me, because Nu-Disco is a sub-genre from the 21st century.

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.