Skip to content
forked from Luich2012/fftjs

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

Notifications You must be signed in to change notification settings

nqthinh493/fftjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fft.js v0.0.2

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

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()));
});

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 71.7%
  • JavaScript 28.3%