LED with Music Notes

kculm:
This is what I got, I found it online and just added the rest of the notes.

It works kind of. It turns on one lite per beat not per not.

I may be to green to take on a task like this.

Thanks for any help you can give.

...

else {
      playNote(notes[i], beats[i] * tempo);
      digitalWrite(ledPins[i], HIGH);
      delay (100);
      digitalWrite(ledPins[i], LOW); 
...

Looks to me like you're pretty close. But I think what you want to do is:

  1. turn on the appropriate LED
  2. tell the note to play
  3. turn off the LED
  4. delay 100 milliseconds

Do you see what you need to change, above?

Cheers,
John