Inspiration

Spotify gives a discover weekly playlist that’s usually over 90 minutes long, but not enough time to sit down and listen to each song and actually discover new music.

What it does

Login through Spotify to have direct web player control and ask users to submit a playlist they would like to skim. Allows users to listen to 5-second clips of the “best” parts of each song. Then clicking a like button feeds it into a new playlist with all the music they liked from the first impression. Overall, Adaptune can lead to a 97% increase in efficiency. (If the playlist was 93 minutes long, able to run through the entire playlist within about 2.5 minutes.

How we built it

The project was primarily built using Python Flask. We chose this to have seamless integration for a Spotify API client. Using the Spotify API, we authenticate incoming users and authorize the use of their OAuth token. From there, based on a user-inputted playlist link, we use the Spotify API to retrieve all tracks and use their audio analysis algorithms to find the best section of each song. From there, we show users their playlist along with controls to play each sample using jQuery, Javascript, and Jinja to connect to our Python scripts. Users are then able to like a song based on their impression of the sample. Our app is hosted on Heroku due to its ease of integrating with Flask apps.

Challenges we ran into

  • Format/alignment of elements
  • Heroku 30 second timeout handling (needed to implement background dyno worker tasks)
  • Connecting onClick events to Python scripts (not fully supported by Flask, but found a hacky way using AJAX jQuery)
  • Creating the OAuth workflow through the Spotify API (needed to create a client class to retrieve tokens and implement a callback route)

Accomplishments that we're proud of

  • Being able to use Spotify audio analysis algorithm to present the best segment of a song
  • Going from a barebones web app to a quick, clean, and minimalist design
  • Building a full-stack web app from scratch and using new technologies such as jQuery
  • Playing to each of our separate strengths in backend and UI design to efficiently work on the project

What we learned

Chris - Learned a lot about basic github usage, was able to practice more CSS without hardcoding styling within HTML files, learned to see the extent of what APIs can offer developers

Jonathan - Learned about how to integrate Flask with HTML and how to create an authentication client for the Spotify API. Also learned about background worker tasks as well as overall UI design.

What's next for Adaptune

  1. Improving user workflow by a tinder-style listening experience. Instead of having all tracks of a playlist on one page, every time a user swipes left or right it will autoplay the next song until the end of the playlist. If the user can’t decide if they like the song, they can choose to put the song back in the rotation.

  2. Could be implemented within a mobile app, would’ve loved to get music segments in-app (putting music on Instagram story or how TikTok has sounds), faster and easier for users to use.

  3. Fleshing out the Generate Playlist button and fixing bugs associated with that feature.

Share this project:

Updates