Coder Social home page Coder Social logo

songsim's Introduction

A little web app for making interactive self-similarity matrices from text (in particular, song lyrics and poetry).

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

There are lots of examples of researchers constructing self-similarity matrices from raw audio features for the purposes of visualization or segmentation (e.g. 1, 2), which I drew inspiration from. I don't know of any previous applications of the technique to lyrics/verse.

Note on canned data

public/canned contains a bunch of text files with examples of verse (pop songs, poems, nursery rhymes, etc.). Some of these works are in the public domain, and some are not. I don't own any of that content (and the license on the software in this repo does not extend to those files). My use of the songs which are under copyright is presumed to be fair, given the transformativeness of the use, and that purpose of use is educational and non-commercial.

Generating matrix image files

(This is mostly a note to myself so I don't forget.)

  • set config.debug = true
  • in browser, press 'batch export' button
    • (this will respect all current settings wrt color, single-word matches, etc.)
  • unzip
  • run pngify.sh
  • move pngs to public/img/gallery (or wherever else they're needed)

songsim's People

Contributors

caiopo avatar colinmorris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

songsim's Issues

[Question] Duplicate data?

Since all of the data is mirrored along the diagonal of the resulting image, could there be a better method of displaying the data without repetition?

Find similarities between songs

Your work is amazing, I wanted to congratulate you for it. I discovered it through Vox's Youtube channel.

A few days ago I was thinking about sparse representations of music and I was wondering if you found any way to find similarities between songs using this representation, maybe something more than 'how repetitive they are'. Because two songs will eventually have different matrix length between them. I would like to know what do you think about it.

Greetings from Chile ๐Ÿ‡จ๐Ÿ‡ฑ โœŒ๏ธ
Thanks in advance for your time.

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.