Skip to content

B0-B/fft.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fft.js

A simple Radix-2 Fast Fourier Transform in vanilla javascript for client-side calculations.

Setup

Load the fft.js tool via html tags in the head or body section

<script src="fft.js"></script>

Usage

const signal = [0.4, 0.382, 0.279, ...]

// Generate the FFT array 
const fourier = fft.trans(signal);          // list of complex numbers
const real_part = fft.re(fourier);          // extract the real part of the FFT
const spectrum = fft.spectrum(fourier);     // extract the spectrum

// Inverse transform to reconstruct the signal
const reconstruct = fft.inverse(fourier);   // real signal array 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published