Hi all,
I've uploaded a new sampled sound granulation patch to my website at: http://www.VideoGameAudio.com/ under the 'patches' section: http://www.sfu.ca/~leonardp/VideoGameAudio/main.htm#patches
It granulates a loaded sample and allows the grains to be distributed in 5.1 surround. It should be fairly easy for you to use the surround or granulation code in your own work. Let me know if it is useful to you and perhaps give credit when appropriate.
I presented it as part of a demonstration at the GameSoundCon in San Francisco in November 2009 and had several people ask for the code, so here it is. If you're interested in further updates related to using Pure Data with video game audio, you can have a look at : http://twitter.com/VideoGameAudio .
Cheers, Leonard J. Paul / VideoGameAudio.com