Giter VIP home page Giter VIP logo

playlist-generator's Introduction

Playlist-Generator

Assume that, there are 5 types of playlists in this generator, and the minimum duration of a playlist changes according to its type. The types include:

  [1] Sleeping → 45 minutes
  [2] Workout → 1 hours
  [3] Dining → 1.5 hour
  [4] Meditation → 2 hours
  [5] Road Trip → 3 hours

The playlist duration is set according to the selected type, at the beginning. Then, the playlist is filled with tracks from 6 different genres:

  [1] Acoustic
  [2] Instrumental
  [3] Rock
  [4] Rap
  [5] Jazz
  [6] Pop

Until the playlist is ready, the generator repeatedly selects the most popular track from the most suitable genre. Each category keeps the IDs of suitable genres in a list that is sorted by suitability:

  [1] Sleeping → [2, 1, 5]
  [2] Workout → [4, 3, 6]
  [3] Dining → [5, 1, 2]
  [4] Meditation → [2, 1, 5]
  [5] Road Trip → [3, 6, 1]

For example, the most suitable genre is 4 (Rap) for a Workout playlist. Then, 3 (Rock) and 6 (Pop). Each track can only be added to a playlist once. Therefore, the tracks added to the playlist should be removed from the genre collection.

The tracks are listed in the “tracks.txt” file where each line is formed as:

  genre_id, track_id, track_duration, track_popularity

Track duration is given in seconds, and track popularity refers to the number of plays.

playlist-generator's People

Contributors

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