Well, if you use a delay, you'll need a delay that has a big size to avoid discontinuities (in that case, loss of data due to small buffer), so i don't see how this would be better than having a second array.

the only other way i think is if you do some "in place" calculation every block, but you can only stretch down the table, having a "speeding up" feel for the writing process. (Note: after writing this e-mail, i think that there is a way to speed down too, but you will lose what tabwrite put in the array, I will try this too).

When you send a bang to tabwrite~, it starts overriding the array every block, so, you can replace each block in that array with a smaller one. you'll need to keep track of in which block tabwrite is at and if the writing is over to stop, i'll try this approach since i'm curious how this could be done.

Anyway, i've done a patch demonstrating the control approach with 2 tables that i said in the previous e-mail, don't know if is useful, but is here anyway

2018-07-17 9:55 GMT-03:00 Liam Goodacre <liamg_uw@hotmail.com>:
Thanks José, I hadn't thought of that. I'd like to avoid using a second array if possible, as it doubles the memory usage, but I'll do it if there are no better options.

I've also found an object in the ggee library called [tabread4~] which sounds promising, but it doesn't have a help patch. Does anyone know how it works?

From: José de Abreu <abreubacelar@gmail.com>
Sent: 17 July 2018 13:25
To: Liam Goodacre
Cc: PD list
Subject: Re: [PD] write to audio array at different speeds
 
you can use 2 tables, write to one and then phasor~ + tabread4~ to another tabwrite~, and if you need the process to occur faster than real time (just to stretch the wave after recording the first table) you can use some until + switch~ magic.

you can do the same process of 2 tables above in the control domain, using tabread4 to tabwrite for the second table (without tilde). This will need more math to build the until loop for picking the numbers that phasor~ would provide, but won't need switch~ magic for "faster than real time".

or use delread4~ with variable delay, but to calculate the right positions could be tricky, I don't know


Em Ter, 17 de jul de 2018 08:49, Liam Goodacre <liamg_uw@hotmail.com> escreveu:
It seems that [tabwrite~] writes only at one speed (presumably determined by the sample rate). But I want to use it to write audio to an array at a different speed. In other words, given an array of a set size, I want to determine that the recording will reach the end of the array at a different point in time than the default one.

How could this be done? Is there any way to trick [tabwrite~] into writing at a different speed, ie. by sending it a different sample rate? Or can we do something clever with [delread4~]?
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list