Skip to content

Jayesh-kahnani/Shapes-of-Sound

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shapes of Sound

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.


Features

  • 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.

Hardware Requirements

  • ESP32 or compatible microcontroller
  • I2S-compatible microphone or ADC microphone module
  • USB connection to PC for serial communication

Software Requirements

  • Processing (for visual rendering)
  • Arduino IDE (for firmware upload)
  • arduinoFFT library (for FFT computation on the microcontroller)

Project Structure

Shapes-of-Sound/
├── art.pde        # Processing sketch for visualization
└── mic.ino        # Arduino/ESP32 firmware for audio capture and FFT

How It Works

  1. 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)
  2. Data Transmission
    These features are sent over serial at regular intervals to the Processing sketch.

  3. 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.


Setup Instructions

Arduino/ESP32

  1. Install the arduinoFFT library in Arduino IDE.
  2. Connect your I2S microphone according to the pin definitions:
    WS: 25
    SD: 26
    SCK: 27
    
  3. Upload mic.ino to your board.

Processing

  1. Open art.pde in Processing.
  2. Ensure the correct serial port is selected (Serial.list()[0] may need adjustment).
  3. Run the sketch to see the visualization.

Customization

  • Adjust the number of particles by changing the loop in setup() of art.pde:
    for (int i = 0; i < 120; i++) forms.add(new Form());
  • Modify visual behavior by tweaking the mapping functions in Form.update() and Form.display().
  • Change color schemes using the colorMode(HSB, 255) parameters.

License

This project is open-source and available under the MIT License. Feel free to modify and adapt it for your own audio-visual explorations.


Future Improvements

  • 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors