Re synching to music, all you really need is the beats-per-minute of the music track. I guess the simplest way to do this is to literally count the beats over a timed 60 seconds. Once you have the BPM you can calculate how many frames are needed per beat, based on your frame rate. For example, if you are animating at 24 frames per second, and the music track is found to be running at 144 beats per minute, then:
24 frames per second = 1440 frames per minute
1440 / 144 = 10
So, there will be 10 frames between each beat.
Of course, it gets a little more tricky if the numbers aren't as tidy as that, for instance if the BPM is 150 then there are 9.6 frames per beat. I guess in this case you would round off the frame number for the sake of keyframing (eg 9.6 becomes 10, 19.2 becomes 19, etc.) Alternatively you could perhaps script the motion which allows for mathematical accuracy, but you would need to be very keen to define a script for each of the figure's joints in a dance routine (not impossible, but this would need some serious planning).