iPhoto 4 slideshow script

I’m in need of a solution I’m hoping Applescript can help me with…
I have 6 albums in iPhoto 4.0.1, each with it’s own accompanying music track. I’d like to be able to, via Applescript, control the timing of each slideshow to fit the length of the music. I know that I could trim the music to fit the number of images, but I would prefer some other option.

Is this possible and, if so, could someone help get me started?

Thanks in advance…

Todd Reid
reidjazz@comcast.net