Baton

tiny javascript library for midi input in the any browser/os with webmidi

View the Project on GitHub amonks/fftjs

fft.js v0.0.2

fft.js is a javascript library that makes it easy to analyze real-time audio input.

demo

API

init(int samples)

init(samples) requests microphone input and sets up a buffer with the given number of samples. samples must be between 32 and 2048.

fft()

fft() returns an array of integers between 0 and 255. Each item in the array is a frequency band. The integer is its amplitude.

setup()

setup() returns true if microphone input has been granted.

example

online

var fftjs = new FFTJS();
fftjs.init(32);

$('button#fft-button').on('click', function() {
    $('#fft-display').text(JSON.stringify(fftjs.fft()));
});