grainbuffer~ is a MSP object that exploits the buffer~ object built into the Max/MSP environment.