For my personal project I wrote a program in Max that manipulates polyrhythms in a mathematical way. I did the manipulation with tempo in each of the channels. So if the new tempo is x0, the old tempo is x1 and the polyrhythm is y, then x0 = x1 multiplied by 1/y. It is hard to visualize with just the formula but all the math is in the patch which is copied below.