Skip to content

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.

License

Notifications You must be signed in to change notification settings

regorxxx/Search-by-Distance-SMP

Repository files navigation

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. These are the weight/tags pairs checked by default:

Weight Tag Weight Tag
genreWeight genre styleWeight style
dyngenreWeight virtual tag moodWeight mood
keyWeight key dateWeight $year(%date%)
bpmWeight bpm composerWeight composer (unused by default)
customStrWeight (unused by default) customNumWeight (unused by default)

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

Original Tag Remap to
genreTag allmusic_genre,my_genre_tag

Some weight/tags pairs can be linked to TitleFormat Expr. Use tag names instead of TF expressions when possible (+ performance).

Tag TF Tag TF
dateTag $year(%date%) customNumWeight (unused by default)

Graph method

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

  • WEIGHT: -> Score
    Calculates similarity by scoring according to the tags. Similarity is calculated by simple string matching ('Rock' != 'Soul') and ranges for numeric tags. This means some coherence in tags is needed to make it work, and the script only works with high level data (tags) which should havebeen 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 set 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.

  • 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

  • The pool can be filtered with a flobal forced query (for example to always exclude live tracks).
  • The final selection can be choosen from the pool following 4 methods.
  • The final selection (aka playlist) can be sorted following 3 methods:
    • Randomly.
    • Following the order the tracks were chosen from the pool.
    • Scattering instrumentals: Intercalate instrumental tracks breaking clusters if possible.
  • 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'.

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.

About

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.

Topics

Resources

License

Stars

Watchers

Forks