[PD-dev] What goes on during dsp ticks?

Thomas Grill gr at grrrr.org
Sat Jun 14 15:20:10 CEST 2008


Hi David,

Am 14.06.2008 um 03:08 schrieb PSPunch:
>
>
> =====================
> == PROCESS BLOCK.2 ==
> =====================
>
>   while (n--) {
> //	*out++ = *in++;
>   }
>
>
> Remarks: Action is commented out but signal goes through.. Why?
>

that's because in and out can point to the same memory... signal  
vectors are reused in PD for cache-friendlyness.

>
> =====================
> == PROCESS BLOCK.4 ==
> =====================
>
>   n--;
>   *out++ = 0;
>   while (n--) {
> 	*out++ = *in++;
>   }
>
>
> Remarks: Expecting first sample of the block to be zero and others
> delayed by 1 sample. Instead, I get an constant output of zero.

As above... you have to be aware that when you are writing to the  
output, you change the input.
Either cache the input or use a different algorithm (in this case  
start from the end)

gr~~~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2407 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20080614/8f9e5622/attachment.bin>


More information about the Pd-dev mailing list