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;
static int op_init(CSOUND *csound,
OPCODE *p)
{
}
static int op_k(CSOUND *csound,
OPCODE *p)
{
}
{
return 0;
}
{
int err = 0;
(int (*)(CSOUND *,
void *)) ep->
iopadr,
(int (*)(CSOUND *,
void *)) ep->
kopadr,
(int (*)(CSOUND *,
void *)) ep->
aopadr);
ep++;
}
return err;
}
{
return 0;
}
{
{
"opcode",
sizeof(
OPCODE), 0, 3,
"i",
"ii", (
SUBR)op_init, (
SUBR)op_k }}
};