[PD-dev] FLEXT: ToOutList(), Append(), and AtomList()
t.grill at gmx.net
Sat Aug 9 01:47:43 CEST 2003
> > My guess is you first define the vars to store the lists in the class,
> > then use Append in a loop at add the array values to the list, and then
> > send out with ToOutList(). But what variable type should the list
> > variable be?
> You need an atom list (type "AtomList"), and a atom (type "t_atom").
> For each float value, set the atom with the "SetFloat" function, then use
> the "Append" method to append the atom to the atom list.
That works but i think i need not mention that you better know the size
(AtomList is a primitive container not as powerful as the refined STL class
for(int i = 0; i< size; ++i) SetFloat(mylist[i],2.718*i);
or even more efficiently, if size is a constant
for(int i = 0; i< SIZE; ++i) SetFloat(mylist[i],2.718*i);
More information about the Pd-dev