GrainflowLib is a header only library for granulation. This library is a work in progress and may change dramatically withing sort periods of time. Here is an example of the implementation in Max and PD