[PD] class_new flags and perform questions

David Merrill dmerrill at stanford.edu
Sun Feb 17 22:24:26 CET 2002

Hi there,

I'm building a signal external for pd.  My first question is about flags
in the class_new function.  I understand that the following flags can be

   CLASS_DEFAULT   a normal object with one inlet
   CLASS_PD        object (without graphical presentation)
   CLASS_GOBJ      pure graphical object (like arrays, graphs,...)
   CLASS_PATCHABLE a normal object (with one inlet)
   CLASS_NOINLET   the default inlet is suppressed

Are these mutually exclusive, or can more than one be passed?  If more
than one can be passed, do I logically OR them together to pass them all
as a single argument?

My second question is about w array that is passed to the perform routine.
I understand that the contents of this array are specified by me when I
call dsp_add.  What is at w[0] though?  (we seem to start at index 1)
Relatedly, is there a reference somewhere that explains the structure of
the sp array that is passed to my "dsp" function?  I understand that
sp[0]->s_vec seems to be the input buffer, and sp[0]->s_n is the sample
count, but I'd like to know everything I can about that structure and how
it is set up.

David Merrill
dmerrill at stanford.edu

More information about the Pd-list mailing list