Skip to content

jscanvic/spectrogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A real-time spectrogram running in the browser featured at la Fête de la Science (2024)

Graphical User Interface of the Spectrogram

Online version

The spectrogram is running at this URL

Local installation

Clone the repository

git clone https://github.com/jscanvic/spectrogram
cd spectrogram

Start an HTTP server in the current directory

python -m http.server -b 127.0.0.1 8000

Open this URL in a web browser

Supported configurations

The spectrogram is designed to run on laptops and desktops using any Chromium-based or Firefox-based web browser. It is not supported on mobile devices.

Implementation details

The spectrogram is computed using the Web Audio API and more precisely using the AnalyserNode interface which is responsible for computing the discrete Fourier transforms. It is continuously rendered onto an HTMLCanvasElement. Every time a new section of the spectrogram is about to be rendered, everything else is shifted to the left before it is drawn on the newly available space. This is more computationally efficient than rendering the whole spectrogram at every frame and it enables real-time rendering at a higher temporal resolution.

About

A real-time spectrogram running in the browser featured at la Fête de la Science (2024)

Topics

Resources

Stars

Watchers

Forks