Build_plugins

I’ve never used them, but I would assume so.

My reading of this is that it will null only the start and end of the array if non zero. I guess that will prevent any future processing block from reading that data. You’d need to look into the source to get to the bottom of it :slight_smile:

Thanks Rory! I also asked in the Mailing List and it’s clear now:

offset may be nonzero at a start of a event, and only then. so buffer writing is starting at the offset position.
early may be nonzero at the end of a event, and only then.

I’m still digging through the Csound Codebase to understand some stuff. Bit what i see all the time, and is maybe just for core development, is this:
IGN(csound);
For what is this?

I hadn’t spotted that macro before, but it’s defined here. Considering it is being used to void certain things, IGN must stand for ignore. I guess it’s used to stop pesky compiler warnings.

Thanks again!

No i have some trouble with my init function.
I don’t know what happens, but Csound seems to be not allocating memory for my pointer.
When i use my compiled plugin opcode i see my error message, which i implied already for debugging, but i don’t know what i do wrong at all:


#define THOMAS_MAXCHN 36  

typedef struct {
  OPDS h;
  MYFLT *aout_x[THOMAS_MAXCHN], *aout_y[THOMAS_MAXCHN],
    *aout_z[THOMAS_MAXCHN]; /* output */
  MYFLT *b, *delta_time, *skip, *in_x, *in_y, *in_z, *n_particles, *max_deviation; /* input */
  MYFLT n_voices; /* internal variables */
  MYFLT x_start;
  MYFLT y_start;
  MYFLT z_start;
  MYFLT max_dev; 
} THOMAS;



static int thomas_init(CSOUND *csound, THOMAS *p){
  printf("Init Start\n");
  if (p->in_x == NULL || p->in_y == NULL || p->in_z == NULL || 
    p->n_particles == NULL || p->max_deviation == NULL) {
    csound->Message(csound, "Error: One or more pointers are NULL\n");
    return NOTOK;
  }

  p->x_start = *p->in_x;
  p->y_start = *p->in_y;
  p->z_start = *p->in_z;
  p->n_voices = *p->n_particles;
  p->max_dev = *p->max_deviation;
  return OK;
}