Code Monkey home page Code Monkey logo

remixr's Introduction

remixr

Smart playlist generator for Spotify

Features - Spotify login

  • Generate playlists based on artist, track or playlist seeds
  • Generate playlists based on personal playlist as a seed
  • Tune parameters like popularity, mood, energy, etc. to further customize the playlist

Algorithm to generate similar playlists

  • Feature range calculation
    1. Get all tracks in the playlist from the Spotify API
    2. Query Spotify for different track features
    3. Calculate the 0.1 and 0.9 quantile range for each feature
    4. Use these as min and max targets for each feature
  • Extract most relevant artists and tracks as seeds
    1. Find the frequency of artists and tracks in:
      • Playlist
      • User profile / listening history: short, medium, long term
    2. Select most frequently appearing artists and tracks that exist in the playlist
  • Query Spotify API with the calculated seeds and parameter values

Installation

Clone

 git clone https://github.com/rtkg12/remixr.git  

Pre-requisites

  1. Make a developer account at https://developer.spotify.com and obtain the Client ID and Client Secret
  2. Update client/.env and server/app.env accordingly.
Property Description
REACT_APP_API_URL Use /api for default configuration. Replace with backend server address for custom deployment
REACT_APP_TRACKING_ID optional Google Analytics Tracking Id
CLIENT_URL Address of the client application
REDIRECT_URI Callback endpoint for Spotify authentication. Note Make sure this matches the Redirect URL in the Spotify API console

Installation

yarn install

Building and developing locally

Configuration

Environment variable Value
REACT_APP_API_URL http://localhost:8080/api
CLIENT_URL http://localhost:3000
REDIRECT_URI http://localhost:8080/api/callback

Running the project

yarn develop

The React app should start running in port 3000 and the Node.js app will be running in 8080

Deploying to Production

Configuration

Environment variable Value
REACT_APP_API_URL /api
CLIENT_URL http://PUBLIC_URL
REDIRECT_URI http://PUBLIC_URL/api/callback

Deploying

yarn deploy

This will build the React app and serve the build folder from Express. Express should be running in port 8080

Future Areas of Improvement

  • Add support for greater than five seeds using random sampling from generated playlists
  • Functionality to add individual songs to library directly from the app
  • Regenerate, re-order and edit the playlist dynamically before saving
  • Session-wide playlist building. Add songs from multiple queries, save in the end
  • Algorithm improvements - different statistical measures, collaborative filtering

Contribute

Please feel free to open an issue/pull request if you wish to work on any of the above features, or if you have any other suggestions for improvement.

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.