Real Time Phase Vocoder?

Oct 6, 2013 at 7:14am

Real Time Phase Vocoder?

Looking at Msp tutorial talking about Phase Vocoder
I was wondering if it is possible to make phase vocoding on real-time input like with an Ezadc object and using poke~ instead of record~ . I’ve just modified the tutorial patch, created 2 pokes~ (one for real, one for imaginary), I’ve indexed them with a count~ but it really doesn’t work, and it’s like buffer can’t do his job, as it is always deleting his sound and can’t go any further from his beginning in the time domain table. Maybe this is due to the nature of real-time or maybe it’s just that I’m such an idiot as 2idiotsand1max are?

#267216
Oct 6, 2013 at 10:26am

It’s definitely possible. Can you post your patch?

Part of the overwriting happens because you typically have overlapping ffts with pfft~ and they’ll overwrite each other if they’re using the same buffer. (You want to use a local buffer~(i.e. name it something like #0_buffer)

#267239
Oct 6, 2013 at 12:44pm

Thank you Peter for your answer, so you mean that I’d have to use different buffers? I don’t get it. Poke reads from a buffer and index does too from the same one , if I use different names how can they work?

this is the patch, pretty much the same from the tutorial ( I’ve just copied what I needed) :

pre>

– Pasted Max Patch, click to expand. –

and this is the inside pfft:

<code>

– Pasted Max Patch, click to expand. –

</code>

Thank you very much for your interest!

#267252
Oct 6, 2013 at 6:18pm

Try this:

(feis)

<code>

– Pasted Max Patch, click to expand. –

</code>

And this for the main patch:

<code>

– Pasted Max Patch, click to expand. –

</code>

#267276
Oct 7, 2013 at 12:41pm

Thank you, I will check it out as soon as possibile !

#267358
Oct 8, 2013 at 2:09am

Ok, I’ve checked and I’ve got a few ( a lot of…) questions… I send the 2 patches back to you with some comments inside, if you got spare time just look at them!

here the main patch:

<code>

– Pasted Max Patch, click to expand. –

</code>

And here inside the pfft:

<code>

– Pasted Max Patch, click to expand. –

</code>

#267416
Oct 8, 2013 at 3:15am

hey, i do’nt know nothing about fft but why i know is #0 is a randomly generated number that will change each time you load an instance of the bastraction in which there is the 10. This means that the name of buffer will indeed change for each instance. See help for “unique identifier” in chapter “arguments and special character in max” of Max help.

#267424
Oct 8, 2013 at 4:52am

Thank you wichug, I actually didn’t know, I’ve checked on buffer’s help file but there wasn’t anything about. I’m gonna go and have a look. Thank u again

#267433
Oct 8, 2013 at 11:45am

#0 is the way to create abstraction-local names, whether for buffer~, send, receive, send~, receive~, table, etc. It’s the functional equivalent of a private variable in some programming languages. (It is visible, though, but you have to know the name)

You have to put the #0 at the front of the name, e.g. #0name.

The same thing is true for arguments in abstractions (#1,#2…) when you want to share names between abstractions.

#267466
Oct 9, 2013 at 10:34am

Good questions. Here’s my thoughts:

<code>

– Pasted Max Patch, click to expand. –

</code>

<code>

– Pasted Max Patch, click to expand. –

</code>

#267580
Oct 9, 2013 at 12:11pm

(for reference : i meant not in any helpfile, but the actual max help browser)

#267599
Oct 9, 2013 at 12:25pm

Hey Peter, the sah~’s outlet inside the pfft~ isn’t connected to anything, yet you say it prevents getting weird combinations of multiple frames. Do some signal objects have effects without beeing connected inside pfft~ world, or is that a forgotten connection ?

#267603
Oct 9, 2013 at 1:26pm

@Vichug: Yeah, that should be connected if you want to only change frames at the frame boundary. Without it, you could get data from several frames (especially if your position signal is really noisy). Either could be useful and interesting, but I intended to connect it…

#267612
Oct 15, 2013 at 12:48am

Thank you very much for your answers Peter!

#268089

You must be logged in to reply to this topic.