To granulate a sound is to break it up into many tiny grains — each anywhere from a few milliseconds to about a half second in duration. Each grain is encased in an envelope and can be independently transposed. The grains flow out of the granulator in one or more streams, one grain after another. The time between successive grains determines the grain rate, which has a profound impact on the sound. If the grain rate is regular, you may hear a pitch with a frequency corresponding to the time between successive grains. If the grain rate is randomly varied, this pitch disappears.
Why would anyone want to granulate sound? The applications range from time-scaling audio to making a sustained sound out of a short snippet (e.g., a choral sustain from a guitar pluck) to creating interesting noisy or pulsed repetitive textures. Play with it and see.
While Max is a (mostly) closed-source commercial application, many people have developed externals that you can add to Max to extend its capabilities. (“External” is a term used for the individual objects you drop into your patch.) Most of these are provided with the Max application, but you can add others.
We will use one such external, jg.granulate~, to perform granulation on audio stored in a buffer~ object.