[PD] array copy speed test

Chuckk Hubbard badmuthahubbard at gmail.com
Thu Aug 10 00:44:52 CEST 2006


On 8/9/06, Hans-Christoph Steiner <hans at eds.org> wrote:
>
> >> I would love to hear suggestions as to how I could do this
> >> differently.   The problem is that want to have each sound snippet
> >> stored for a while and separately controllable.  Perhaps I could just
> >> use a massive buffer as a ringbuffer then use start and end points to
> >> reference locations in the array.  But at some point, its going to
> >> have to loop around in the ringbuffer and that could be quite tricky
> >> to handle well.
> >
> > I don't really understand how you do it with copy. You only need to
> > copy data if you modify it later. Otherwise just record it to the
> > right place and use it there directly.
>
> Yup, its modified.  First, I need to fade it in and out to remove
> clicks, then I want to also be able to modify the sound in the future.

If you already have audio running, wouldn't it be simpler to use
tabread~ and tabwrite~ than [until]?  Or maybe that would be slower, I
don't understand the internal operation well enough to say.  There
must be some way of fooling Pd into using the data without explicitly
copying it.  A feedback loop or something?  Though I guess it has to
access the same memory regardless.
Your initial arraycopy subpatch has an ambiguous [0( message sent to
both the float and the [+ 1( attached to it, btw.




More information about the Pd-list mailing list