//Arduino Audio Visualizer

   
int DO = 2; int DA =A0; int sensorVal=0; void setup() {   // put your setup code here, to run once: pinMode(7,OUTPUT); pinMode(6,OUTPUT); pinMode(5,OUTPUT); pinMode(8,OUTPUT); pinMode(9,OUTPUT); } void loop() { //Serial.print("Digital: "); //Serial.println(digitalRead(DO)); //Print the digital value   // put your main code here, to run repeatedly: sensorVal= analogRead(DA); Serial.print(sensorVal); if(sensorVal>29){   digitalWrite(7,HIGH); }else{ digitalWrite(7,LOW); } if(sensorVal>27){   digitalWrite(6,HIGH); }else{ digitalWrite(6,LOW); } if(sensorVal>33){   digitalWrite(8,HIGH); }else{ digitalWrite(8,LOW); } if(sensorVal>36){   digitalWrite(9,HIGH); }else{ digitalWrite(9,LOW); } if(sensorVal>31){   digitalWrite(5,HIGH); }else{ digitalWrite(5,LOW); } }

Interesting next step: https://bochovj.wordpress.com/2013/07/07/bass-detection-with-arduino/

http://dpeckett.com/beat-detection-on-the-arduino