You can try timing how long the animation takes to run and see if it's exact. Say you have 3000 frames with a animation speed of 60. If it's exact it should take 50 seconds.
If it is not exact you could set the animation speed to 0 and manually calculate which frame to use with events.
start of layout:
-> play music
time <= 50
-> set animation frame to int(time*60)