Using Arduino to have a normal traffic light change to have all lights blinking

Hi, this is my first time using Arduino and I am completely lost. | have basic c++ skills and my group needs to build a traffic light that will start blinking when it senses a sound. So far we got the part where it picks up the sound and sends a signal, and we also have a working traffic light. But we cannot figure out the code to make it so that when it senses a signal, it will have all the lights blink. Thanks a lot!

and sends a signal,

What the heck does this mean? Are you operating some servos that put "the signal" in a box, folds the flaps shut, addresses it, and calls UPS?

But we cannot figure out the code to make it so that when it senses a signal

What kind of signal? Analog or digital? On which pin? For how long?

Something like this pseudo code

void loop() {
  detectSound(); // sets a variable called soundDetected
  blinkLights();
}

void blinkLights() {
   if (soundDetected == true) {
        // stuff to make lights blink
   }
}

...R