I'm trying to figure out how to perform a pitch shift on an array and get the results to another array in as instantaneous a fashion as possible. What I don't want to do is play through the input array in real time, which means that that the objects and patches included in Puredata that are designed to perform pitch shifts are largely useless to me. They play through the file too slowly. As I understand it, one way to accomplish what I'm trying to do is 1) do a FFT, 2) shift the frequencies in the resulting array by a factor, and 3) do an IFFT on the resulting array. What I'm struggling with is the second step. Attempting to reposition the spectrum results in some frequencies landing in positions between bins, because, when calculating the shift in frequencies, I'm multiplying by a decimal rather than a whole number. If someone could tell me how to shift the pitch of a sample and get the result to an array it would be greatly appreciated.
Insant pitch shift
What I don't want to do is play through the input array in real time, which means that that the objects and patches included in Puredata that are designed to perform pitch shifts are largely useless to me. They play through the file too slowly.
you could run a customized example patch in -batch mode to get the result asynchronous and "instantly".
Running Puredata with the -batch flag doesn't appear to have done anything whatsoever to speed up the playback of tabread4~.
EDIT: Actually, the problem might be that Puredata is refusing to save my startup preferences. How can I fix this?
Okay, I think I may have managed to start the patch up in batch mode. But doing so broke nearly every object, turning them all into boxes with red outlines.
speed up the playback of tabread4~.
this you can do by speeding up the [phasor~] driving it.
With [tabread] you can parse an array in the control domain.
I think I may have managed to start the patch up in batch mode. But doing so broke nearly every object, turning them all into boxes with red outlines.
How did you do it? Batch mode should not show any GUI at all.
is this what you want?
Which PD version are you using?
In Linux you can use [shell] from ggee lib to start a patch with -batch flag from another patch.
Several instances of PD are running in an asynchronous manner.
And as they can not communicate with [s] [r] or similar, this would require adding an input/output (probably with [soundfiler] / [writesf~]), a [loadbang] routine and a message to quit the instance when done.
All this might not be a good idea, depending on what you want to do?
So this is just guessing ...
Maybe better, you could rewrite 3.audio.examples/G09.pitchshift by replacing ~ objects with their control domain substitute.
As I understand it, one way to accomplish what I'm trying to do
Please, be more specific in what you want to do, what you have been trying and what doesn't work. In detail. And upload a patch.
Sounds like a XY problem.
Please use the return-key when posting. Structured paragraphs are reader-friendly.
Speeding up [phasor~] made no difference whatsoever.
I have few versions of PD on my computer. The one I'm using right now is 43.4 extended.
I tried entering batch mode in two different ways. First, I tried entering and saving it as a startup flag through preferences. Then, after that failed to produce any results, I tried entering -batch in the console. Apparently, neither attempt worked, because the GUI remained intact in both cases.
I need to be able to see my patch, so batch mode does not sound appealing.
I'm not aware of any control domain replacement for [vd~]. Perhaps you or someone else could point me in the right direction.
Like I said, I'm trying to pitch shift a sample from one array and save it to a second array, both without delay.
Do you how to copy the content of an array to another with [tabread]&[tabwrite]+a counter (control objects)?
I'd just plug an interpolation function similar to that of [tabread4~] between them.
Also there should be a possibility to use [switch~] (or was it [block~]?). You can send a bang to it, and it will perform one dsp cycle. You have to set the blocksize to the length of your array in that window.
Sorry that i cannot provide an example, im not at my computer and have to recall this from a dusty corner of my memory-basement. Aaand as allways before testing im not 100% sure it wörks..
@Polaris please don't use pd-extended in 2020... In the latest pd "vanilla" there is the option to run pd in batch mode from within pd using the fast-forward message. here is an example:
it fills an 10 sec. array instantly. Of cause all other processes will also be fast forwarded.
However, if you want to point out what you are planning to do in a wider context, i guess there is a better solution then filling arrays instantly. maybe..