There are several different ways of doing it...
Here's an example:
[Link: starfiresales.com]When we do our fireworks show, we have a manual controller and a musical score with trigger cues. More advanced controllers automate the process. What you saw tonight was most certainly a computer controlled firing system.
The sheer complexity of what they pulled off tonight, between the numerous live sound systems, the camera shots, the routing, the CG, the LED signs in the stands, all tied to a pyromusical... Phenomenal...