Max/MSP: grainstretch~

Flexible realtime timestretching and pitchshifting with a granular engine in Max/MSP. With this external you can expand your max toolkit for natural and experimental playback. It incorporates the algorithm used by Mattijs Kneppers in his granular stretcher patch and adds a load of extra options and features.

It is available for both windows (xp and higher) and mac (OS x10.5 and higher), and works in max 5 (in 32bit) and max 6 (in 64 bit).

download it here (v20120126)


The video below gives you an impression of what you can do with it by giving you a walkthrough using the helpfile:

- Mac OS X 10.5 support added
- first public version





7 Responses to “Max/MSP: grainstretch~”
  1. Shawn Standing says:

    Hi there:
    I look forward to trying your granular patch. Thanks for the generosity.


  2. Arvid says:

    This is awesome! Just tried it out and it sounds great – thank you.

    But — is there a way to set loop start and end points in the non-realtime version? That seems like the one thing lacking that would make it perfect. I was just about to start experimenting with using grainstretch~ to replace my annoying double-buffered groove~ abstraction i’m currently using in a large multi-channel live looping patch, but I would really need some way of setting loop points.

    • Timo says:

      Thanks Arvid,
      someone else had the same question the other day, this was my reply:

      ” yes, that parameter is missing, it’s a bit hard to do that smoothly because you will soon hear clicks at the start end and it’s a bit of a puzzle how to handle the grains in that case.
      btw, if you set the speed zero and make the grainsize 200-500ms it will loop that part .What you could do then is add another grainstretch~ after that (one without a buffername, the streaming version) and play with the grain parameters of that one. Is that a nice workaround for you? :-)”

      when I think about it again, I think it’s nice that you can now easily control how smoothe the loop should be with the fade parameter

  3. Joshua says:

    I feel like there are some attributes and/or arguments that might not be mentioned in the help file. Is there any documentation on the object elsewhere?

  4. Peer says:

    maybe it’s completely stupid what i write but for the start-/end-loop points:
    at the third outlet u put a >=~ 0. together with an edge object. the right inlet of >=~ determines the end point of the loop and when the end is reached, the left outlet of edge triggers the setpos $1 message.
    and that’s how i can set my start- and endponits of the loop.

  5. Peer says:

    …and the fade in / fade outs u can do like:
    third outlet of grainstretch~ goes to a scale~ object. min input is your start loop point, max input is your end loop point. min output is 0. max output is 1. that goes to a trapzoied~ with which u generate your fades….
    together with what i described before you can set perfectly set loop start and end points and fade in and out….
    but i guess you guys know all that….and i guess the question was more about non-real time stuff…