Recording and updating buffer~ inside a pfft~ object
Hi, hope you all are good
I'm trying to adapt a patch that you can find in MSP Analysis Tutorial 4: signal processing with pfft~. If you open tutorial, it would be the patch named phase_vocoder.
What I'm trying to do is to send signal from an adc~ to the pfft~ object so that a buffer~ that stores one second of signal is read in real time. For this I found the record~ object to be very inefficient , so I used two poke~, one for amplitude values and the other for phase values.
This would mean that I only need the index~ -- which is being told to read a specific position of a frame from the buffer~ -- to read a frame from one position to hear the signal from adc~ (because the buffer~is being updated and so are all frames).
This works, but only for frame in position 0. The rest of the buffer~ doesn't store anything.
Can someone tell what the problem is?
Thank you very much
What is "inefficient" with the record~ object?
With poke~, you need to increment the index by the Spectral Frame Size (half FFT size) each time you go to next frame. In the example you mention, that means that you have to poke~ the buffer samples #0-511 for frame 1, #512-1023 for frame 2, etc. Is it what you're doing?
With the record~ object the buffer~ does store in its whole space but the sound comes out all distorted.
I was not doing that. Already fixed it.
Thank you!