[PD-dev] non-2^n blocksizes (was Re: [ pure-data-Feature Requests-3578019 ] I'd like to...)

Charles Henry czhenry at gmail.com
Wed Oct 24 01:56:31 CEST 2012


On Tue, Oct 23, 2012 at 1:02 PM, Miller Puckette <msp at ucsd.edu> wrote:
> all the 'ugens' actually look at the allocated
> size of input/output signals to determine the number of points to calculate.

Okay--I see where this goes now.  You just pass the signal data
structure to the "dsp" method and the "dsp" method is responsible for
putting the perform routine on the chain with s_vecsize

The code in the block_set() function is pretty much the same as what
happens in signal_new() when you feed it a non-power-of-two vector
size, except it doesn't get stored in the signal data structure:
if (calcsize)
  if ((vecsize = (1 << ilog2(calcsize))) != calcsize)
    vecsize *= 2;

So, to make it work--you'd have to add s_calcsize to the signal data
structure, and then, each compatible "dsp" routine would need to use
s_calcsize in place of s_vecsize.

But it seems to be practically useless.  It's misleading to users to
think they're getting a non-2^n blocksize.  The calcsize is after all
set by the block~ and switch~ objects in the argument we think of as
blocksize.

Chuck



More information about the Pd-dev mailing list