Skip to content

😎 A powerful song repetition visualizer using self-similarity matrices and the Genius API

Notifications You must be signed in to change notification settings

alaydeliwala/Genius-Repetition-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Genius-Repetition-Visualizer

About

This repetition analyzer can search for any song through the genius API and then creates an image from the songs self-similarity matrix

Given a text of length n tokens, it constructs an n x n matrix, where (i, j) is filled in if the ith and jth words are the same (after some normalization).

The output available in a repetition-matrix.ppm file

Holy Grail (Ft. Justin Timberlake) by Jay-Z

Setup

Getting Access to the Genius API

To use this program you must update credentials.txt to contain your Genius API credentials. Click here to create Genius Api Credentials

Auto Installation using pip!

  1. Make sure you have installed virtualen, or if not then run pip3 install virtualenv
  2. Create the python three virtual environment virtualenv venv
  3. Start the environment source venv/bin/activate
  4. Automatically install all relevant dependencies using the following command pip install -r requirements.txt

Manul Installation

  1. Make sure you have installed virtualen, or if not then run pip3 install virtualenv
  2. Create the python three virtual environment virtualenv venv
  3. Start the environment source venv/bin/activate
  4. Install the python requests package pip install requests
  5. Install numpy (linear algebra package) pip install numpy
  6. Install bs4 (Beautiful Soup 4) pip install bs4 Make sure all downloaded items are for Python 3.x

Usage

In the root folder of the program run this command to start the virtual environment

$ source venv/bin/activate

After the virtual environment has started run this command to start the program

$ python matrix.py

Try not to make a spelling mistake when typing the song name

Shoutouts

  • Shoutout to @genius for being the world's greatest public knowledge project since Wikipedia and making all their information avalible to us through their amazing public API πŸŽΆπŸ“š
  • Shoutout to SongSim for the original analysis idea 😍
  • Shoutout to requests for a great HTTP and OAuth2 tool for humans ✨🍰✨

About

😎 A powerful song repetition visualizer using self-similarity matrices and the Genius API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages