Add a cubic interpolate function...
Add a (really slow) version of the rate envelope that I have in the C code.