I played with a free script called Maian Music from maianscriptworld.co.uk a while back. It's free so it can't hurt to take a look and see if it will do what you need.