Hi all,
Please excuse my lack of knowledge, but I am truly stuck. I'm having trouble with this external I've written. Basically it needs to initialise an array as it is loaded, so that when audio is turned on it starts an array-FIFO process where one array calculated from the input vector is stored in another on each block.
I tried putting a for loop in the _new function, and this works when the object is loaded from within a PD patch. But when I try to load the patch again it crashes PD.
Does anyone know of a command that initialises an array to zeros? I will I have to make a workaround?
Best, Ed
-> -> --> ---> -----> --------> -------------> r3search + praktik EK5perimenz
___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
Ed Kelly wrote:
Does anyone know of a command that initialises an array to zeros? I will I have to make a workaround?
[; mytable const 0(
if it crashes, then it is likely that you are writing beyond array-boundaries or that the array doesn't exist at all.
make sure that you respect the return-values of pd_findbyclass() and garray_getfloatarray()
oh and re-reading your mail i am not sure whether you are talking about pd-arrays (aka: tables) or C-arrays.
in the later case, you can use memset() to set it to a default value.
mfg.asdr. IOhannes