Help with some music coding with leds

/*
 * This example uses a piezo speaker to play melodies. It sends
 * a square wave of the appropriate frequency to the piezo, generating
 * the corresponding tone.
 *
 * The calculation of the tones is made following the mathematical
 * operation:
 *
 * timeHigh = period / 2 = 1 / (2 * toneFrequency)
 *
 * where the different tones are described as in the table:
 *
 * note frequency period timeHigh
 * c 261 Hz 3830 1915
 * d 294 Hz 3400 1700
 * e 329 Hz 3038 1519
 * f 349 Hz 2864 1432
 * g 392 Hz 2550 1275
 * a 440 Hz 2272 1136
 * b 493 Hz 2028 1014
 * C 523 Hz 1912 956
 * D 588 Hz 1700 850
 * E 658 Hz 1519 760
 * F 698 Hz 1432 716
 * G 784 Hz 1275 638
 * A 880 Hz 1136 568
 * B 986 Hz 1014 507
 * x             655
 * y             715
 */
int speakerPin = 13; //pin to use to drive speaker
int ledPins[] = {2, 3, 4, 5, 6, 7, 8, 9};
// next line lists notes we want to be able to play
char names[] = {'c','d','e','f','g','a','b','C','D','E','F','G','A','B','x','y'};
int rangeOfNotes = 16; //number of notes available in the above array
//next line lists values corresponding to note names in names[] array
int tones[] ={1915, 1700, 1519, 1432, 1275, 1136, 1014, 956, 850, 760, 716, 638, 568, 507, 655, 715};int length = 17; // the number of notes and rests I want to play in my song
char notes[] = "GAGFEFGDEFEFGDGEC"; // notes to play. A space represents a rest
/*next line lists how long to play each note or rest.
 it has to be a double rather than an int to allow for decimals*/
double beats[] = {1.5, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 4 };
int tempo = 300; //how long one beat is in milliseconds
void setup(){
pinMode(speakerPin, OUTPUT);
 //Setup pin modes
pinMode(ledPins, OUTPUT);

}

 
void loop(){
 for (int i = 0; i < length; i++){//for each note in the character array (string)
 if (notes[i] == ' '){//if the character is a space, do the following line.
 delay(beats[i] * tempo); //rest (there is a pause in the music)
 } else { //otherwise (if the character is not a space), do the following line.
 playNote(notes[i], beats[i] * tempo);/*play the note notes[i] for
 the ammount of time beats[i] * tempo, by using the playNote function defined below*/
 }
 //delay(tempo/2);//if you want to include a pause between notes, but throws rhythm off.
 }
 }

void playNote(char note, int duration){//plays the note "note" for the time "duration"
 //play the tone corresponding to the note name
 for (int i = 0; i < rangeOfNotes; i++){
 if (names[i] == note){
 playTone(tones[i], duration);
 }
 }
 }

void playTone(int tone, int duration){
 for (long i = 0; i < duration *1000L; i += tone * 2){
 digitalWrite(speakerPin, LOW);
 delayMicroseconds(tone);
 digitalWrite(speakerPin, HIGH);
 delayMicroseconds(tone);

 }
 }

````Preformatted text`

The song it plays or beeps is London Bridge, it works great and i got the frequencies down, but they also want working LEDS. Right now the LEDS are connected to 2-9. This is how everything is connected. Piezo box is connected to 13. (pin2-pin9) and (pin13)
So what I am asking is, how could I make it play piezo and how to code in the LED commands for them to music plays.

Right now the LEDS don't work. Also I've bene trying to impilment my old code to make the LEDS go on and off, but they don't want to sync with one another, so im just stuck with 8LEDS plugged in not doing anything while the piezo box beeps London Bridge.

Is there enough power?
Are the LEDs flickering or turning on, but not to the correct color?

Schematics please....

Schematics for the leds?

Schematics for the entire system.

p1

p2

278930110_480774720457534_5292356322172747685_n

Circ-06 we are using for music this week

278930110_480774720457534_5292356322172747685_n

Circ-02 is what we used for morse and binary a few weeks ago. We're usppose to keep circ-02 and also use circ-06

No. As it looks like possible power problem, schematics for the entire project.

have two ground cords, one for the Piezo and one for the LEDS.

The tiny thumbnails you posted don't even come close to providing enough information to work with. Please Google, "electronic schematic".

Sorry, but that is really useless information. We have no idea where they are connected.

This could be a very simple fix, is the long meta tube thingy on the led on the left or right

left side.

Hmm, as Railroader said. Try unplugging all but one, does it light up?

the peizo is on the bottom right.
When I run another progarm, which is a code in Binary, the LEDS do light up and blink like normal.

Are you using Arduino IDE 1.0 or 2.0?

Circ-06
https://oomlout.com/oom.php/products/ardx/circ-02.html

These are the two Circuits that we have to mash together this week.

We are using arduino-1.8.19-windows
He prefers that we don't use IDE for now.