Let's Make Robots!

Need some help with combing some audio related code.

This is what I'm working with:

 

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

int pinSpeaker = 11;

 

//

int led[10] = { 2, 3, 4, 5, 6, 7, 8, }; // Assign the pins for the leds

int leftChannel = 0;  // left channel input

int left, i;

 

 

 

void setup () {

    pinMode(pinSpeaker, OUTPUT);