Re: signal array usage

From: Eric Scheirer (eds@media.mit.edu)
Date: Sat Oct 16 1999 - 07:21:31 EDT


Hi Ross,

>...
>asig stereoIn[2],stereoOut[2];
>...
>stereoOut = flange( stereoIn );
>...

This is not directly legal -- core opcodes always take
scalar arguments. One thing to do would be to write
a wrapper function as a user-defined opcode that does
the vector processing.

Loop-based vector processing can be done as

asig x[2],y[2],i;
oparray flange[2];

i = 0; while (i < 2) {
  y[i] = flange[i](x[i]);
  i = i + 1;
}

Note that the semantics are subtly different than you
requested -- rather than one multi-channel flanger, this
is an array of single-channel flangers. The effect will
be the same though.

Vectorized core opcodes are something that really should
have been in SAOL, and are tops on my list for the first
time we do improvements to the language. It was a mistake
not to include this functionality once arrays of singles
and opcodes were available -- it would make for incredibly
efficient compilation, too!

Best,

 -- Eric



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:35 EST