Forums > MaxMSP

Granulation with Poly~

November 27, 2009 | 9:18 pm

Hi there,

First post for me. Greeting to everyone at the Cycling74 forums.

I am trying to build a granulator from scratch (there is an actual practical reason for doing so :). I have built a single grain abstraction and am using it inside a poly~. However, no matter what I do, whenever I raise the density of the grains so that they overlap, I start getting clicks. I tried tweaking the individual envelopes and thispoly~ messages endlessly and still cannot find where the clicks are coming from. Can anyone help? I will be happy to share my patch.


November 27, 2009 | 10:00 pm

When I made a granulator a couple years back, called "The Mill," I had the same problem, and someone suggested that I delay turning the voice off for a millisecond or five. The envelope in my case is a line~, and I have a delay 5 before the done output hits the thispoly~ to turn the voice off.

November 28, 2009 | 4:31 pm

Thanks Chris! I tried it and unfortunately it didn’t work…
Going to build voice allocation myself and see what happens. The grains will have to be on all the time. At least I will be able to see if the problem is with poly~ or my grains.

November 28, 2009 | 4:51 pm

Maybe you should post your patch?

November 29, 2009 | 12:17 pm

are you dynamically allocating voices (with the note message to poly~)? and are you correctly setting the busy state with thispoly~?

December 7, 2009 | 4:56 pm

Thanks for the answers guys. Yes I was dynamically allocating voices. The problem had to do with windowing in MSP instead of in MAX (using wave~ with an envelope buffer driven by groove~, instead of line~), and also with some clashing send objects. I solved the clicking problem, but now I am having problems with changing parameters in real time.

How do I post patches to the forum? For some reason the link to the beginners FAQ is not working for me…


December 7, 2009 | 5:38 pm

just hit ‘copy compressed’ from the file menu in max.
paste the result (which is copied into the clipboard) into your reply.


December 7, 2009 | 5:56 pm

Ok. Below are the two patches I am using. The first patch contains the poly~ and sits within a bigger performance patch that controls the parameters according to cues and records live input into a 2000ms buffer, "Olly".

My aim is that the granulation happens all the time is faded in and out according to cues. At certain cues the contents of the buffer is re-sampled from the live input, while the granulation is still running but is silenced.

What happens right now is that when recording the live input into the buffer, for some reason the poly~ does not output any sound until I resend a "voice $1" message to it – that is until I reset it. Then it works for a while, even when the buffer is changing, but stops after some time, and needs another reset of the voice number. I must be doing something wrong. I never learned how to construct a "proper" granulator, so will be happy to get any kind of advice.

Two patches. First, where the poly~ sits:

— Pasted Max Patch, click to expand. —

And the grain patch: GRAN_AG4

— Pasted Max Patch, click to expand. —


Viewing 8 posts - 1 through 8 (of 8 total)

Forums > MaxMSP