I just released my new external grainstretch~
This flexible granular audioplayer object is based on the algorithm in Mattijs Kneppers’ granular timestretcher max patch. But now in 1 max object and with lots of other features and options (including streaming mode, so you have a ‘no-latency’ pitchshifter).
for mac and windows
for max 5 and max 6
can i use in maxforlive?
your search path perhaps isn’t set up properly?
Thank u ! it is stable ?
yes you can use it in max 4 live, make sure it the mxo file (for mac) or mxe (for windows) is in in a place where m4l will find the object, usually something like the Cycling ’74 folder of your max install
I hope it is stable, I can’t get it to crash… if you can, let me know and I’ll try to fix it
ok, interesting… what version of os x do you use? and what processors do you have? Intel or not?
It is compiled with Lion, and I know it works fine in Snow Leopard. It is not a universal build so it won’t work on a powerpc (G5, G4 etc)
here you go.
System Version: Mac OS X 10.5.8 (9L31a)
Model Name: iMac
Model Identifier: iMac7,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
i’m very behind. i’m guessing it wont run on leopard?
Hey, this is really great! Only one question: is it possible to turn looping off?
thanks for doing that port to leopard! i cant get over how great this is. reminds me loads of granulab on the pc from years ago. never been able to find anything to replace that, until now!
i love how with a super slow speed and a high grain size you get mega evolving techno!
good to hear that it works now for you nedrush
@rwg: unfortunately no, but what about this solution, it uses an adsr~ to mute the signal and stop the processing too:
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 1648.3oc4ZstiahCE92IOEnn8G6tJMx231JUotOGcWMxAbx3VBfLjocZU6y9 5KPBIABtQF1tZGogPLFrOemuyUxWWtX01hOypV48Gdu2awhutbwB8PpAVz78 EqNP+bRFsROsU4rOUr8CqVatTM6y05ge6a8.sCle7.OOiUquATyf7T87j26a HwclYww51oBaFcWQdcN8.SeC+ofSyZmeIsN4Yd99mDrjZytNLZCV9Ggr1CGP 1.je3qNh.a.d+cy8YVj5WKYlaZEOWd6+cm0qh+E80fnM.0nea4R0g0VhJIEG NvjOyqgkp5hRuxL5qaoIez6ux+UZdpWZkbLQQBqpRJK+V6MkwyYIEGyq6BaW fks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UDtSvF+4tpUKnMxg3GjyQoL1zS1eHrC4RMvwO8bI1WRoI12f+66gY 37iiMMy2u83IwKqHwjlF7QJxTx7k40VKS+s4w8L2zZ8UsCndKX6kkjmm1kJn twhWXhK6795NGFsU6CT9gQsaDzae8j6yKjSMim7wA7mEE37lrQv1VgbakHWT o71BQJSzUKqQSldOGb1P5d7T07EpW8w05fKveLIFng+qOANPTG3Mc2cUeFF3 S6Qirbwh1QMc4Bscem4AMSILJBg8UmQBA9QQM2w+wXtiyBgPGxBa5l4+ingn +0og5aW+xFu5G9hV+zBAm4lUEGEIs3e6aOz67tHkUUyyO0ng2e9085AOMom4 oor7t.9AdZYgTM1rIfQD8KCxzvVBx7RDIcj1TdkRokNb63rU.T41Lp.bkTNp .fMuFZBHT+6VnQbTeaJj.vDHAHbjYOGcgDDMIRf5GJQG9wCJAta+ndCDNGQi B2D0zuchzFuCpp91Dfpw1HEjQrLcHnZiglp+9yjRVS5Fa+b0ldJ2O3.Wret1 QDx2vzBz+rXhN8kIfuAsQAq98NNWJ3Xa.T3rsef1DpT0Fq4BevVrehmQ7AYa pDy39AMlCq4yAAxJ9y74.EaC+4Juri5vJLdCx27BxPm8Xo+1D3xBCbgH3PJm Mw.txNYJ2OVmBw7rcBrIByUoCOoV.13wBNi4sZiEo+i5wxTqHsr7Elnp4Yp2 JqNP+foxyf0KM8Os3bE3qDrW3symrT8z91x+A0zOZaA -----------end_max5_patcher-----------
That still leaves the question how to stop it at exactly the end while playing with the playback parameters. But that raises more questions, also about position randomness and such.
Absolutely lovely – this is already a great thing for realtime processing. But, okay, now on to my question at hand:
Does anyone have an idea about how to apply the stretching itself to a rotating live input buffer? I’d love love love for that to be at all possible.
well, internally it has a rotating live input buffer :-)
what is that you want exactly?
yeah, it occured to me, since you can do the "randompositionoffset" even in streaming mode.
Well, I already love it as-is, but would kill for a way to get that time-stretched sound with this even in streaming – in other words, to get the [speed $1] and ideally [pos $1] to run in streaming mode; yes, it might end up sounding… "experimental", but that’s what I’m looking for ;)
yeah, I already did something similar. What I need, among other things, is to be able to trigger a soundfile and play it once (without looping) and adjust its speed dynamically according to some live-input data.
Of course other objects exists for that, for example the supervp.play~ from ircam – but I actually really like the sound and some of the other features of the grainstretch~… So a non-looping version would be awesome ;-)
well, honestly I’d say it’s very different; I’m talking about the live-input streaming version, not a buffer manipulator per se.
@Wetterberg: rwg is talking about something else: turning loop function off
What you want with the live buffer is a bit of a puzzle and maybe a separate object will work better for that. Maybe I’ll do it sometime, but not very soon.
@rwg: I’ll check how much work it is and I can imagine that it’s hard to get it proper sounding with position- and pitch randomness (these wrap around the file currently)
is this something you are planning to continue work on and expand? if so can i offer a suggestion of a pitch envelope on single grains? so if i have a high grain size and a slow speed, i can get pitch changes with each new grain? or is that totally wack?
if not could i do this in max anyway? maybe but somehow monitoring the grain size, converting that to clicks then using those clicks to trigger an adsr~ multiplying the pitch?
@nedrush: I think I will let it go for a bit, I mean, I just wait and see what people want and collect feature requests (and fix bugs if people have problems) and then in a later stage I’ll decide what to add.
I don’t full understand your idea, currently the pitch is applied at the start of the grain (and it remains constant during the grain), this makes parameter changes smooth and without clicks.
This already sounds a bit like what you are after, or do I miss something?
Yes, of course randomness doesn’t go so well with the idea of a non-looping player… But without randomness it would be great – and in my eyes really make this external a bit more complete – but hey, this is just my opinion ;-)
Anyway it should be possible to make a system that stops it at the end by using information about samplelength, speed and position. I’ll get back about that if I manage to make a solution when I have time.
I hope you continue to develop this external as I think that what you have done this far is really good!
this is a great object, some very clean musical sounds imo. thanks very much, I can see this getting incorporated into a few patches :)
I just put grainstretch into my msp-externals folder but it doesn’t come up when i look for it on object explorer. Any ideas why ?
personally I never use the object explorer, but I don’t think third party externals appear there.
does it work when you simple make a new object (press ‘n’) and type grainstretch~ in it?
Yes it does actually.
Timo, this is a really nice and good sounding max external used it for awhile in max. Now just built a device around it in M4L and it seems to act a bit differently but I have to try it further to be sure…
i’m using this in a sampler project. timo, i noticed it seems to be hardcoded to 44kHz. with other samplefreq. a speed value of 1. is not the normal pitch anymore. i can work around it. it creates nice grain clouds.
I like this object and have built it into a patch I’m using Tuesday. For all of its great features it is lacking some basic functions (based on copying and pasting from the help file), such as a start/stop loop, and a reset for neutral settings. I’ll have to hack into it more to deal with the latter. For the former I’ve added a standard gain~ object, with 128 and 0 messages sent to it; I’m not so much starting and stopping the loop as I am the audio feed. Feeding a silent audio file into the buffer is also useful.
I’ve been enjoying your grainstretch~ external for a few months now. It’s very comprehensible. Huge thanks. Big benefit to my quality of life. I have two questions and thought I’d ask them here.
First, what kind of grain envelope is controlled by the fade command? I suspect it’s a Hanning, but maybe it’s a trapezoid, or maybe there’s a way to customize it.
Second, do you have any version where the grain number can be customized? I should be able to handle 32 voices no sweat, if that’s an option.
Timo , Sir ? can you provide 64bit version for windows ?
Great, great, great external..thanks Timo for sharing your work with us.
I’m using it mostly as a sample-masher/granulator.
Feature request, if I may: all the parameters control seems to work very smoothly, but sometimes I get some clicks when changing the grain size, has anyone else noticed that?
It would be great to have a click-free ‘size’ parameter control.
Btw, thanks again for this amazing external Timo
I was using grainstretch OSX 32 bit previous and everything was fine.
Now using it Win7 64 bit M4L Live 9.1.5 and Max 6.1.7 and I get an error in the max window:
newobj: grainstretch~: No such object
However when I add a new object it shows up, and I can view the helpfile(so seems like max can locate the external ok).
32-bit objects only work in 32-bit hosts. You can’t just switch over and have it still work, I’m afraid.
Forums > MaxMSP