[PD-dev] Sending list of floats out an outlet
Ben Bogart - FMPM/F1999
bbogart at acs.ryerson.ca
Tue Jul 16 16:41:42 CEST 2002
I think I'm getting somewhere, based on code from prepend in ggee (Thanks
Guenter!) I'm not clear on how to use SETFLOAT to set multiple values in
my atom array. Here is some of my code:
t_atom* myf = f_out;
I can use SETFLOAT(myf,f); to set the first value of the list, but I
don't know how to set multiple list atoms... (I tried running SETFLOAT
multiple times with the same pointer, but different values and I get a
list "2Consistency check failed: atom_string2" Where 2 is the second
value I set via SETFLOAT.
Pointers would be appriciated.
The simplest possible example of outputing a list of floats would be helpful.
On Tue, 16 Jul 2002, Krzysztof Czaja wrote:
> hi Ben,
> if 'x' is your object pointer, 'n' is the number of floats, and
> you already store them in an array of atoms 'a', then the call
> will be
> outlet_list(x, &s_list, n, a);
> If the floats are kept in a float* array, then you need to
> allocate an array of atoms, and copy the floats into it, using
> SETFLOAT macro in a loop.
> The tricky part could be deciding, how to allocate this output
> array -- this was discussed some time ago on pd-dev. Also, there
> are several examples in zexy, ggee, cyclone, etc.
> Ben Bogart - FMPM/F1999 wrote:
> > I want to calculate a series of floats and output them as a list out the
> > outlet, I see:
> > void outlet_list(t_outlet *x,
> > t_symbol *s, int argc, t_atom *argv);
> > but don't know how to set the contents of the list, ie I'm not sure how
> > to use gensym("list").
More information about the Pd-dev