Arduino Uno WAV out and LED control

First i'd like to start out by saying that i have done a decent amount of research regarding this but ive failed to locate the info i need anywhere. I'm sure i missed it somewhere so i do appologize if this is something that has been answered before.

So the project at hand involves playing a WAV file from the Uno. A simple enough prospect on its own. However i need to control 3 lights as well while playing the audio. a given sequence of lights will correspond to the audio file being played. 1.WAV requires LedSequence1, 2.WAV requires LedSequence2, 3.WAV requires LedSequence3, etc. now if i just wanted to turn the light off or on when i started/stopped playing a file then id know exactly what to do but since i need to dim/brighten some of the lights mid playback i am stumped. i considered using an interupt to change the pwm value after every n bytes played back but im afraid this could cause unwanted jitter.

Also on a side note, im not sure if the 328 is even fast enough for this (perhaps someone could advise me on this) but my crude understanding of the wav format and how most of the arduino audio out projects work seems to imply that if i were to grab a byte from a given file and a byte from another file then average them before outputting the subsequent value to the pwm pin then i would have very rudimentary audio mixing. im not looking for perfect HiFi 96khz audio here, just playing some small sound effects from the old Joust arcade game.

thanks in advance for any help and again im sorry if this has been covered somewhere else already

You need a state machine to track your sequence and you need to play your sample aysynchronousley.

I did something similar in this project:-

http://youtu.be/pL0pMAPkkVw

The way the face is synchronised to the sound is simple. The output is fed through a diode to a resistor / capacitor to ground and into an analogue input. While the sound is playing it takes a sample from the analogue input and uses this number to pick a face pattern. The larger the sample the bigger is the mouth on the face pattern picked. It seems to work quite well in synchronising the face to the sound.

The part of the code that does this is here. It uses the wave.isplaying class to keep going while the sound is playing.

// Plays a full file from beginning to end with no pause.
void playcomplete(char *name) {
    int face = 0;
  // call our helper to find and play this name
  playfile(name);
  matrix_setBrightness(15);
  while (wave.isplaying) {
  // change the faces here
  face = analogRead(3);
 // Serial.println(face2);
   face= constrain(face,210,400);
   //Serial.print(face); Serial.print(" - ");
   //Serial.println(map(face,210,400,0,10));
   upDateDisplay(map(face,210,400,0,10));
  delay(20);
  }
  // now its done playing put face back
  idleAnamateDisplay(3);
  idleAnamate = millis()+2000;
}