Added granular synthesis code