Viewing a saved revision (read-only)
3e7704ee42ae42ab93322ace4174200e
FFT of tremor analysis
This example displays the double-sided magnitude spectrum of a tremor analysis, plotting frequency in Hertz against raw magnitude as a connected line chart. The code processes 512 heart rate data points through a custom FFT implementation, then visualizes the resulting complex spectrum using d3.js scales, axes, and a line generator. The visualization updates responsively with the container size, using a gray inner plot area with labeled axes.
AI-generated descriptionOverview Time to dabble with the infamous FFT in javascript. Starting with a simple script to generate sine waves for testing.
export const sineGenerator = (freq, dInSeconds, sRate) => { // Parameters for the sine wave const frequency = freq; const durationInSeconds = dInSeconds; const sampleRate = sRate;
Discrete Fourier Transform - Simple Step by Step https://www.youtube.com/watch?v=mkGsMWi_j4Q
Understanding the Discrete Fourier Transform and the FFT https://www.youtube.com/watch?v=QmgJmh2I3Fw&t=3s