I was also interested in this sometime back and did not converge on an answer. For reference, this has been covered here:
http://www.picbasic.org/forum/showth...ht=roman+sound

I would also check the following, as it seemed a more elegant approach:
http://www.picbasic.org/forum/showth...ighlight=ADPCM

Good luck.