[sharing is fun] natural sounding granular time stretcher (Max 5)

Apr 23, 2008 at 4:06pm

[sharing is fun] natural sounding granular time stretcher (Max 5)

Hi all,

I finally managed to do natural sounding real-time granular time stretching / pitch shifting in Max, with pretty much the same quality as applications like Ableton Live and Reaktor. Unlike FFT-based (phase vocoder) approaches, granular time stretching has no inherent latency.

http://www.arttech.nl/max/time%20stretcher%20080423.zip (note, the patch is in Max 5 format)

This patch uses the great pitch~ object by CNMAT, that you can download here:
http://cnmat.berkeley.edu/downloads (scroll down to the alphabetical list of Individual Downloads and look for pitch~).

Enjoy!

Mattijs

#38379
Apr 23, 2008 at 5:16pm

Excellent work Mattijs!

Dan

At 6:06 PM +0200 4/23/08, Mattijs Kneppers wrote:
>Hi all,
>
>I finally managed to do natural sounding real-time granular time
>stretching / pitch shifting in Max, with pretty much the same
>quality as applications like Ableton Live and Reaktor. Unlike
>FFT-based (phase vocoder) approaches, granular time stretching has
>no inherent latency.
>
>http://www.arttech.nl/max/time%20stretcher%20080423.zip (note, the
>patch is in Max 5 format)
>
>This patch uses the great pitch~ object by CNMAT, that you can download here:
>http://cnmat.berkeley.edu/downloads (scroll down to the alphabetical
>list of Individual Downloads and look for pitch~).


Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
Malfunction
http://www.defectiverecords.com

http://www.jackosx.com

#133657
Apr 23, 2008 at 6:26pm

Mattijs Kneppers schrieb:
> I finally managed to do natural sounding real-time granular time
> stretching / pitch shifting in Max, with pretty much the same quality
> as applications like Ableton Live and Reaktor.

I’d love to hear it, but it doesn’t produce any sound here, I loaded one
of the sample sound files, and don’t know what it supposed to do,
hitting trigger doesn’t create any result, and the numberbox aside has
no lable (no idea what its for…) When loading the beat file, the
waveform~ shows only very small low bits, it seems it doesn’t import the
wav correctly, the Tones example at least looks like a waveform~…
It would be helpful if all number boxes would be limited to useful
values, as I have no idea what a useful value could be…

But anyway, thanks for sharing, I might be able to debug it myself, but
I am preparing a move, so I’d only do it in a few weeks…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#133658
Apr 23, 2008 at 8:03pm

hi mattijs,

really nice patch. could i ask where the herat sample is from?

cheers,

oli

#133659
Apr 23, 2008 at 8:37pm

the patch works for me. sounds great! I’ll definitely be getting some use out of this one.

very exciting. thanks!

#133660
Apr 23, 2008 at 8:43pm

Thanks Dan and Oli!

Stefan, I can’t reproduce that here. The patch should start playing directly after you read a sample, no need for triggering. Assuming you enabled dsp, of course. Do the samples play correctly in iTunes, for example? Which os/max are you on? I tested on Mac OS 10.4.11, Max 5 34567.

I agree that the number boxes should be limited, thanks for the suggestion. The number box left to the trigger is the position in milliseconds (which you can set by clicking in the waveform) that you can trigger by pressing the bang or the space bar. I added the trigger somewhat at the end to explicitly show the benefits of a granular based approach. Triggering like that, without any latency, is not possible with an fft based system.

Oli, I got the herat sample from a sound sharing website (http://freesound.iua.upf.edu/). It is made by ERH (http://www.myspace.com/sinuspiralmusic).

Best,
Mattijs

#133661
Apr 23, 2008 at 8:44pm

Quote: Mattijs wrote on Wed, 23 April 2008 22:43
—————————————————-
> Thanks Dan and Oli!
>

And Nick :)

#133662
Apr 23, 2008 at 8:44pm

It’s working really great ! Thanks for sharing.

#133663
Apr 23, 2008 at 8:51pm

Hi,

interesting patch but it doesn’t produce any sound for me…

Please help me understand why.

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/23, Mattijs Kneppers :
>
> Hi all,
>
> I finally managed to do natural sounding real-time granular time stretching / pitch shifting in Max, with pretty much the same quality as applications like Ableton Live and Reaktor. Unlike FFT-based (phase vocoder) approaches, granular time stretching has no inherent latency.
>
> http://www.arttech.nl/max/time%20stretcher%20080423.zip (note, the patch is in Max 5 format)
>
> This patch uses the great pitch~ object by CNMAT, that you can download here:
> http://cnmat.berkeley.edu/downloads (scroll down to the alphabetical list of Individual Downloads and look for pitch~).
>
> Enjoy!
>
> Mattijs
>

#133664
Apr 23, 2008 at 10:18pm

Hi,

don’t know if this can help but I’m on a G4/ OS 10.4.10

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/23, Mattijs Kneppers :
>
> Thanks Dan and Oli!
>
> Stefan, I can’t reproduce that here. The patch should start playing directly after you read a sample, no need for triggering. Assuming you enabled dsp, of course. Do the samples play correctly in iTunes, for example? Which os/max are you on? I tested on Mac OS 10.4.11, Max 5 34567.
>
> I agree that the number boxes should be limited, thanks for the suggestion. The number box left to the trigger is the position in milliseconds (which you can set by clicking in the waveform) that you can trigger by pressing the bang or the space bar. I added the trigger somewhat at the end to explicitly show the benefits of a granular based approach. Triggering like that, without any latency, is not possible with an fft based system.
>
> Oli, I got the herat sample from a sound sharing website (http://freesound.iua.upf.edu/). It is made by ERH (http://www.myspace.com/sinuspiralmusic).
>
> Best,
>
> Mattijs
>
>

#133665
Apr 23, 2008 at 10:23pm

gahhhh! pitch~ is only for Mac. How annoying…
Can I replace it with fiddle~?

I would really like to hear your patch but have
not had the chance to install Max5 yet. I figure
I was going to wait until they fix any missed
quirks. Can you post a Max4 version as well?

#133666
Apr 24, 2008 at 8:35am

Quote: Anthony Palomba wrote on Thu, 24 April 2008 00:23
—————————————————-
> gahhhh! pitch~ is only for Mac. How annoying…
> Can I replace it with fiddle~?

I heard some rumors that fiddle~ doesn’t work well with Max 5. But I didn’t try, I’ll look into that. Note that the Beats mode doesn’t use pitch detection, it should work without the pitch~ object.

>
> I would really like to hear your patch but have
> not had the chance to install Max5 yet. I figure
> I was going to wait until they fix any missed
> quirks. Can you post a Max4 version as well?
>

Is that because you want your 30 days to start later or because you’re afraid you can’t use Max 4 anymore after installing Max 5? In case of the latter: Max 5 runs alongside Max 4 perfectly well.

There is no automatic way to convert Max 5 patches to Max 4, but I got a similar request in the context of a project I’m working on so chances are that I’ll do this somewhere in the next month. Or maybe you can find someone who has max 5 installed to do it for you.

Mattijs

#133667
Apr 24, 2008 at 8:41am

Quote: sfogar wrote on Thu, 24 April 2008 00:18
—————————————————-
> Hi,
>
> don’t know if this can help but I’m on a G4/ OS 10.4.10
>
> All the best
>
> —
> Alessandro Fogar
>
> http://www.fogar.it
>

Ok, I heard 10.4.11 is necessary for some Max 5 features, especially documentation stuff though.

Best,
Mattijs

#133668
Apr 24, 2008 at 8:53am

Hi,

don’t think this is related but I’ll upgdare as soon as possible.

Yesterday I investigate better about this problem with the Max5 audio
probes and noticed some problem, will look better later tonite.

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/24, Mattijs Kneppers :
>
> Quote: sfogar wrote on Thu, 24 April 2008 00:18
> —————————————————-
> > Hi,
> >
> > don’t know if this can help but I’m on a G4/ OS 10.4.10
> >
> > All the best
> >
> > –
> > Alessandro Fogar
> >
> > http://www.fogar.it
> >
>
> Ok, I heard 10.4.11 is necessary for some Max 5 features, especially documentation stuff though.
>
> Best,
> Mattijs
>

#133669
Apr 24, 2008 at 9:00am

Hi,

I tried it also on Windows Xp and it works (in beat mode).

What I think it does not work for me on OS X is the soundfiles loading.

Probably this has to do with Quicktime.

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/24, Alessandro Fogar :
> Hi,
>
> don’t think this is related but I’ll upgdare as soon as possible.
>
> Yesterday I investigate better about this problem with the Max5 audio
> probes and noticed some problem, will look better later tonite.
>
> All the best
>
> –
> Alessandro Fogar
>
> http://www.fogar.it
>
>
> 2008/4/24, Mattijs Kneppers :
> >
> > Quote: sfogar wrote on Thu, 24 April 2008 00:18
> > —————————————————-
> > > Hi,
> > >
> > > don’t know if this can help but I’m on a G4/ OS 10.4.10
> > >
> > > All the best
> > >
> > > –
> > > Alessandro Fogar
> > >
> > > http://www.fogar.it
> > >
> >
> > Ok, I heard 10.4.11 is necessary for some Max 5 features, especially documentation stuff though.
> >
> > Best,
> > Mattijs
> >
>

#133670
Apr 24, 2008 at 9:27am

Loading samples takes quite some time and makes Max ‘not responding’ for a while on Windows XP.

Is it based on granuLaRrrr?

#133671
Apr 24, 2008 at 11:58am

hei seems to be great stuff!
actually it doesn’t work as expected here max 5 osx 10.4.10..
i can load file but it doesn’t play correctly..the sound is horribly granulized (very small pitched grains and is nearly not recognisable..)..i hopei get it works..and finally maxers can have their granular sampler!!!
best
mic

#133672
Apr 24, 2008 at 12:18pm

At 10:35 AM +0200 4/24/08, Mattijs Kneppers wrote:
>Quote: Anthony Palomba wrote on Thu, 24 April 2008 00:23
>—————————————————-
>> gahhhh! pitch~ is only for Mac. How annoying…
>> Can I replace it with fiddle~?
>
>I heard some rumors that fiddle~ doesn’t work well with Max 5. But I
>didn’t try, I’ll look into that. Note that the Beats mode doesn’t
>use pitch detection, it should work without the pitch~ object.

Tristan Jehan ported pitch~ to Windows I believe:

http://web.media.mit.edu/~tristan/

Dan

Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
Malfunction
http://www.defectiverecords.com

http://www.jackosx.com

#133673
Apr 24, 2008 at 12:35pm

Indeed I did find pitch~ in the MIT externals, thanks
for the info. I am normally hesitant in installing a new
version of software because there are always issues, but
if you guys say Max4 and Max5 can co exist, I will give it a
try.

#133674
Apr 24, 2008 at 12:45pm

#133675
Apr 24, 2008 at 1:51pm

Works just fine for me – MacBook Pro 2.16 GHz, MaxMSP 5, OSX 10.4.11. Nice work, and very much appreciated!

For those for whom it did not work, you did download and install the CNMAT object [pitch~], yes?

#133676
Apr 24, 2008 at 2:00pm

Quote: smill wrote on Thu, 24 April 2008 07:51
—————————————————-
> Works just fine for me – MacBook Pro 2.16 GHz, MaxMSP 5, OSX 10.4.11. Nice work, and very much appreciated!
>
> For those for whom it did not work, you did download and install the CNMAT object [pitch~], yes?
—————————————————-

Yes, indeed. I’m getting this extremely distorted, rhythmic ‘choppy’ sound with the sample being barely discernible. I have tried multiple sample rates, overdrive on/off, vector sizes, etc.

#133677
Apr 24, 2008 at 2:28pm

Hi,

if you look at the waveform with an external editor, it’s not the same
which the waveform object in Max5 displays. So I think that the sample
does not load correctly.

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/24, matt :
>
> Quote: smill wrote on Thu, 24 April 2008 07:51
> —————————————————-
> > Works just fine for me – MacBook Pro 2.16 GHz, MaxMSP 5, OSX 10.4.11. Nice work, and very much appreciated!
> >
> > For those for whom it did not work, you did download and install the CNMAT object [pitch~], yes?
> —————————————————-
>
> Yes, indeed. I’m getting this extremely distorted, rhythmic ‘choppy’ sound with the sample being barely discernible. I have tried multiple sample rates, overdrive on/off, vector sizes, etc.
> –
> http://www.virb.com/cebec
>

#133678
Apr 24, 2008 at 2:41pm

It’s not limited to the included sample because I tried with my own. Could be you’re right, though… It’s not being loaded correctly..

#133679
Apr 24, 2008 at 4:31pm

Ok guys, thank you for all the information.

I think this is a Max 5 bug that concerns the import function of buffer~. I tried on two more computers. There was no problem on a MacPro Quad, but there was on a Dual G5, both on 10.4.11. I don’t know if the architecture has anything to do with it though.

Anyway, this is what happens on the ppc:

http://www.arttech.nl/max5/import-probs.mov

As you can see, the file loads fine with the read command but something weird happens when using the import command.

I attached the small test patch in a zip.

Cycling, I’m curious whether you can reproduce this? Note that it seems to work on some computers but not on others..

Best,
Mattijs

#133680
Apr 24, 2008 at 7:45pm

Hey Berend!

> Loading samples takes quite some time and makes Max ‘not responding’ for a while on Windows XP.

Perhaps this has to do with the same buffer import issue. Joshua has just promised me to fix this. Importing the mp3 Tones test sample can take a few seconds on older computers though, during which max will not respond, which is normal behaviour.

> Is it based on granuLaRrrr?

No, it’s based on nothing but my own imagination.

Mattijs

#133681
Apr 24, 2008 at 8:13pm

On Apr 24, 2008, at 12:45 PM, Mattijs Kneppers wrote:
>
>> Loading samples takes quite some time and makes Max ‘not
>> responding’ for a while on Windows XP.
>
> Perhaps this has to do with the same buffer import issue. Joshua has
> just promised me to fix this. Importing the mp3 Tones test sample
> can take a few seconds on older computers though, during which max
> will not respond, which is normal behaviour.

Load time is just related to how long QT takes to import the file (and
probably an issue if QT is not installed), but I’ve fixed the byte
ordering issue when importing wave files on PPC for Friday’s 5.0.1
incremental release. Maybe faster for you to use read for wave/aiff
and import for mp3′s, though it takes a little bit of patching.

If anyone is having the byteswapping issue on MacTel (Matfhew
Carpenfer?), and they have actually correctly downloaded the UB
version of pitch~ and placed in their search path, then you should
double check that you haven’t forced Max to load in Rosetta somehow
(get info on the app and make sure the “Open using Rosetta” checkbox
is not enabled). This makes Max load in PPC emulation which is *slow*.

Conversely, for all you C developers out there, “Open using Rosetta”,
is exactly how I am able to reproduce and verify bug fixes for PPC
users, without having to leave my MacTel mahine.

-Joshua

#133682
Apr 24, 2008 at 8:57pm

Quote: jkc wrote on Thu, 24 April 2008 22:13
—————————————————-

> Conversely, for all you C developers out there, “Open using Rosetta”,
> is exactly how I am able to reproduce and verify bug fixes for PPC
> users, without having to leave my MacTel mahine.

Hey, nice one.

Mattijs

#133683
Apr 24, 2008 at 9:08pm

hi,
is it possible to get this patch for max463 please ?
thx.
f./

#133684
Apr 24, 2008 at 9:47pm

#133685
Apr 24, 2008 at 10:47pm

Quote: jkc wrote on Thu, 24 April 2008 14:13
—————————————————-

> If anyone is having the byteswapping issue on MacTel (Matfhew
> Carpenfer?), and they have actually correctly downloaded the UB
> version of pitch~ and placed in their search path, then you should
> double check that you haven’t forced Max to load in Rosetta somehow
> (get info on the app and make sure the “Open using Rosetta” checkbox
> is not enabled). This makes Max load in PPC emulation which is *slow*.
>
—————————————————-

Double-checked all of the above!

#133686
Apr 25, 2008 at 6:08am

I made a version where you can jam out on the a-k keys to trigger different parts of the loop in quantization. i posted this in another thread, but it ends up that I got it working so I figured Id post it here.

Thanks mattijs!

#133687
Apr 25, 2008 at 6:25am

oop had to shift the triggers back, noticed it was starting at the 2nd 1/16 note, also changed the keys to be the more natural a-f j-; hand arrangement

#133688
Apr 25, 2008 at 9:14am

Quote: Chris Muir wrote on Thu, 24 April 2008 23:47
—————————————————-
>
> On Apr 24, 2008, at 2:08 PM, fp wrote:
> > is it possible to get this patch for max463 please ?
>
>
> I have no idea about the particulars of this patch (I’m sure Mattijs
> will chime in here), but as a general theme, if a patch is at all
> complex, and was written in Max 5, it’s probably way too much work to
> port it back to Max 4.

Yeah, it would mean re-creating every object by hand in Max 4. I don’t think I’ll get to that anytime soon. Let me know when someone wrote a 5-to-4 converter.

Mattijs

#133689
Apr 25, 2008 at 9:27am

Quote: Axiom-Crux wrote on Fri, 25 April 2008 08:25
—————————————————-
> oop had to shift the triggers back, noticed it was starting at the 2nd 1/16 note, also changed the keys to be the more natural a-f j-; hand arrangement
—————————————————-

Hi Axiom-Crux, that’s a nice application, although for this situation it would make sense to calculate the original bpm from the file length, assuming that the amount of bars/beats it contains is a power of 2.

Mattijs

#133690
Apr 25, 2008 at 9:33am

Quote: Mattijs wrote on Fri, 25 April 2008 02:14
—————————————————-
> Let me know when someone wrote a 5-to-4 converter.

The more I use Max 5, the more I think that this is pretty unlikely. There is too much stuff that just won’t translate that direction.

-C

#133691
Apr 25, 2008 at 9:52am

ok. i undestand.
i tried it on max5, G5 2,7, os10411.
i have the pitch object.

but it doesn’t work.
even i replace import by read for the buffer.

#133692
Apr 25, 2008 at 10:34am

Quote: fp wrote on Fri, 25 April 2008 11:52
—————————————————-
> ok. i undestand.
> i tried it on max5, G5 2,7, os10411.
> i have the pitch object.
>
> but it doesn’t work.
> even i replace import by read for the buffer.
>
>
>
—————————————————-

Hm, that’s weird, seeing that others have no trouble apart from the import issue. Could you be more specific about what doesn’t work? Is the waveform displayed correctly? Do you get sound at all?

Mattijs

#133693
Apr 25, 2008 at 2:43pm

Hey, I had the same troubles. Tried replacing the ‘import’ with ‘replace’ and still no dice. I’ve also tried playing with the vector size, interrupt, overdrive etc. The soundfile appears to be loading into waveform~ properly and some sound does come out, it’s just not what would be expected.

It’s a shame, as the patch itself looks great.

I could make a recording later on if that would be helpful?

Oh yes, I’m on 10.4.11, G4 Mac Mini.

Quote: Mattijs wrote on Fri, 25 April 2008 11:34
—————————————————-
> Quote: fp wrote on Fri, 25 April 2008 11:52
> —————————————————-
> > ok. i undestand.
> > i tried it on max5, G5 2,7, os10411.
> > i have the pitch object.
> >
> > but it doesn’t work.
> > even i replace import by read for the buffer.
> >
> >
> >
> —————————————————-
>
> Hm, that’s weird, seeing that others have no trouble apart from the import issue. Could you be more specific about what doesn’t work? Is the waveform displayed correctly? Do you get sound at all?
>
> Mattijs
—————————————————-

#133694
Apr 25, 2008 at 3:16pm

Quote: george.r.dennis@gmail.com wrote on Fri, 25 April 2008 16:43
—————————————————-
> Hey, I had the same troubles. Tried replacing the ‘import’ with ‘replace’ and still no dice. I’ve also tried playing with the vector size, interrupt, overdrive etc. The soundfile appears to be loading into waveform~ properly and some sound does come out, it’s just not what would be expected.
>
> It’s a shame, as the patch itself looks great.
>
> I could make a recording later on if that would be helpful?
>
> Oh yes, I’m on 10.4.11, G4 Mac Mini.
>
>

Hi George, thanks for the info. If would be great if you could make a short recording, maybe I can hear what is going on.

If there is anything else that looks weird, please let me know. Any clue is welcome. All the patch is supposed to do is load the audio file and immediately start looping it, indicating the play position with the multislider beneath the waveform.

Mattijs

#133695
Apr 25, 2008 at 7:04pm

in fact with the read message the waveform is ok.
play and pitch are ok too.
but nohing outside of the poly. i don’t know inside where it stops.
i seems to be the same poblem than stefan.
>
>
> Hm, that’s weird, seeing that others have no trouble apart from the
> import issue. Could you be more specific about what doesn’t work?
> Is the waveform displayed correctly? Do you get sound at all?
>
> Mattijs

#133696
Apr 26, 2008 at 2:27am

I gave my text key trigger version to a friend and he said on his g5 it doesn’t output any sound, it has a full bar of audio as if its playing a steady tone at full volume, and when he moves the volume it clicks. Could this be something about the part that plays grains? Maybe something about the windows?? I cant see how but seems rather strange.

What was this about testing things in cfm mode? How can I activate the rosetta emulation?

#133697
Apr 26, 2008 at 2:46am

Great thread and great patch!

#133698
Apr 26, 2008 at 4:03am

and great pseudonym!!! holy crap your acct is synthesizer patel!!! look around you! just look around you!

#133699
Apr 26, 2008 at 10:25am

Excellent work! thanks for sharing this.

(In case you do a ‘version 2′, i think control over the grain size would be a really nice addition.)

#133700
Apr 26, 2008 at 12:51pm

Quote: bitbutter wrote on Sat, 26 April 2008 04:25
—————————————————-
> Excellent work! thanks for sharing this.
>
> (In case you do a ‘version 2′, i think control over the grain size would be a really nice addition.)
—————————————————-

Look into the patch, you’ll easily find it…

#133701
Apr 26, 2008 at 7:40pm

any progress on this?? Im really confused after looking deep into the patch, cant seem to figure out anything that should act differently on ppc systems.

Quote: Axiom-Crux wrote on Fri, 25 April 2008 20:27
—————————————————-
> I gave my text key trigger version to a friend and he said on his g5 it doesn’t output any sound, it has a full bar of audio as if its playing a steady tone at full volume, and when he moves the volume it clicks. Could this be something about the part that plays grains? Maybe something about the windows?? I cant see how but seems rather strange.
>
> What was this about testing things in cfm mode? How can I activate the rosetta emulation?
—————————————————-

#133702
Apr 26, 2008 at 9:27pm

Ok, thanks for the info, all.

I believe I found another Max bug that breaks the time stretcher patch on PPC. Steps to reproduce are inside the attached patch.

Mattijs

#133703
Apr 26, 2008 at 9:43pm

Here is a temporary (!) version of the time stretcher patch that works for me when I open Max 5 using Rosetta (Power PC mode). It uses replace instead of import and doesn’t send the buffer name to the wave~ object on load. PPC-ers, if you have the time I’d love to know whether this patch works for you:

http://www.arttech.nl/max/time%20stretcher%20080426TEMP.zip

When the new Max 5 (5.0.1) update is out and there are no more bugs, I’ll provide a new version of this patch, using the suggestions everyone did in this thread.

Mattijs

#133704
Apr 27, 2008 at 8:52am

HI,

yes, I tried on ppc and it works but I can hear some artifacts even at
0 transposition and normal speed.

I tried on a Windows machine and the sound is much better !

Many thanks

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/26 Mattijs Kneppers :
>
> Here is a temporary (!) version of the time stretcher patch that works for me when I open Max 5 using Rosetta (Power PC mode). It uses replace instead of import and doesn’t send the buffer name to the wave~ object on load. PPC-ers, if you have the time I’d love to know whether this patch works for you:
>
> http://www.arttech.nl/max/time%20stretcher%20080426TEMP.zip
>
>
> When the new Max 5 (5.0.1) update is out and there are no more bugs, I’ll provide a new version of this patch, using the suggestions everyone did in this thread.
>
> Mattijs
>
>
>

#133705
Apr 27, 2008 at 9:07am

Hi,

an update: tried with MAx 5.01 but no joy…

The original now loads the file correctly but no sound, the temp
release plays but the sound is not ok.

Many tanks


Alessandro Fogar

http://www.fogar.it

2008/4/27 Alessandro Fogar :
> HI,
>
> yes, I tried on ppc and it works but I can hear some artifacts even at
> 0 transposition and normal speed.
>
> I tried on a Windows machine and the sound is much better !
>
> Many thanks
>
>
> All the best
>
> –
> Alessandro Fogar
>
> http://www.fogar.it
>
> 2008/4/26 Mattijs Kneppers :
>
>
> >
> > Here is a temporary (!) version of the time stretcher patch that works for me when I open Max 5 using Rosetta (Power PC mode). It uses replace instead of import and doesn’t send the buffer name to the wave~ object on load. PPC-ers, if you have the time I’d love to know whether this patch works for you:
> >
> > http://www.arttech.nl/max/time%20stretcher%20080426TEMP.zip
> >
> >
> > When the new Max 5 (5.0.1) update is out and there are no more bugs, I’ll provide a new version of this patch, using the suggestions everyone did in this thread.
> >
> > Mattijs
> >
> >
> >
>

#133706
Apr 27, 2008 at 10:39am

Quote: sfogar wrote on Sun, 27 April 2008 11:07
—————————————————-
> Hi,
>
> an update: tried with MAx 5.01 but no joy…
>
> The original now loads the file correctly but no sound, the temp
> release plays but the sound is not ok.
>

Thanks for trying, sfogar. It seems that a fix for the set buffer bug on ppc didn’t make it to 5.0.1.

I can’t reproduce the sound artifacts you describe on ppc when I open the temporary patch on Intel using Rosetta. I’m curious what it sounds like. It would be great if you have time to make a short recording (one loop or so) and attach it..

Best,
Mattijs

#133707
Apr 28, 2008 at 6:52am

Mattijs,

yesterday I tried again and the sound was ok (on the temp version)
with 0 transposition and no bpm change.

But as soon as I tried changing the setting the sound artifacts
appeared as a sort of lfo applied to the sound nad had to close the
patch to get a good sound again.

Later tonite I’ll try understand if I can reproduce it.

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/27 Mattijs Kneppers :
>
> Quote: sfogar wrote on Sun, 27 April 2008 11:07
> —————————————————-
> > Hi,
> >
> > an update: tried with MAx 5.01 but no joy…
> >
> > The original now loads the file correctly but no sound, the temp
> > release plays but the sound is not ok.
> >
>
> Thanks for trying, sfogar. It seems that a fix for the set buffer bug on ppc didn’t make it to 5.0.1.
>
> I can’t reproduce the sound artifacts you describe on ppc when I open the temporary patch on Intel using Rosetta. I’m curious what it sounds like. It would be great if you have time to make a short recording (one loop or so) and attach it..
>
> Best,
>
> Mattijs
>

#133708
Apr 28, 2008 at 7:05pm

here’s a recording:

[audio src="http://www.pan-etc.net/res/media/MaxMSP-20080427-1413.mp3" /]

#133709
Apr 29, 2008 at 2:29pm

Quote: fp wrote on Mon, 28 April 2008 21:05
—————————————————-
> here’s a recording:
> http://www.pan-etc.net/res/media/MaxMSP-20080427-1413.mp3
—————————————————-

Thanks for the recording fp. It sounds a bit as if the grain size if very small. I assume your system specs are still: max5, G5 2,7, os10411?

I just had the chance to try the temporary patch on Max5, G5 2 x 2.5, OS 10.4.11 but there really is no problem here, so it’s clearly not a ppc specific thing.

One more question: what are your DSP settings? Maybe a screenshot of your DSP Status window clarifies things.

Alessandro, is your sound the same as fp’s recording?

Mattijs

#133710
Apr 29, 2008 at 4:04pm

Mattijs,

yes, it’s the same sound.

In my case it happens (also on Windows xp, original patch) when you
move the ‘tempo’ slider in ‘beat mode’.

Even if you return to 120 the sound is affected.

All the best


Alessandro Fogar

http://www.fogar.it

2008/4/29 Mattijs Kneppers :
>
> Quote: fp wrote on Mon, 28 April 2008 21:05
> —————————————————-
>> here’s a recording:
>> http://www.pan-etc.net/res/media/MaxMSP-20080427-1413.mp3
> —————————————————-
>
> Thanks for the recording fp. It sounds a bit as if the grain size if very small. I assume your system specs are still: max5, G5 2,7, os10411?
>
> I just had the chance to try the temporary patch on Max5, G5 2 x 2.5, OS 10.4.11 but there really is no problem here, so it’s clearly not a ppc specific thing.
>
> One more question: what are your DSP settings? Maybe a screenshot of your DSP Status window clarifies things.
>
> Alessandro, is your sound the same as fp’s recording?
>
> Mattijs
>

#133711
Apr 30, 2008 at 9:13am

here’s the dsp pict:

#133712
Apr 30, 2008 at 10:00am

could the vector size be an issue?

On Tue, Apr 29, 2008 at 5:04 PM, Alessandro Fogar wrote:
> Mattijs,
>
> yes, it’s the same sound.
>
> In my case it happens (also on Windows xp, original patch) when you
> move the ‘tempo’ slider in ‘beat mode’.
>
> Even if you return to 120 the sound is affected.
>
>
> All the best
>
> –
> Alessandro Fogar
>
> http://www.fogar.it
>
> 2008/4/29 Mattijs Kneppers :
>
>
> >
> > Quote: fp wrote on Mon, 28 April 2008 21:05
> > —————————————————-
> >> here’s a recording:
> >> http://www.pan-etc.net/res/media/MaxMSP-20080427-1413.mp3
> > —————————————————-
> >
> > Thanks for the recording fp. It sounds a bit as if the grain size if very small. I assume your system specs are still: max5, G5 2,7, os10411?
> >
> > I just had the chance to try the temporary patch on Max5, G5 2 x 2.5, OS 10.4.11 but there really is no problem here, so it’s clearly not a ppc specific thing.
> >
> > One more question: what are your DSP settings? Maybe a screenshot of your DSP Status window clarifies things.
> >
> > Alessandro, is your sound the same as fp’s recording?
> >
> > Mattijs
> >
>

#133713
Apr 30, 2008 at 10:03am

Quote: fp wrote on Wed, 30 April 2008 11:13
—————————————————-
> here’s the dsp pict:
—————————————————-

Thanks a lot fp.

Your settings are exactly the same as mine. So, in short, I’m at a complete loss. I tried the patch on a very similar system, with exactly the same settings, but there is no way I can get that sound here. Everything simply works for me.

If anyone has a suggestion, please let me know.

Mattijs

#133714
Apr 30, 2008 at 10:59am

#133715
Apr 30, 2008 at 11:09am

#133716
Apr 30, 2008 at 11:42am

#133717
Apr 30, 2008 at 4:28pm

#133718
May 1, 2008 at 2:02am

I had a friend on PPC running my key trigger version, and his worked when I updated to your ppc friendly version, however after restarting max for some reason it started just playing pure noise. Man this is so odd, Ive never seen such a seemingly simple patch using almost entirely built in objects have so many little issues.

Has anyone else had this noise problem? any thoughts on where to start troubleshooting? we tried dsp settings, which is the obvious. We will try again later.

#133719
May 1, 2008 at 11:40am

#133720
May 1, 2008 at 5:51pm

i confirm, it’s perfect with vector optimization off.
great !!!
thx a lot.

#133721
May 1, 2008 at 6:18pm

Quote: fp wrote on Thu, 01 May 2008 19:51
—————————————————-
> i confirm, it’s perfect with vector optimization off.
> great !!!
> thx a lot.
—————————————————-

Happy to hear that turning vector optimization off fixes it for you, fp. Is it true that if you turn vector optimization back on, the patch stops working again?

This sure is a mysterious bug.. I hope someone at cycling can reproduce this issue somehow. I can’t, but I’ll keep trying.

Mattijs

#133722
May 1, 2008 at 6:36pm

We disabled PowerPC vector optimization completely in 5.0.1. It’s possible that a 5.0.0 user is having trouble where a 5.0.1 user would not.

David Z.

#133723
May 1, 2008 at 6:48pm

Quote: David Zicarelli wrote on Thu, 01 May 2008 20:36
—————————————————-
> We disabled PowerPC vector optimization completely in 5.0.1. It’s possible that a 5.0.0 user is having trouble where a 5.0.1 user would not.
>
> David Z.
>
>
—————————————————-

Ah, thanks for that info!

So the question is: is there anyone with Max version 5.0.1 (please double-check this) who can get the temporary version of the time stretching patch to sound corrupt in any way?

Mattijs

#133724
May 1, 2008 at 8:07pm

Hi,

I confirm what I said before, if you load the ‘Tones example – Herat’
(I converted to wav to test with new patch and 5.01) and change the
tempo slider, you can hear the artifacts.

All the best


Alessandro Fogar

http://www.fogar.it

2008/5/1 Mattijs Kneppers :
>
> Quote: David Zicarelli wrote on Thu, 01 May 2008 20:36
> —————————————————-
>> We disabled PowerPC vector optimization completely in 5.0.1. It’s possible that a 5.0.0 user is having trouble where a 5.0.1 user would not.
>>
>> David Z.
>>
>>
> —————————————————-
>
> Ah, thanks for that info!
>
> So the question is: is there anyone with Max version 5.0.1 (please double-check this) who can get the temporary version of the time stretching patch to sound corrupt in any way?
>
> Mattijs
>

#133725
May 1, 2008 at 9:14pm

Alessandro’s problems sound like a different kind of issue (lfo amplitude variation rather than byteswapped bitnoise), and it probably has something to do with the windowing synchronization. If anything changes by enabling/disabling vector optimization, then it is probably related to the pitch~ object, since that flag should now be ignored by all standard MSP objects.

-Joshua

#133726
May 1, 2008 at 9:45pm

Quote: jkc wrote on Thu, 01 May 2008 23:14
—————————————————-
>
> Alessandro’s problems sound like a different kind of issue (lfo amplitude variation rather than byteswapped bitnoise), and it probably has something to do with the windowing synchronization. If anything changes by enabling/disabling vector optimization, then it is probably related to the pitch~ object, since that flag should now be ignored by all standard MSP objects.
>
> -Joshua
—————————————————-

Thanks for mentioning that Joshua.

Alessandro, just to be sure: when playing the Herat sample, you did set Mode to ‘Tones’, right?

In case you did: Lfo-isch artifacts in Tones mode are expected to a minimal extent, but not more than the Tones mode in for example Ableton Live. If there are very obvious artifacts, as Joshua states, maybe there’s a problem with [pitch~]. In that case I’d appreciate if you could make a recording and send it to me.

So it seems with 5.0.2 all the really bad playback problems will be solved. Nice!

Best,
Mattijs

#133727
Jun 12, 2008 at 3:14pm

Hi,

As promised, the latest version of the granular time stretcher, with some slight improvements. It should work on both PowerPC and Intel machines.

You can find it on my user page:

http://www.cycling74.com/twiki/bin/view/Share/MattijsKneppers

Cheers,
Mattijs

#133728
Jun 12, 2008 at 8:04pm

Mattijs … Is there a Max 4 version of the time stretcher?

Cheers
Gary Lee Nelson
TIMARA Department
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

On Jun 12, 2008, at 3:11 PM, Adam Murray wrote:

>
> Quote: Mattijs wrote on Thu, 12 June 2008 04:58
> —————————————————-
>> Max 5 versions will come as soon as Cycling ’74 releases the Max 5
>> API.
>>
>
> I’m using Max 5 almost exclusively now so I’m really looking
> forward to the Max 5 version. I hope you and John get to beta test
> the Max 5 SDK. That would be a win-win situation for everyone.
>
> It will be very interesting to see how people use these objects:
> which OO patterns are effective in Max and what do they look like
> in patch form? So please share (because it’s fun!) and I will do
> the same :)
> –
> Adam Murray
> compusition.com

#133729
Jun 12, 2008 at 9:31pm

Hi Gary, at the moment there isn’t, I created it in Max 5. But I am developing a plugin based on that engine, which I still need to do in Max 4 (Pluggo for 5 isn’t out yet). So if you’re really in need of it I guess I could email you a copy of a Max 4 version when I have it all copied (object by object :p).

Mattijs

Btw I hope you don’t mind that I moved your reply to the thread about the granular engine.

#133730
Jun 12, 2008 at 10:08pm

I would like to see a Max 4 version when you get around to it. I am
still locked into 4 because I have too many pending projects to be
confident that I can move everything I need.

Cheers
Gary Lee Nelson
TIMARA Department
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

On Jun 12, 2008, at 5:31 PM, Mattijs Kneppers wrote:

>
> Hi Gary, at the moment there isn’t, I created it in Max 5. But I am
> developing a plugin based on that engine, which I still need to do
> in Max 4 (Pluggo for 5 isn’t out yet). So if you’re really in need
> of it I guess I could email you a copy of a Max 4 version when I
> have it all copied (object by object :p).
>
> Mattijs
>
> Btw I hope you don’t mind that I moved your reply to the thread
> about the granular engine.

#133731
Jun 13, 2008 at 6:27am

same here
ciao

Quote: Gary Lee Nelson wrote on Fri, 13 June 2008 00:08
—————————————————-
> I would like to see a Max 4 version when you get around to it. I am
> still locked into 4 because I have too many pending projects to be
> confident that I can move everything I need.
>
> Cheers
> Gary Lee Nelson
> TIMARA Department
> Oberlin College
> http://www.timara.oberlin.edu/GaryLeeNelson
>
>
>
>
> On Jun 12, 2008, at 5:31 PM, Mattijs Kneppers wrote:
>
> >
> > Hi Gary, at the moment there isn’t, I created it in Max 5. But I am
> > developing a plugin based on that engine, which I still need to do
> > in Max 4 (Pluggo for 5 isn’t out yet). So if you’re really in need
> > of it I guess I could email you a copy of a Max 4 version when I
> > have it all copied (object by object :p).
> >
> > Mattijs
> >
> > Btw I hope you don’t mind that I moved your reply to the thread
> > about the granular engine.
>
>
>
>
—————————————————-

#133732
Jun 13, 2008 at 3:25pm

#133733
Jun 15, 2008 at 9:59am

#133734
Jun 15, 2008 at 3:08pm

Quote: Mattijs wrote on Sun, 15 June 2008 10:59
—————————————————-
> Ok, I got an email from George Dennis. He converted the Max 5 patch to Max 4. As far as I can see it works as it should, although on PPC there is the same playback bug as in Max 5 before version 5.0.2.
>
> I asked him to post it here so I hope we’ll see it soon..
>
>
> >
> > congratulations on the oo objects btw! they seem to be just what the doctor prescribed to maintain one’s sanity while working on bigger patches.
>
> Thanks :) Credits to John Pitcairn for that, too.
>
> Mattijs
>
>
—————————————————-

Hi all,

Yup, here’s a Max 4 version of the patch. Not quite as pretty as the original due to a lack of a Presentation Mode, but everything else should be there.

Best,

George

#133735
Jun 15, 2008 at 3:33pm

#133736
Jun 16, 2008 at 7:41am

#133737
Jun 16, 2008 at 11:09am

#133738
Jun 19, 2008 at 8:42am

I’ve tried both the Max 4 and Max 5 versions and neither works for me. The symptoms are similar to those mentioned before: waveform seems to load normally (displays normally), and there are no errors in the Max window, but the only sound I hear is some low clicking if I move the sliders around.

I’m using a G5 dual 2.7, OS 10.5.3
Max 4.6.3 and 5.0.2

Any ideas?

s

#133739
Jun 19, 2008 at 11:33am

Ok, thanks for your report, paloma.

I didn’t test the patch on a PPC with Mac OS 10.5, so my guess is that the PPC bug that was fixed in Max 5.0.2 has only been fixed for Windows and Mac OS 10.4, not for Mac OS 10.5.

I will try to reproduce this as soon as I get my hands on a 10.5 machine. I would be happy if someone from cycling ’74 could give this a try too. (suspected) Steps to reproduce:

1) download the latest granular patch (version 008) for Max 5 from my user page
2) open it in Max 5.0.2 on Mac OS 10.5.3 on a PPC or with Rosetta on an Intel.
3) press the read button; no sound is played, but it should.

As for Max 4.6, I can confirm that the patch converted by George is not working on PPC on Mac OS 10.4.11, due to the same Max bug that was fixed in Max 5.0.2. I don’t know if cycling ’74 is still fixing bugs in Max 4 though..

Mattijs

Quote: paloma wrote on Thu, 19 June 2008 10:42
—————————————————-
> I’ve tried both the Max 4 and Max 5 versions and neither works for me. The symptoms are similar to those mentioned before: waveform seems to load normally (displays normally), and there are no errors in the Max window, but the only sound I hear is some low clicking if I move the sliders around.
>
> I’m using a G5 dual 2.7, OS 10.5.3
> Max 4.6.3 and 5.0.2
>
> Any ideas?
>
> s
—————————————————-

#133740
Jun 19, 2008 at 5:17pm

One problem I had was the use of the import message to load the buffer. When I switched to ‘replace’, the patch worked fine.

#133741
Jun 19, 2008 at 5:24pm

Quote: Nick Inhofe wrote on Thu, 19 June 2008 19:17
—————————————————-
> One problem I had was the use of the import message to load the buffer. When I switched to ‘replace’, the patch worked fine.
—————————————————-

In the latest version of the time stretcher (008) I replaced import with replace since import uses the quicktime libary.

#133742
Jun 19, 2008 at 8:46pm

[quote]
1) download the latest granular patch (version 008) for Max 5 from my user page
2) open it in Max 5.0.2 on Mac OS 10.5.3 on a PPC or with Rosetta on an Intel.
3) press the read button; no sound is played, but it should.
[/quote]

I can confirm this problem on a G4 Powerbook running Max 5.0.2, Mac OS 10.5.3. I turned off vector optimization: once, the patch did produce sound, though it was very choppy. I had to restart the computer at that point (unrelated to Max, I’m pretty sure) and since then, I haven’t been able to get any sound other than the low clicking described by paloma.

#133743
Jun 22, 2008 at 2:18am

Thanks it’s really great… works no problem on vista.

#133744
Jun 22, 2008 at 7:30pm

I’ve just tested the timestretcher in Max 5 on my Macbook running OS 10.5.3, and it runs flawlessly. So I guess there is no inherent incompatibility with 10.5.3, but somehow the combination of PowerPC and 10.5 causes a problem.

s

#133745
Jun 22, 2008 at 7:45pm

Quote: paloma wrote on Sun, 22 June 2008 21:30
—————————————————-
> I’ve just tested the timestretcher in Max 5 on my Macbook running OS 10.5.3, and it runs flawlessly. So I guess there is no inherent incompatibility with 10.5.3, but somehow the combination of PowerPC and 10.5 causes a problem.
>
> s
—————————————————-

Hey, thanks for that info!

Could you try this for me: right-click MaxMSP.app in the Max 5 folder, enable Open using Rosetta, then try the patch again. Is there a problem that way?

Mattijs

#133746
Jun 22, 2008 at 9:59pm

Runs fine under Rosetta (Max 5.0.2, OS 10.5.3, Macbook 2GHz).

s

#133747
Jun 23, 2008 at 8:19am

Quote: paloma wrote on Sun, 22 June 2008 23:59
—————————————————-
> Runs fine under Rosetta (Max 5.0.2, OS 10.5.3, Macbook 2GHz).
>
> s
—————————————————-

Hm. Bummer. So I’ll have to locate an actual PowerPC with 10.5.

Mattijs

#133748
Jul 8, 2008 at 7:17pm

Hi,

Just wondering if you’ve had a chance to debug the timestretcher for PowerPC + OS 10.5? Would love to use it on my desktop.

s

#133749
Jul 8, 2008 at 8:38pm

Quote: paloma wrote on Tue, 08 July 2008 21:17
—————————————————-
> Hi,
>
> Just wondering if you’ve had a chance to debug the timestretcher for PowerPC + OS 10.5? Would love to use it on my desktop.
>
> s
—————————————————-

Not yet, paloma. I didn’t find a ppc with 10.5 yet. Anyone near Amsterdam that has one?

Of course it’s a max patch, i.e. open source. So if anyone with some msp experience and a ppc and 10.5 has some time.. for example the folks from cycling ’74?

Mattijs

#133750
Jul 10, 2008 at 4:41pm

:-D Great!

#133751
Jul 11, 2008 at 10:16am

Hey RabidRaja,

You have a very good point with the 96 KHz issue. Thanks for the report.

It took me some time to reproduce. As it seems, the issue doesn’t arise when the sample rate is switched to 96 KHz after the patch was opened, only when the sample rate was at 96 KHz before opening the patch. I have the feeling this has something to do with the way buffer~ handles sample rate changes.

I will report back when I fixed this.

Cheers,
Mattijs

Quote: RabidRaja wrote on Fri, 11 July 2008 03:58
—————————————————-
> This is really sweet! Especially in Max5, so easy to move around and look at what you’ve done. There is a drastic difference, though, between the sound-quality at 96k sampling-rate as opposed to 44.1k or 48k. Seems to degrade the sound so much rather than improve it when switched to a higher sampling-rate. Was just wondering why this is?(is it the windowing? maybe if the window was greater than(or,if I’m confusing myself, lesser than) 512 samples long(maybe 1024 or even 2048 samples?) it would be more conducive to the higher-sampling rates?). S’all good, though, I don’t really use 96k much, anyways. Thanks so much for this! It’s really beautiful work!
—————————————————-

#133753
Jul 13, 2008 at 5:07pm

Hi Mattijs

Im a fresh newbie using osx 10.4.11 on a ppc g4 1.5ghz

I am using a 30 day demo version of Max5.02 (34989) as I wanted to check out the timestretch patch you created

I have a similar problem to others
I have the same dsp settings as earlier reported
I cannot get audio output from the patch when a sample is loaded and the loop cycles.

It would be great to know if there is a solution to this for Max5.02 on ppc 10.4.11

thanks for creating this patch ;)

Wooly

#133755
Jul 13, 2008 at 5:30pm

if you are having problems getting audio with this patch, follow these clear and simple steps:

-Get out of presentation mode by clicking the 4th button from the left on the bottom of the patcher window.

-Hit apple-E to unlock the patcher.

-On the right hand side you will see a buffer~ object with an import message connected to it. Change the import message to say ‘replace’.

-Now try and see if it works.

For w/e reaosn, import gives me problems. I don’t see why it would be used instead of replace. I am certain it has advantages over replace, but I have yet to explore its purpose.

#133756
Jul 13, 2008 at 5:56pm

Hi

Thanks for your response.

I tried using import or replace but still no audio.
I can play other patches but not this one.

Thanks in advance ;)

W

#133757
Jul 13, 2008 at 6:55pm

Quote: wooly wrote on Sun, 13 July 2008 19:56
—————————————————-
> Hi
>
> Thanks for your response.
>
> I tried using import or replace but still no audio.
> I can play other patches but not this one.
>
>
> Thanks in advance ;)
>
> W
—————————————————-

Please check two things:
1) Did you download the latest version from my user page (008)?
2) Do you have the latest version of Max 5 (5.0.3)?

Mattijs

#133758
Jul 13, 2008 at 7:45pm

FYI, these steps shouldn’t be necessary with the latest versions of the time stretcher and Max.

Mattijs

Quote: ComfortableInClouds wrote on Sun, 13 July 2008 19:30
—————————————————-
> if you are having problems getting audio with this patch, follow these clear and simple steps:
>
> -Get out of presentation mode by clicking the 4th button from the left on the bottom of the patcher window.
>
> -Hit apple-E to unlock the patcher.
>
> -On the right hand side you will see a buffer~ object with an import message connected to it. Change the import message to say ‘replace’.
>
> -Now try and see if it works.
>
>
> For w/e reaosn, import gives me problems. I don’t see why it would be used instead of replace. I am certain it has advantages over replace, but I have yet to explore its purpose.
—————————————————-

#133759
Jul 14, 2008 at 12:29pm

Hi Mattijs

I have version 008 from your page but I have 5.02 demo
I’ll download the latest demo and try that

I’ll let you know
Thanks

w

#133760
Jul 14, 2008 at 6:29pm

The bug reported by RabidRaja (the patch didn’t work correctly with sample rates other than 44100 Hz) has been fixed in version 009 of the patch, that you can now download from my user page:

http://www.cycling74.com/twiki/bin/view/Share/MattijsKneppers

Best,
Mattijs

Quote: Mattijs wrote on Fri, 11 July 2008 12:16
—————————————————-
> Hey RabidRaja,
>
> You have a very good point with the 96 KHz issue. Thanks for the report.
>
> It took me some time to reproduce. As it seems, the issue doesn’t arise when the sample rate is switched to 96 KHz after the patch was opened, only when the sample rate was at 96 KHz before opening the patch. I have the feeling this has something to do with the way buffer~ handles sample rate changes.
>
> I will report back when I fixed this.
>
> Cheers,
> Mattijs
>
> Quote: RabidRaja wrote on Fri, 11 July 2008 03:58
> —————————————————-
> > This is really sweet! Especially in Max5, so easy to move around and look at what you’ve done. There is a drastic difference, though, between the sound-quality at 96k sampling-rate as opposed to 44.1k or 48k. Seems to degrade the sound so much rather than improve it when switched to a higher sampling-rate. Was just wondering why this is?(is it the windowing? maybe if the window was greater than(or,if I’m confusing myself, lesser than) 512 samples long(maybe 1024 or even 2048 samples?) it would be more conducive to the higher-sampling rates?). S’all good, though, I don’t really use 96k much, anyways. Thanks so much for this! It’s really beautiful work!
> —————————————————-
>
>
—————————————————-

#133761
Jul 14, 2008 at 9:47pm

Hi again Mattijs

I have now your version 009 and Max5.03 and still no audio on my ppc 10.4.11

I have tried loading different audio files (which show in the audio looper.

Is there anything else I can try or give you more information?

Thanks in advance for being helpful :)

W

#133762
Jul 15, 2008 at 10:16pm

Quote: Mattijs wrote on Sun, 13 July 2008 12:55
—————————————————-
> Quote: wooly wrote on Sun, 13 July 2008 19:56
> —————————————————-
> > Hi
> >
> > Thanks for your response.
> >
> > I tried using import or replace but still no audio.
> > I can play other patches but not this one.
> >
> >
> > Thanks in advance ;)
> >
> > W
> —————————————————-
>
> Please check two things:
> 1) Did you download the latest version from my user page (008)?
> 2) Do you have the latest version of Max 5 (5.0.3)?
>
> Mattijs
—————————————————-

Hi Mattijs
just getting the hang of using this forum properly ! (hence the quote to respond)

I now have your version 009 and max5.03 but still no joy with audio playback – if anyone has similar problems/issues it would be good to hear of them and possible solutions.

In the meantime I am trying to get a windows xp machine to see if I have better luck.
will report back with results on doz
W

#133763
Jul 16, 2008 at 3:55pm

HI Mattijs

I am now trying win xp (as I couldnt get osx 10.4.11 to work for me as earlier reported) but i noticed the pitch~ at CNMAT seems only available for osx

do you know how other xp users got your patch to work under xp?

Thanks
W

#133764
Jul 16, 2008 at 4:21pm

Quote: wooly wrote on Wed, 16 July 2008 09:55
—————————————————-
> HI Mattijs
>
> I am now trying win xp (as I couldnt get osx 10.4.11 to work for me as earlier reported) but i noticed the pitch~ at CNMAT seems only available for osx
>
> do you know how other xp users got your patch to work under xp?
>
> Thanks
> W
—————————————————-

Well it seems to work nicely without CNMAT pitch~ on xp :)
Thanks

#133765
Jul 19, 2008 at 8:46am

#133766
Sep 1, 2008 at 11:35am

Hey Mattijs,
Thanks for posting. This patch is really great, the time stretch and the sound works beautiful.
I have a question, I was playing with the patch but I don’t find were a can locate a play stop button without close the dac~. Maybe the correct question is how can turn of the loop and have a bang for a play.
Thanks
David

#133767
Sep 1, 2008 at 11:42am

Hey,
My last question its already resolved. Now I understand the patch :), Thanks a lot

#133768
Sep 1, 2008 at 4:59pm

Quote: Davmazo wrote on Mon, 01 September 2008 13:42
—————————————————-
> Hey,
> My last question its already resolved. Now I understand the patch :), Thanks a lot
—————————————————-

Good to hear your problem was solved.

My answer would be: in the ‘timepitch’ subpatch, set both pitch and speed to 0 to stop playback.

Mattijs

#133769
Sep 1, 2008 at 5:06pm

Quote: werner.funk wrote on Sat, 19 July 2008 10:46
—————————————————-

> same here: AUDIO yes, but only distorted: single very low beats, no
> continuous output.
> PPC 10.5.4, Max 5.0.3
>

The status on this problem is that I still didn’t get my hands on a PPC with OS X 10.5. When emulating the PPC architecture (Open using Rosetta) on an Intel machine with 10.5, I can’t reproduce this problem.

In the mean time we can only hope that Cycling ’74 will have the opportunity to do more general MSP tests on different platforms and run into this bug themselves.

Regards,
Mattijs

#133770
Sep 1, 2008 at 5:22pm

On 19 juil. 08, at 10:46, Werner Funk wrote:

> Please check two things:
> 1) Did you download the latest version from my user page (008)?
> 2) Do you have the latest version of Max 5 (5.0.3)?

Please make sure you have the latest version which currently 5.0.4. I
didn’t test Mattijs on PPC, but with the latest version there’s
shouldn’t be any difference. If you find otherwise, send a nice bug
report to support[at]cycling74[dot]com and we will have a look.

Best,
ej

#133771
Sep 1, 2008 at 5:34pm

Quote: Emmanuel Jourdan wrote on Mon, 01 September 2008 19:22
—————————————————-

> Please make sure you have the latest version which currently 5.0.4. I
> didn’t test Mattijs on PPC, but with the latest version there’s
> shouldn’t be any difference. If you find otherwise, send a nice bug
> report to support[at]cycling74[dot]com and we will have a look.
>

Great, thanks for joining in EJ.

Werner and wooly, as Emmanuel states, it would be cool if you could check with the latest version of Max (currently 5.0.4) and see if the problem persists.

> Best,
> ej
>
>
>
—————————————————-

#133772
Sep 1, 2008 at 8:50pm

Hi,

for me, on OS X 10.4.11 and Max 5.0.4 on a PB G4, last version of the
patch it’s ok now…

All the best


Alessandro Fogar

http://www.fogar.it

2008/9/1 Mattijs Kneppers :
>
> Quote: Emmanuel Jourdan wrote on Mon, 01 September 2008 19:22
> —————————————————-
>
>> Please make sure you have the latest version which currently 5.0.4. I
>> didn’t test Mattijs on PPC, but with the latest version there’s
>> shouldn’t be any difference. If you find otherwise, send a nice bug
>> report to support[at]cycling74[dot]com and we will have a look.
>>
>
> Great, thanks for joining in EJ.
>
> Werner and wooly, as Emmanuel states, it would be cool if you could check with the latest version of Max (currently 5.0.4) and see if the problem persists.
>
>> Best,
>> ej
>>
>>
>>
> —————————————————-
>
>
>

#133773
Sep 5, 2008 at 9:05am

#133774
Sep 5, 2008 at 5:14pm

> for me, on OS X 10.4.11 and Max 5.0.4 on a PB G4, last version of the patch it’s ok now…

> On PPC, OsX 10.5.4, Max 5.0.4 it’s fine,

Great! Congrats EJ.

> on PPC, OsX 10.5.4, Max 4.6.3, indispensable in many situations, not.

Yea.. that holds for a lot of bug fixes from the last few months. I assume we can’t expect Cycling ’74 to keep two versions up to date. I know from experience that it takes 4 times as much time..

Mattijs

#133775
Sep 6, 2008 at 1:37pm

mbp 10.5.4 max 5.0.4, works fantastically well!
this is exactly what i need to improve one of my own patches, as it is far better than my granular solution. can wait to dig through it and learn how u did it. thanks very much for sharing such a useful, well-written and well laid out patch, for free!

#133776
Sep 8, 2008 at 1:09pm

#133777
Nov 10, 2008 at 3:16am

i just started learning Max a couple months ago, so this might be a silly question…

if i record something into a buffer~, is it possible to automatically apply the time stretcher to that buffer? or would i have to export the buffer to a audio file and then import it into the time stretcher?

#133778
Nov 10, 2008 at 9:05am

You can use the buffer~ you are recording to. You can set the buffer by using the right-most inlet of the [timepitch] subpatcher.

Note: I just sent Cycling ’74 a new update, version 010, with a small fix for the problem that the pitch tracker wouldn’t update when assigning a new buffer. It will probably be online on my user page in a day or two.

Best,
Mattijs

________
arttech.nl

Quote: abab77@rocketmail.com wrote on Mon, 10 November 2008 04:16
—————————————————-
> i just started learning Max a couple months ago, so this might be a silly question…
>
> if i record something into a buffer~, is it possible to automatically apply the time stretcher to that buffer? or would i have to export the buffer to a audio file and then import it into the time stretcher?
—————————————————-

#133779
Nov 12, 2008 at 11:58pm

transport controls.

somewhere you said that you can stop/play transport by sending speed is 0/1. when i send a speed of 0 i get the current grain looped. when stopped i would prefer no audio, how can i achieve this?

thanks, james.

#133780
Nov 13, 2008 at 3:49pm

When pitch and speed are not linked, it makes sense that even with the speed at 0 you can still hear the sound with the normal pitch. To stop this, you could simply set the volume to 0.

Mattijs

Quote: James Drake wrote on Thu, 13 November 2008 00:58
—————————————————-
> transport controls.
>
> somewhere you said that you can stop/play transport by sending speed is 0/1. when i send a speed of 0 i get the current grain looped. when stopped i would prefer no audio, how can i achieve this?
>
> thanks, james.
—————————————————-

#133781
Feb 19, 2009 at 2:54pm

I was looking to introduce pitch shifting into my multi channel looper app and came across that excellent app here. Now am wondering whether I could replace my current playback solution (multiple wave~’s driven by central phasor using phase offsets and factors).

Having had a short look, I would have to write a wrapper interface which allows to pass loop segments as well as react to sync points (retriggering of playback based on master phasor reset).

The other question is whether there would be a lot of additional resource usage if using 8 of those timestretchers to playback my channels.

Maybe one of the more experienced guys around here could point out any inherent issues with my approach, why it would/wouldn’t work (due to granular approach) before I dive straight into it.

thx a lot, nick

#133782
Feb 19, 2009 at 4:31pm

Hi Nick,

This patch is actually made with looping in mind, so yes, it should be a good choice.

The alternatives for pitch shifting as far as I know are:
- the elastic~ external that came out after this patch was released. It incorporates the zplane time stretcher engine, which in some cases gives better sound quality, but is less flexible and not free.
- an fft-based approach with gizmo~. That approach always has an inherent latency of, say, 40 ms that gets bigger as sound quality increases.

If you’d like to use this patch in your looper, you’d have to replace the position signal that comes out of the [playhead] subpatcher with your own master phasor. Note though that [playhead] also keeps track of the time difference between the stretched position and position that would result from common pitching, so don’t forget to connect your incoming position signal in the same way as the phasor~ inside [playhead].

This patch uses 5% on my 2.16 GHz macbook, I guess you should add 3% for every copy of the stretcher engine. So 8 copies sounds quite feasible to me, especially if you run them on one of those fancy new macbook pro’s :)

Best,
Mattijs

Quote: monohusche wrote on Thu, 19 February 2009 15:54
—————————————————-
> I was looking to introduce pitch shifting into my multi channel looper app and came across that excellent app here. Now am wondering whether I could replace my current playback solution (multiple wave~’s driven by central phasor using phase offsets and factors).
>
> Having had a short look, I would have to write a wrapper interface which allows to pass loop segments as well as react to sync points (retriggering of playback based on master phasor reset).
>
> The other question is whether there would be a lot of additional resource usage if using 8 of those timestretchers to playback my channels.
>
> Maybe one of the more experienced guys around here could point out any inherent issues with my approach, why it would/wouldn’t work (due to granular approach) before I dive straight into it.
>
> thx a lot, nick
>
—————————————————-

#133783
Feb 19, 2009 at 4:48pm

might be even easier. as the patch does its own calculation for playing the buffer with speed 1, all I need to do is to reset the playhead to the chosen start position when the external phase goes back to 0.

Let’s say the master phasor is at 120bpm, and I have two loops (1 bar=4 beats, 2 bars=8 beats), the frequency after rate for those loops would be 30 Hz and 15 Hz. I can leave that untouched and only bang the chosen start position within time_pitch with the above frequency. If changing the speed (e.g. * 2), I would change the rate multiplier (60 Hz and 30Hz) and also change the speed param into time_pitch, therefore the natural end of the loop would match up with the retriggering staying tight.

If there is an offset (selecting a different slice, I am using a monome), then the triggered start position wouldn’t be 0, but calculated accordingly.

Using the outputted playhead position also fits nicely.

#133784
Feb 19, 2009 at 4:59pm

Sounds good.

As for retriggering (selecting a different slice, for example with the monome): other granular playback engines do not support accurate retriggering, but this one does. It has to do with the fact that the grains too have to be reset. To use this feature properly is a little more involved than simply resetting the phasor though. For this, have a look at how the ‘retrigger’ functionality in the main interface is connected inside the engine.

Quote: monohusche wrote on Thu, 19 February 2009 17:48
—————————————————-
> might be even easier. as the patch does its own calculation for playing the buffer with speed 1, all I need to do is to reset the playhead to the chosen start position when the external phase goes back to 0.
>
> Let’s say the master phasor is at 120bpm, and I have two loops (1 bar=4 beats, 2 bars=8 beats), the frequency after rate for those loops would be 30 Hz and 15 Hz. I can leave that untouched and only bang the chosen start position within time_pitch with the above frequency. If changing the speed (e.g. * 2), I would change the rate multiplier (60 Hz and 30Hz) and also change the speed param into time_pitch, therefore the natural end of the loop would match up with the retriggering staying tight.
>
> If there is an offset (selecting a different slice, I am using a monome), then the triggered start position wouldn’t be 0, but calculated accordingly.
>
> Using the outputted playhead position also fits nicely.
—————————————————-

#133785
Feb 19, 2009 at 5:02pm

Apologies for the shameless plug, but Joe and I released two new time stretching / pitch shifting objects yesterday that you might want to have a quick look at. They’re not free, but only use about 0.5% cpu so will be a lot more efficient than anything built in Max.

Just thought I’d mention…

Cheers,
Simon
http://www.elasticmax.co.uk

#133786
Feb 19, 2009 at 5:35pm

Hey Simon,

Congrats man! From the demo video’s I’d say the new objects sound awesome. And this is of course much faster than a max patch implementation. I am happy you guys didn’t stop with zplane~’s algorithm. Great job.

I don’t have a direct application at the moment, but I would still like to fool around with the object for a few hours. Is there a chance there will be something like a demo version in the future? Although, admitted, 20 pounds is not a lot of money for the amount of work you guys must have put into this.

So Nick, here is a serious alternative. You’ll not be able to add and control your own freaky parameters, but these objects will certainly make for a great cpu-efficient loop station.

Best,
Mattijs

Quote: simon adcock wrote on Thu, 19 February 2009 18:02
—————————————————-
> Apologies for the shameless plug, but Joe and I released two new time stretching / pitch shifting objects yesterday that you might want to have a quick look at. They’re not free, but only use about 0.5% cpu so will be a lot more efficient than anything built in Max.
>
> Just thought I’d mention…
>
> Cheers,
> Simon
> http://www.elasticmax.co.uk
—————————————————-

#133787
Feb 19, 2009 at 6:01pm

I am pretty sure that elastic will do an amazing job, there are only two issues:

Firstly, I would have to make sure it does what I need it to do (as mentioned before), here a max based solution is implicitly more flexible (being source code). The second more severe issue is that my software is open source which normally doesn’t go well together with commercial stuff though I don’t know the licensing policy for elastic.

Simon?

#133788
Feb 19, 2009 at 6:40pm

Almost forgot, what about reverse play, does either one of your solutions support that ?

#133789
Feb 19, 2009 at 6:42pm

Quote: monohusche wrote on Thu, 19 February 2009 19:40
—————————————————-
> Almost forgot, what about reverse play, does either one of your solutions support that ?
—————————————————-

They both support it.

#133790
Feb 19, 2009 at 9:01pm

It’s coming along pretty good, I extended your patch by an option to stop playback as well as set a loop segment.

Now plugging it into my solution.

By the way, is there a certain ratio where simultanous speed and pitch changes recreate the normal “slow down” sound…still wanna use that :-)

#133791
Feb 19, 2009 at 9:16pm

Quote: monohusche wrote on Thu, 19 February 2009 22:01
—————————————————-
> It’s coming along pretty good, I extended your patch by an option to stop playback as well as set a loop segment.
>
> Now plugging it into my solution.
>
> By the way, is there a certain ratio where simultanous speed and pitch changes recreate the normal “slow down” sound…still wanna use that :-)

Yeah, if you look inside the timepitch subpatcher you’ll see that the speed and pitch values are converted from relevant units to a value around 1. If pitch and speed are equal there, you have the normal “slow down” sound.

Mattijs

#133792
Feb 20, 2009 at 4:13pm

@Mattijs

I did replace my wave’s with the granular player, unfortunately there are issues. There are crackles, artifacts, dropouts which are clearly audible.

As my signal network is already quite demanding, system usage of Max (switched on DSP) was 40%, with the new version it’s 60%.

When adjusting your main patch to include 5 players instead of one, system usage goes from 5 to 25%.

Just wondering even if it is 60%, there are still CPU cycles left, so what could be the issue ?

Any idea ? Nick

#133793
Feb 20, 2009 at 5:43pm

Hi Nick,

Aw, 25% for 5 voices.. well, I guess that’s where C or a new computer come in.

I have problems with audio glitches at 60/70% myself. I believe that is because the percentage is the average cpu usage, not showing spikes of 100%. You can smooth this out by increasing the IO buffer size, but that will give you more latency..

Perhaps you could venture into the new multi-threading abilities of poly~?

Mattijs

Quote: monohusche wrote on Fri, 20 February 2009 17:13
—————————————————-
> @Mattijs
>
> I did replace my wave’s with the granular player, unfortunately there are issues. There are crackles, artifacts, dropouts which are clearly audible.
>
> As my signal network is already quite demanding, system usage of Max (switched on DSP) was 40%, with the new version it’s 60%.
>
> When adjusting your main patch to include 5 players instead of one, system usage goes from 5 to 25%.
>
> Just wondering even if it is 60%, there are still CPU cycles left, so what could be the issue ?
>
> Any idea ? Nick
—————————————————-

#133794
Feb 20, 2009 at 6:50pm

Yeah, I was wondering whether this would eventually be necessary, not just for time stretching but general signal processing. At the moment, there are quite some distinct signal flows going through my app, e.g the master phase wouldn’t have to be multiplied to go to each channel but is rather one input of that future poly-player object.

Just have so much to do’s on my list right…will get back to you eventually.

thx anyway, nick

#133795
Feb 26, 2009 at 5:58am

Wow, Mattijs, this thing is cool.

Like Nick, I want to use this in a looper. I’m confused about manipulating the playback position. I’m coming from a non-granular looping background, and grains make everything really weird.

When I was using play~, I could just tell it, “Read from this position in the buffer”, and that was that. I used a phasor~ to do so, which allowed me to specify the length of the loop, the duration of the loop, and the playhead speed independently. If I narrowed the length of the loop enough I could get a cool buzzing effect, and the transition into and out of the audio frequency range for the buzz was very natural. With granular playback, however, there’s in some sense a buzz going on all the time. If, in this object, one sets speed to 0 and manipulates the grain length, the result is the sort of buzz I was talking about.

Another feature that I could get from my simple play~ based looper was to sweep the playhead through the file at audio rate. Mattijs’s object allows one to change the read position with a float, but not with a signal. I don’t know the first thing about grains; would manipulating the play position at a signal level be hard?

Last, the grain size in both beat mode and pitch mode seem really long to me long enough to make it difficult to sync with other objects. Should I worry about that? For instance, suppose the grain size is 200 ms and I have a metronome that sends a playhead position message to Mattijs’s object. Will the playback sync to the metronome, or is there a potential lag somewhere between -200 and 200 ms?

[Edit: I added the next paragraph a few minutes after first posting.]

Is the object designed for radical pitch and rhythm changes? Even though the numerical fields can have anything typed into them, the sliders on the front page of the object have a fairly narrow range, and the values (one page underneath) for Grain Size and Factor Time seem to adjust to small changes from Pitch and Speed, but not to large ones. Is it much of an art, trying to figure out what grain size and factor time should be used for extreme Speed and Pitch values?

Thanks again, Mattijs, for an awesome thing.

Jeff

#133796
Feb 26, 2009 at 11:18am

Hi Jeff,

Thanks for the kinds words. Have a look at the messages above, and look into the patch a bit more, this should answer most of your questions. As for your last addition: this patch is optimized to produce as little artifacts as possible. Granular time stretching will always produce artifacts when used in an extreme way, that is why the ranges in the first patch are limited. But if artifacts are what you want, feel free to go into the patch underneath and mess up the sound as much as you want :)

Best,
Mattijs

#133797
May 31, 2009 at 2:53pm

I’m having problems with the implementation of a master phase into this patch. I have tried to replace the phasor object inside the sub patch “p playhead” but the loop still syncs to another source.I haven’t really understand the patch yet, so maybe someone can point me in the right direction.

thanks a lot

#133798
Jun 8, 2009 at 4:19pm
i.te wrote on Sun, 31 May 2009 16:53
I’m having problems with the implementation of a master phase into this patch. I have tried to replace the phasor object inside the sub patch “p playhead” but the loop still syncs to another source.I haven’t really understand the patch yet, so maybe someone can point me in the right direction.

Hi i.te,

Maybe you can attach a patch with your current attempt. That should make it possible to point you in the right direction.

Best,
Mattijs

#133799
Jun 10, 2009 at 9:03pm

Hi Mattijs,

I replaced the phase inside the play head and its stay in sync, but I get lost with the speed and also I don’t now to handle the fade time.

Any help will be much appreciated!

#133800
Jun 13, 2009 at 3:41pm
i.te wrote on Wed, 10 June 2009 23:03
Hi Mattijs,

I replaced the phase inside the play head and its stay in sync, but I get lost with the speed and also I don’t now to handle the fade time.

Any help will be much appreciated!

Thanks for the example. But it’s not clear enough for me what you want the resulting patch to do.

I assume you want multiple loops to stay in sync, to be able to tweak the parameters of each loop separately. But for instance, what do you find should happen exactly if you slow down one of the loops? Should the slowed loop be restarted before it reaches the end as soon as the other loops reach their end?

Or do you rather want the loops to always have the same speed, leaving only the pitch to be changed separately?

Mattijs

#133801
Jun 13, 2009 at 4:08pm

Hi Mattijs,

the idea is to control the master phase with ponk~, so i can get different loop length and pitch control for every loop.

thanks for the help

– Pasted Max Patch, click to expand. –
#133802
Jun 15, 2009 at 9:55am

Ok, from what I can see I would advise you to first create your patch without a time stretching engine, using resampling techniques (slowing down = pitching down), so that you can tune your concept before venturing into independent time/pitch parameters.

When you made a working version with those more basic techniques I could have another look at how to translate the resulting concept to a version where time and pitch are independent.

Cheers,
Mattijs

#133803
Jul 29, 2009 at 3:17am

Hi guys, firstly this is my favorite MSP patch that i have on my computer and big thanks for giving this to the community.

1 question though. I have been building a Audio/visual patch to manipulate movie files using jitter and routing the audio into MSP using the spigot object. Is there any way that you guys know of that would allow me to implement this patch into a signal chain so when i slow the video down it maintains its pitch?

Im not sure how to get this patch to read from spigot’s cached audio instead of the buffer. Any ideas? or anyone know of another external that would allow me to do this type of thing??

Thanks,

Josh

#133804
Jul 30, 2009 at 2:00pm

Hi Josh, thanks for the kind words.

In your I case I would not use spigot~. I’d import the audio of the movie separately into a buffer~ object and use msp to drive the video playback position.

You can find more discussion about that on the forum, for example here: http://www.cycling74.com/forums/index.php?t=msg&rid=0&S=e7617c8ebfa6ecaf19bbe2f7f001672d&th=21966&goto=80952#msg_80952

Best
Mattijs

#133805
Aug 31, 2009 at 1:25pm

Hi all, here is a reply I sent to someone who asked me about some details about this patch. I thought it might be useful for others..

————-
The basic idea of the patch is to alternate two grains that play a small portion of the source buffer, fading them into each other. Every time a grain stops playing (and its amplitude envelope reaches 0, as explained below), it selects a new play position in the source buffer based on the time stretch factor. For example if the playback speed is higher than 1, every next grain starts playing from a little further in the buffer than the end position of the previous grain. The big challenge is to mask the jump in time as good as possible, the problem being that if you’d simply fade the grains into each other smoothly you get phasing effects and there is a risk of losing transients (very short sounds such as drums).

That is why the amplitude window is used as follows: for each grain, the first half of the window is used to fade the grain in, then the grain has amplitude 1 for a while, then the second half of the window is used to fade the grain out. The next grain is always fading in when the previous grain is fading out, so the total amplitude is always 1. The ratio of the different amplitude segments described above are determined by the fade time parameter. For small shifts in time or pitch, the fade time should be a small portion of the grain length to avoid phasing effects, for bigger shifts it needs to be larger to avoid audible discontinuities. The Hann window is default now, but to demonstrate that different windows all have different effects I also added a triangular window.

poly~ is a way to make multiple copies of a patch, in this case there are two. The thispoly object is used to distinguish between copies, and in my case I use the instance number to generate a 50% offset between the two.

An extra trick I use for harmonic sounds (‘Tones’ mode) is to give the grain start positions a little offset based on the main frequency as detected by the pitch tracker. This is to avoid sounds of the same frequency in the two grains canceling each other when the two grains overlap during a fade, which would result in a beating effect.

References that were useful: I consulted Curtis Roads: Microsound and Perry Cook: Psychoacoustics, but I found that no books or publications on the net actually describe techniques to avoid artifacts. In the end I did mostly everything by carefully picturing the problems and gradually solving them, but only after listening carefully to the artifacts of existing time stretchers such as the ones made by zplane.

Cheers,
Mattijs

___________________________
From:

As I am trying to gain a greater understanding of how granular synthesis works, I was hoping you could help me with a couple of things that I am trying to understand regarding your patch. Firstly, I am a little confused about the poly~ Polygrain 2 patch. from the help files I have gathered that this allows one or more copies of the poly~ to be loaded at any one time. Is this for the purpose of cloning grains? For instance, when altering the pitch of the sound, the sample rate is increased and the grains are cloned to keep the duration the same.

In the GetGrainAmp patch I notice that it contains the “wave~window” object. Does this set the attack and decay of each grain (getting its shape from the “window” patch)? And, if so, is the hann (bell-shaped) window the default window (as opposed to the triangular shaped window).

Finally, do you have any references that were particularly useful to you when building the patch?

——————–

#133806
May 5, 2012 at 11:53pm

it’s been a while w/o activity on this post, but i just wanted to say thanks mattijs! great patch.

#133807

You must be logged in to reply to this topic.