If it matters to you, the leds well be put in a box with a momentary pressure switch. Stand on the box, the lights come on. If the program is always running, I won't need to choreograph exactly when to go stand on the light box. I go when I want to, and it's running to tempo already for me.
My thought was I could simply say "flash at 120 bpm for x minutes and xx seconds, then change to 100 bpm for x minutes" or just have it keep a clock and it can flash so fast until it reaches 2.30, then change.
You can do that, but the lights will be setting the tempo (like a click-track or metronome) and the lights will have to start before you count-in. (Or, you could have a small LED that you or the band can see before count-in and hit the "big lights".) That's a "big decision" if you want the lights leading the band...
You wouldn't need to program-in the 2:30 time if you simply stop the effect with a foot switch.
That's all fairly easy. It's just the Blink LED sketch with variable timing. But, you'd have to come up with a user interface concept... Do you want to simply turn a knob to set the tempo? Do you want a rotary switch or pushbuttons to set common tempos? If you have a continuously variable knob, do you want an LCD display to show the actual tempo?
Powering the led straight from that has resulted in blown leds haha.
At some point, we'll need to talk about your hardware... There's no need for the LED to go over "100% brightness" no matter how loud the signal is. I know you are not powering a 10W LED directly off the sound board. You could power (and blow) a regular LED from you speaker outputs. And hopefully, you'd have a current-limiting resistor so you don't blow the amp when the LED dies and shorts-out!
I woulda need to figure out how to sry up a thing that says "flash when this threshold is passed".
Once you are detecting "loudness", that's just an if-statement in your software.
One of the simplest effects I've built is a "flicker effect" that turns the LED/light on when the signal is higher than average and off when it's below average. For the average, I save one reading per second in a 20-element [u]circular buffer[/u]. This works great since it's on half the time (whenever the signal is above average) and off half the time (whenever the signal is below average) and it automatically adjusts to the volume. To keep things interesting, this effect is randomly "inverted"... That is, loud sound turns the light off and quiet sound or silence turns it on. (All of my lighting effects are randomly inverted.)
This effect should work well with a kick-drum, but you might have to add a 100mS or 200mS delay if you don't want a quick-flash with every drum hit. (Because of the nature of the drum sound, it probably won't be on half of the time.)
one or two leds would simply flash
Another of my effects is a "toggle" effect with two lights on opposite sides of the stage (I'm using 90W halogen floods). One light is on while the other is off and it toggles back-and-forth (approximately) with the beat. There's also an option where the toggle speed is determined by loudness (again with reference to that 20-second moving average).
Beat detection - I'm not going to give you my beat detection code because it's intermixed with other code, and like I said, it's "crude"... Sometimes it misses a beat and sometimes it's triggered when there's no beat.
The basic concept is this: First, there's a delay (200mS, I think) after the last beat. That's just some extra logic to keep the triggering realistic... I don't want to detect 500 beats per minute... Then, I look for a "peak" that's the same as the highest level in my 20-second buffer.* If a beat isn't triggered right-away, I start ramping-down the trigger threshold over the next couple-hundred milliseconds... In other words, the longer it takes to trigger a beat, the more sensitive it gets.
Like I said, other people have made beat detectors so you might want to look for a better one. IMO - A better one would be more like the way a human taps his/her feet to the music... You "get in rhythm" and anticipate the next beat... You don't wait 'till you hear the next beat before you tap your foot.
- I use a [u]peak detector circuit[/u] with an R-C time constant of about 100mS. This gives a varying DC voltage that tracks the volume. I can read the "volume" signal at about 10 times per second (or faster) and I don't have to read the audio waveform thousands of times per second.
That also means my 20-second average is not a true average, but it's an average of short-term peaks and it works OK as a reference. Some of my effects use the average as a threshold/reference. And, some effects use the highest peak in the past 20 seconds. Again, it's a peak but it's it's not the true peak, because I'm only saving samples once per second.