Shapes of Sound is an interactive audio-visual project that translates live sound input into mesmerizing visual forms. Using an Arduino/ESP32 to capture audio and Processing for visual rendering, this project creates dynamic, colorful particles that dance according to the nuances of sound in real time.
- Real-time audio visualization using RMS, spectral centroid, tone balance, and dynamics.
- Fluid, organic particle motion driven by sound characteristics.
- Colorful HSB-based visual display with dynamic transparency and size.
- Fully immersive fullscreen mode with continuously evolving visuals.
- Modular setup: Arduino/ESP32 handles audio processing while Processing handles visuals.
- ESP32 or compatible microcontroller
- I2S-compatible microphone or ADC microphone module
- USB connection to PC for serial communication
- Processing (for visual rendering)
- Arduino IDE (for firmware upload)
arduinoFFTlibrary (for FFT computation on the microcontroller)
Shapes-of-Sound/
├── art.pde # Processing sketch for visualization
└── mic.ino # Arduino/ESP32 firmware for audio capture and FFT
-
Audio Capture
The microcontroller reads audio data from an I2S microphone and computes key audio features:- RMS (loudness)
- Spectral centroid (brightness of sound)
- Tone balance (low vs high frequency energy)
- Dynamics (peak-to-RMS ratio)
-
Data Transmission
These features are sent over serial at regular intervals to the Processing sketch. -
Visual Rendering
Processing receives the serial data and updates an array of particle forms. Each particle's position, velocity, size, color, and transparency respond to the audio features, creating a mesmerizing, ever-changing visual display.
- Install the
arduinoFFTlibrary in Arduino IDE. - Connect your I2S microphone according to the pin definitions:
WS: 25 SD: 26 SCK: 27 - Upload
mic.inoto your board.
- Open
art.pdein Processing. - Ensure the correct serial port is selected (
Serial.list()[0]may need adjustment). - Run the sketch to see the visualization.
- Adjust the number of particles by changing the loop in
setup()ofart.pde:for (int i = 0; i < 120; i++) forms.add(new Form());
- Modify visual behavior by tweaking the mapping functions in
Form.update()andForm.display(). - Change color schemes using the
colorMode(HSB, 255)parameters.
This project is open-source and available under the MIT License. Feel free to modify and adapt it for your own audio-visual explorations.
- Add support for stereo audio input.
- Implement interactive user controls to change particle behavior.
- Integrate advanced audio analysis like beat detection or pitch tracking.
p.s: This readme was AI generated.