Giter Site home page Giter Site logo

audiokeys.js's Introduction

# AudioKeys.js

AudioKeys is a javascript wrapper to help monitor various part of the audio spectrum using HTML5 audio apis.


## Example
```
var audio = new AudioKeys('arabesque1.ogg');
audio.load(function() {
// When audio file is ready to play
audio.play();
});
```

AudioKey’s API allows you to "watch" or monitor portions of the frequency spectrum so this means you could get different amplitude levels from monitors watched in the different parts of the spectrum (eg. 1 for bass, 1 for treble, 1 for mids).

The following code add monitors and retrieve audio levels.


```
// adds  audio monitors
audio.addWatchers(startFreqBin, endFreqBin, lowLimit, highLimit);
audio.addWatchers(startFreqBin2, endFreqBin2, lowLimit2, highLimit2);

// in your application loop
audio.process();

// returns the average amptitude level of the monitored section of audio
levels1 = audio.getLevels(0);
levels2 = audio.getLevels(1);
```

On firefox browsers, AudioKeys falls back to MozAudioKeys, a firefox implementation for a compatible AudioKeys api, but internally uses dsp.js for its fft processing.

More information see http://www.lab4games.net/zz85/blog/2011/09/21/music-colour-particles/


audiokeys.js's People

Watchers

Omer Golan avatar JT5D avatar James Cloos 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.