[sharing] grainstretch~

Jan 25, 2012 at 2:38pm

[sharing] grainstretch~

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

have fun!

http://www.timorozendal.nl/?p=456

#61446
Jan 25, 2012 at 3:11pm

@Timo

thanks for this. very nice
regards.

john

#221639
Jan 26, 2012 at 12:27am

can i use in maxforlive?

#221640
Jan 26, 2012 at 12:47am

http://i40.tinypic.com/23vkri0.jpg

i get his when trying to load in m4l. am i doing something wrong?

#221641
Jan 26, 2012 at 1:34am

your search path perhaps isn’t set up properly?

#221642
Jan 26, 2012 at 3:48am

Thank u ! it is stable ?

#221643
Jan 26, 2012 at 7:13am

thanks guys

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

#221644
Jan 26, 2012 at 12:34pm

i tried reinstalling, copying into cycling74 folder and got this in the max window.

http://i42.tinypic.com/dpaek3.jpg

#221645
Jan 26, 2012 at 1:03pm

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)

#221646
Jan 26, 2012 at 5:28pm

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?

#221647
Jan 26, 2012 at 5:47pm

yes that was the problem, it didn’t run on Leopard, but I updated it, please try again with the new version on http://www.timorozendal.nl/?p=456

#221648

rwg
Jan 26, 2012 at 7:49pm

Hey, this is really great! Only one question: is it possible to turn looping off?

#221649
Jan 26, 2012 at 8:46pm

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!

greta work.

#221650
Jan 26, 2012 at 9:54pm

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. –

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.

#221651
Jan 26, 2012 at 10:27pm

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.

#221652
Jan 26, 2012 at 10:44pm

well, internally it has a rotating live input buffer :-)

what is that you want exactly?

#221653
Jan 26, 2012 at 11:22pm

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 ;)

cheers,
Andreas

#221654

rwg
Jan 27, 2012 at 12:11am

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 ;-)

Cheers!

#221655
Jan 27, 2012 at 2:12am

well, honestly I’d say it’s very different; I’m talking about the live-input streaming version, not a buffer manipulator per se.

#221656
Jan 27, 2012 at 8:51am

@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)

#221657
Jan 27, 2012 at 12:37pm

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?

thanks.

#221658
Jan 27, 2012 at 1:13pm

@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?

#221659

rwg
Jan 27, 2012 at 3:42pm

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!

#221660
Jan 27, 2012 at 4:16pm

@timo i could probably demonstrate the idea using a regular sampler and post a video, or i’ll look around for something that explains it better.

#221661
Jan 27, 2012 at 7:14pm

@nedrush

maybe look around for a video:

http://www.youtube.com/watch?v=2FFEBeQBqhA

Inspired by Timo’s video, I’ve got some very funky pitch/time stretchiness here, applied using the very algo Timo (and yourself) describes

Brendan

#221662
Jan 28, 2012 at 2:08am

http://www.sendspace.com/file/4we8ln

here you go. heres me jamming around with it, plugged into a pitched reverb which is on a feedback loop.

apologies if you’re not into half an hour of cacophonous drone techno.

#221663
Jan 28, 2012 at 12:45pm

this is a great object, some very clean musical sounds imo. thanks very much, I can see this getting incorporated into a few patches :)

#221664
Jul 24, 2012 at 3:28pm

Hi,

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 ?

Thanks

#221665
Jul 25, 2012 at 8:47am

Hi Freddy,

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?

Timo

#221666
Oct 3, 2012 at 1:02pm

Yes it does actually.

Thanks

#221667
Oct 3, 2012 at 9:11pm

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…

#221668
Oct 5, 2012 at 11:23am

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.

#221669
Oct 5, 2012 at 1:34pm

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.

#221670
Jan 5, 2014 at 12:56pm

Hi Timo

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.

Thanks again
Jesse

#277482
Jan 5, 2014 at 1:04pm

Yes !
Timo , Sir ? can you provide 64bit version for windows ?

#277483
Jan 23, 2014 at 7:16am

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

#278953

You must be logged in to reply to this topic.