Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online database #20

Open
Phyks opened this issue Apr 17, 2016 · 4 comments
Open

Online database #20

Phyks opened this issue Apr 17, 2016 · 4 comments

Comments

@Phyks
Copy link
Contributor

Phyks commented Apr 17, 2016

Hi,

I am working on integrating Bliss in MPD, see https://github.com/Phyks/MPDBliss/.

I have something almost working, but running bliss on every song (almost 50k in my case) and storing distances across each songs in a db is really long.

I do not remember leleleplayer being that long to build its cache. Which approach are you using?

What about sharing the built infos in an open online database? Like associating computed values using bliss to musicbrainz ID or things like this?

@Polochon-street
Copy link
Owner

Hi!

First, thanks very much for bliss' integration in MPD, I use MPD too and will test it ASAP! For leleleplayer, I store every song's coordinates in an xml db, and then, when playing in lelelerandom mode, in order to choose a song to play after the previous, I do something like:
do {
song = get_random_song();
} while(bl_distance(song.force_vector, previous_force_vector) > treshold_distance || bl_cosine_similarity(song.force_vector, previous_force_vecotr) < treshold_similarity)

And then chose the remaining song. It sure doesn't find the best song, but that works. I usually use treshold_distance = 4.0 and treshold_similarity = 0.95, and increase them from 0.001 in the loop. That way, if your library is composed of like, two songs very different from each other, it will still continue to play.

This solution is indeed not optimal, so if you have any suggestion, don't hesitate :) (and if it's not clear, tell me!)

The musicbrainz ID thing is indeed a good idea, but I really don't know how does that work. I'll look into it!

@Phyks
Copy link
Contributor Author

Phyks commented Apr 18, 2016

Ok, so I am basically doing the same for my integration with MPD (I am storing all the coordinates in a sqlite db, storing the pairwise distances in another table, and taking the song which is closest.

I will take a look at your approach, as computing all the distances between songs might be really long.

Concerning the idea of an online database, the idea is that if your songs are correctly tagged, we could match them against an online database and get the coordinates directly, rather than recomputing them everytime a user needs it. Musicbrainz provides such universal IDs for songs.

An idea to improve leleleplayer btw is to put the distances in cache as well. I will try to do something like this in my client and will let you know.

@Polochon-street
Copy link
Owner

The only problem I see in the online db idea is that the analysis process will probably change in some further update (regarding the tempo & attack analysis), meaning different values for same songs, making the distance computation irrelevant.

So, I'll wait until bliss is really stable before doing that.
(and, well, thanks for the ideas!)

@Phyks
Copy link
Contributor Author

Phyks commented Apr 18, 2016

Ok for this, better to wait for a stable API :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants