Oops, sorry John about the somewhat erroneous info on csoundModuleDestroy! Istvan, what is the difference between note turnoff and deactivation? I had recoded fluidOpcodes to use that facility and it seemed to run everytime the note turned off, but I had not tested midi-initiated notes or tied-notes, so am curious about the differences. Thanks, steven On 6/15/05, Istvan Varga wrote: > jpff@codemist.co.uk wrote: > > > I seem to remember that the deinit of opcodes was removed. How does > > one do the equivalent action in cs5? > > ==John ffitch > > It depends on when you want the deinit routine to be called. > There are functions in the API to register a callback to be > called by deact() or csoundReset() (the latter is actually used > by the OSC listener opcodes you are just working on): > > /** > * Register a function to be called at note deactivation. > * Should be called from the initialisation routine of an opcode. > * 'p' is a pointer to the OPDS structure of the opcode, and 'func' > * is the function to be called, with the same arguments and return > * value as in the case of opcode init/perf functions. > * The functions are called in reverse order of registration. > * Returns zero on success. > */ > PUBLIC int csoundRegisterDeinitCallback(void *csound, void *p, > int (*func)(void *, void *)); > > /** > * Register a function to be called by csoundReset(), in reverse order > * of registration, before unloading external modules. The function takes > * the Csound instance pointer as the first argument, and the pointer > * passed here as 'userData' as the second, and is expected to return zero > * on success. > * The return value of csoundRegisterResetCallback() is zero on success. > */ > PUBLIC int csoundRegisterResetCallback(void *csound, void *userData, > int (*func)(void *, void *)); > > There are no callbacks for note turnoff (as opposed to deactivation) and > section end yet, but can be easily added if there is a demand. > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net