Declares the Csound plugin opcode interface.
- Author
- John P. ffitch, Michael Gogins, Matt Ingalls, John D. Ramsdell, Istvan Varga, Victor Lazzarini.
Plugin opcodes can extend the functionality of Csound, providing new functionality that is exposed as opcodes in the Csound language. Plugins need to include this header file only, as it will bring all necessary data structures to interact with Csound. It is not necessary for plugins to link to the libcsound library, as plugin opcodes will always receive a CSOUND* pointer (to the CSOUND_ struct) which contains all the API functions inside.
This is the basic template for a plugin opcode. See the manual for further details on accepted types and function call rates. The use of the LINKAGE macro is highly recommended, rather than calling the functions directly.
typedef struct {
MYFLT *out;
MYFLT *in1, *in2;
{
}
{
}
{
return 0;
}
{
int err = 0;
ep++;
}
return err;
}
{
return 0;
}
{
{
"opcode",
sizeof(
OPCODE), 0, 3,
"i",
"ii", (
SUBR)op_init, (
SUBR)op_k }}
};
Declares the Csound plugin opcode interface.
PUBLIC int csoundModuleInit(CSOUND *)
PUBLIC int csoundModuleDestroy(CSOUND *)
PUBLIC int csoundModuleCreate(CSOUND *)
#define LINKAGE
The LINKAGE macro sets up linking of opcode list.
Definition: csdl.h:149
#define OK
Definition: csoundCore.h:96
#define OPCODE
Definition: csoundCore.h:782
int(* SUBR)(CSOUND *, void *)
Definition: csoundCore.h:601
#define PUBLIC
Definition: csound.h:277
Contains all function pointers, data, and data pointers required to run one instance of Csound.
Definition: csoundCore.h:1019
int(* AppendOpcode)(CSOUND *, const char *opname, int dsblksiz, int flags, int thread, const char *outypes, const char *intypes, int(*iopadr)(CSOUND *, void *), int(*kopadr)(CSOUND *, void *), int(*aopadr)(CSOUND *, void *))
Definition: csoundCore.h:1333
Definition: csoundCore.h:292
int(* kopadr)(CSOUND *, void *p)
Definition: csoundCore.h:300
char * intypes
Definition: csoundCore.h:298
char * opname
Definition: csoundCore.h:293
uint16 dsblksiz
Definition: csoundCore.h:294
int(* aopadr)(CSOUND *, void *p)
Definition: csoundCore.h:301
int(* iopadr)(CSOUND *, void *p)
Definition: csoundCore.h:299
uint8_t thread
Definition: csoundCore.h:296
char * outypes
Definition: csoundCore.h:297
This struct holds the info for one opcode in a concrete instrument instance in performance.
Definition: csoundCore.h:607