Thanks Steven, Yeah on closer inspection I noticed those functions were static, so yeah I'll have a look and just emulate what is being done in those functions. So am I right in thinking that generally, as it is supported now, all arrays need to be initialised using the init opcode before usage? It would be nice to have an array initialiser built in to the api, for things like writing opcodes like diskin opening samples to an array output, without having to query how many samples are in the file etc. or things like matrix to matrix multiplication where an output with the correct dimensions is automatically generated. Another thing I am confused about is the opcode arguments for array opcodes, does "k[]" mean a one dimensional argument and "k[][]" mean a 2 dimensional? You can use a one dimensional array on an argument that takes a "k[][]" and vice-versa and no error is reported. -- Edward Costello On Thursday 18 July 2013 at 18:45, Steven Yi wrote: > Hi Ed, > > I think the ARRAYDAT should already be created by the compiler by the > time you see it in your opcode. However, it's dimensions and data may > not be initialized, which you may need to then modify yourself. I'm > not sure about needing a deinit callback. I don't know what the > standard practice is for freeing up memory for variables; perhaps we > need to add a var_free function to CS_TYPE to automatically handle > that... > > Otherwise, I'd look at Opcodes/arrays.c and use the functions John > wrote as a model. > > Good luck! > steven > > On Wed, Jul 17, 2013 at 10:06 AM, Edward Costello > wrote: > > Hi, > > > > When creating a custom array opcode, for instance one that takes 2 arrays as > > input and give 1 array as output, in the initialisation function for the > > opcode, when creating the output array does one create an ARRAYINIT struct > > and pass that to the array_init function? Conversely is there a need to call > > the array_del function from a RegisterDeinitCallback? > > Thanks > > > > -- > > Edward Costello > > > > > > ------------------------------------------------------------------------------ > > See everything from the browser to the database with AppDynamics > > Get end-to-end visibility with application monitoring from AppDynamics > > Isolate bottlenecks and diagnose root cause in seconds. > > Start your free trial of AppDynamics Pro today! > > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > > _______________________________________________ > > Csound-devel mailing list > > Csound-devel@lists.sourceforge.net (mailto:Csound-devel@lists.sourceforge.net) > > https://lists.sourceforge.net/lists/listinfo/csound-devel > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net (mailto:Csound-devel@lists.sourceforge.net) > https://lists.sourceforge.net/lists/listinfo/csound-devel > >