
A sound controlled light show
For our midterm we were tasked to create something that expands on our mini projects from earlier in the semester. My idea was Pulse Play a household product that translates auditory energy into a dynamic visual display. Designed for entertainment spaces—such as small venues, home studios, or lounges it transforms sound into movement, allowing environments to “perform” alongside music, conversation, or ambient noise.
When starting this project I used a sound sensor, potentiometer, and a series of LEDs to create a responsive light performance. I really focused on getting the circuit to be concrete and constant first before working on the component.
I started very simple and seeing how the lights could react to sound and how sensitive the sensor was. I then started playing with how the light could be further manipulated by testing the lights reflection using a piece of paper and small make up mirror to inspire to form for my prototype.
This inspired my first prototype which took a stage like form using mirrors to have the light reflect on to the paper. My inspiration was concerts and thinking about how light and other visual effects are used to enhance the performance.
I then looked back at my circuit and add the potentiometer as a way to make it more interactive for the user. This makes the user become more of a light dj than just a viewer.
It works by using the turn angel as an Input → Mode selection then potPin (A1) reads the dial (0–1023). The modes uses mode = map(potValue, 0, 1023, 0, 5); maps that to 0–4 (five modes). Input → Sound gating. The sound sensor’s digital pin is read: bool soundDetected = (digitalValue == LOW);
When sound is detected which is lastSoundTime = millis(); the Lights only run while millis() - lastSoundTime < 200 (a 200 ms window after a sound). Outside that window, allOff() which happens when I remove the music and there is now sound to be read.
Final Code
const int soundPinDigital = 2;
const int potPin = A1;
const int led1 = 3;
const int led2 = 4;
const int led3 = 5;
const int led4 = 6;
const int led5 = 7;
const int led6 = 8;
const int led7 = 9;
const int led8 = 10;
int leds[] = {led1, led2, led3, led4, led5, led6, led7, led8};
int numLeds = 8;
int mode = 0;
int currentLED = 0;
unsigned long lastTrigger = 0;
unsigned long lastSoundTime = 0;
void setup() {
pinMode(soundPinDigital, INPUT);
for (int i = 0; i < numLeds; i++) {
pinMode(leds[i], OUTPUT);
}
Serial.begin(9600);
}
void loop() {
int digitalValue = digitalRead(soundPinDigital);
bool soundDetected = (digitalValue == LOW);
int potValue = analogRead(potPin);
mode = map(potValue, 0, 1023, 0, 5);
if (soundDetected) {
lastSoundTime = millis();
}
bool showLights = (millis() - lastSoundTime < 200);
Serial.print("Sound: ");
Serial.print(soundDetected ? "YES" : "NO");
Serial.print(" | Lights: ");
Serial.print(showLights ? "ON" : "OFF");
Serial.print(" | Mode: ");
Serial.println(mode);
if (!showLights) {
allOff();
} else {
switch(mode) {
case 0:
allOn();
break;
case 1:
waveChase();
break;
case 2:
alternating();
break;
case 3:
randomSparkle();
break;
case 4:
buildUp();
break;
}
}
delay(20);
}
void allOff() {
for (int i = 0; i < numLeds; i++) {
digitalWrite(leds[i], LOW);
}
}
void allOn() {
for (int i = 0; i < numLeds; i++) {
digitalWrite(leds[i], HIGH);
}
}
// MODE 1
void waveChase() {
if (millis() - lastTrigger > 70) {
allOff();
digitalWrite(leds[currentLED], HIGH);
currentLED = (currentLED + 1) % numLeds;
lastTrigger = millis();
}
}
// MODE 2
void alternating() {
static unsigned long lastSwitch = 0;
static bool showOdd = true;
if (millis() - lastSwitch > 100) {
showOdd = !showOdd;
lastSwitch = millis();
}
for (int i = 0; i < numLeds; i++) {
if ((showOdd && i % 2 == 0) || (!showOdd && i % 2 == 1)) {
digitalWrite(leds[i], HIGH);
} else {
digitalWrite(leds[i], LOW);
}
}
}
// MODE 3
void randomSparkle() {
static unsigned long lastSparkle = 0;
if (millis() - lastSparkle > 80) {
allOff();
int numToLight = random(3, 6);
for (int i = 0; i < numToLight; i++) {
digitalWrite(leds[random(0, numLeds)], HIGH);
}
lastSparkle = millis();
}
}
// MODE 4
void buildUp() {
static int level = 0;
static unsigned long lastUpdate = 0;
if (millis() - lastUpdate > 80) {
level = (level + 1) % (numLeds + 1);
lastUpdate = millis();
}
for (int i = 0; i < numLeds; i++) {
if (i < level) {
digitalWrite(leds[i], HIGH);
} else {
digitalWrite(leds[i], LOW);
}
}
}


https://drive.google.com/file/d/1obWk5wuC0hEQeyQZmctcCwUa2n4qYinc/view?usp=sharing
My initial prototype took the form of a mini stage. It helped to transform the circuit into a performative object rather than a purely technical one. The miniature stage acted as both a housing for the LEDs and a metaphorical platform for the “performance” of light reacting to sound.
https://drive.google.com/file/d/1uqLatABcnJyYIC82UfCCl1K5RdD9Riyc/view?usp=sharing