Hi,
I would highly appreciate some assistance in grasping how signals are processed in DSP objects.
Working on the following template, I will demonstrate variations in the <PROCESS BLOCK>. As results do not appear as the way I expect, there must be something I am not understanding correctly.
========== Template ==========
t_int *foobar_tilde_perform(t_int *w) { t_sample *in = (t_sample *)(w[1]); t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]);
<PROCESS BLOCK>
return (w+4); }
===================== == PROCESS BLOCK.1 == =====================
while (n--) { *out++ = *in++; }
Remarks: Simple THRU... works as expected.
===================== == PROCESS BLOCK.2 == =====================
while (n--) { // *out++ = *in++; }
Remarks: Action is commented out but signal goes through.. Why?
===================== == PROCESS BLOCK.3 == =====================
while (n--) { *out++ = *in++ * -1; }
Remarks: Inverse signal, as expected
===================== == 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.
I hope what I am missing is something obvious to those with insight.
Thanks.
-- David Shimamoto