For some simple ones it wouldn't be very hard to create a program to do it automatically, but for the more complex it would be almost impossible. It would have to parse each MML command to determine which are musical notes and which are commands - like those that adjust pitch & octave, then determine how to rearrange them. Very complex... good luck. Let us know when you're done with it.