Git Product home page Git Product logo

goodmusic's Introduction

goodmusic

This project aims to use music listener databases to find new music for you to enjoy.

Datasets

Currently, I have been using the Last.fm 360K dataset. I plan to use abstractions that allow for other datasets as well.

Usage

This project currently supports the following music setups:

  • iTunes on Mac OS X
  • Spotify on any operating system

If you use a different music player, you may file an issue on this repository and I (or somebody else) may add support for your setup.

First, download the Last.fm music dataset. While this is running, make sure you have Go installed and a GOPATH configured.

To download the tool, run:

$ go get github.com/unixpickle/goodmusic/recommender

Now, follow the instructions on iTunes or Spotify below.

Using iTunes

Run the command as follows, and you will see similar output:

$ $GOPATH/bin/recommender itunes /path/to/usersha1-artmbid-artname-plays.tsv 100 | more
2016/09/22 19:35:40 Loading music library...
2016/09/22 19:35:41 Loading dataset...
2016/09/22 19:36:06 Building music profile...
2016/09/22 19:36:06 Computing artist correlations...
2016/09/22 19:36:09 Sorting correlations...
2016/09/22 19:36:09 Recommending...
the killers (correlation of 77279.27%)
the beatles (correlation of 65038.06%)
britney spears (correlation of 63985.37%)
red hot chili peppers (correlation of 63947.08%)
...

The last argument (100 in this case) specifies how many plays an artist needs in iTunes in order to be considered. I have found that the default of 100 works fine, since most of my favorite artists have hundreds of plays and I have few artists in iTunes that I don't enjoy.

Using Spotify

Run the command as follows, and you will see similar output:

$ go run *.go spotify ~/Downloads/lastfm-dataset-360K/usersha1-artmbid-artname-plays.tsv 1
2016/09/23 19:12:21 Loading music library...
Please navigate to:
https://accounts.spotify.com/authorize?client_id=dac4cf3243db4bd1b055efc7af84be72&redirect_uri=http%3A%2F%2Flocalhost%3A14505%2Fspotifydone&response_type=token&scope=user-library-read
2016/09/23 19:12:28 Loading dataset...
2016/09/23 19:13:06 Building music profile...
2016/09/23 19:13:06 Computing artist correlations...
2016/09/23 19:13:09 Sorting correlations...
2016/09/23 19:13:09 Recommending...
the killers (correlation of 77279.27%)
the beatles (correlation of 65038.06%)
britney spears (correlation of 63985.37%)
red hot chili peppers (correlation of 63947.08%)
...

The last argument (1 in this case) specifies how many songs you must have by a given artist for that artist to be considered.

goodmusic's People

Contributors

unixpickle avatar

Watchers

 avatar

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.