I compose a lot using the software, Max/MSP. It is a nice program that people in a lot of different disciplines use, such as, dancers, musicians, video specialist, just to name a few. You can learn more about Max/MSP by visiting their website at: http://cycling74.com/
Mac users can download a simplified version here. Must have Max 5 in order for it to work.
Windows users can download a simplified version here. Must have Max 5 in order for it to work.
The granular synthesis was done using the sogs~ object which can be downloaded at IRCAM. Unfortunately, you need a subscription to do that and it is not cheap.
I use a Yamaha MFC10 Midi Foot Controller to trigger Max/MSP program changes.
I modified the Constellations patch to create the following pieces: