node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org ยป



Easy sound reactivity for Chrome (and Safari nightly?).

Demo page

Getting Started

First, get the code.

Second, create a new instance of EasyEars with the form:

new EasyEars(options, completeCallback);

Here are some examples:

// Create a new ears instance that will use a DOM
// element as a target for drag and dropped .mp3
ears = new EasyEars({dropTarget: document}, function(){
  console.log('song loaded!');

// or...

// Create one that will use an mp3 from a url
ears = new EasyEars({url: '/mp3/a_song.mp3'});

To use it, first update the audio using updateAudio(timeSmoothing). Where timeSmoothing is a value between 0.0 and 1.0.

Next, use ears.lows(), ears.mids(), and ears.highs() to get sound data back from EasyEars. These values will always be between 0.0 and 1.0.

Usage Examples:

var animate = function() {
  // call updateAudio periodically to get latest sound data

  // use the following methods to get sound data,
  // each will return a value between 0.0 and 1.0