Hey list, Recently my rechunk~ abstraction has ceased to work. I've recently re-installed and, it seems the maxlib/arraycopy object is not working the way it used to. I used to send it a list with[sourceArray start end destinationArray(values,but now, when the source array is longer than the destination array, I get error messages that:arraycopy: start point 1223199 out of range for destination chunk_2_13Where chunk_2_13 is an array created to be the same length as the chunk I wish to extract. Does anyone have a better way of copying chunks from one array into another? Is there a vanilla way? Questions, questions,Ed _-_-_-_-_-_-_-^-_-_-_-_-_-_-_
For Lone Shark releases, Pure Data software and published Research, go to http://sharktracks.co.uk
Fastest vanilla way now is to get the range from the source as a list with [array get] and then write to the dest with [array set]. It's faster than you'd think. You can do some minor bounds checking, but the way Pd ranges work mostly takes care of that for you.
On Thu, Dec 1, 2016 at 1:48 PM, Ed Kelly via Pd-list pd-list@lists.iem.at wrote:
Hey list,
Recently my rechunk~ abstraction has ceased to work. I've recently re-installed and, it seems the maxlib/arraycopy object is not working the way it used to. I used to send it a list with [sourceArray start end destinationArray( values, but now, when the source array is longer than the destination array, I get error messages that: arraycopy: start point 1223199 out of range for destination chunk_2_13 Where chunk_2_13 is an array created to be the same length as the chunk I wish to extract.
Does anyone have a better way of copying chunks from one array into another? Is there a vanilla way?
Questions, questions, Ed
_-_-_-_-_-_-_-^-_-_-_-_-_-_-_
For *Lone Shark *releases, *Pure Data *software and published *Research*, go to http://sharktracks.co.uk
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/ listinfo/pd-list
On Thu, 2016-12-01 at 18:48 +0000, Ed Kelly via Pd-list wrote:
Does anyone have a better way of copying chunks from one array into another? Is there a vanilla way?
Checkout help for new [array] class. There is [array get <array>] for retrieving part of or whole array as a list. With [array set <array>] you can update part of or whole array.
And there has always been:
[<index> <value> <value> <value> .... ( | [send <array>]
to update an array/table.
Roman
Perfect. A way of doing it in Vanilla Pd. If I can gradually trim away the externals from my patches and vanillarize them I'll be a happy man.Thanks,Ed
_-_-_-_-_-_-_-^-_-_-_-_-_-_-_
For Lone Shark releases, Pure Data software and published Research, go to http://sharktracks.co.uk
On Thursday, 1 December 2016, 20:31, Roman Haefeli <reduzent@gmail.com> wrote:
On Thu, 2016-12-01 at 18:48 +0000, Ed Kelly via Pd-list wrote:
Does anyone have a better way of copying chunks from one array into another? Is there a vanilla way?
Checkout help for new [array] class. There is [array get <array>] for retrieving part of or whole array as a list. With [array set <array>] you can update part of or whole array.
And there has always been:
[<index> <value> <value> <value> .... ( | [send <array>]
to update an array/table.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list