cmax-msp-jitter

Get the name of a coll object in Max C API


I am writing a Max MSP external.

I am lost in Max C API documentation since hours and couldn't find a way to get the name of a coll object from Max C API.

https://cycling74.com/sdk/max-sdk-8.0.3/html/index.html

If the object is | coll foo | , foo is the symbol I want to get.

I am able to iterate over a patcher and get pointers to all boxes and then to objects by calling jbox_get_object() with pointers to boxes. I tried getting many attributes of the objects I got and everything works ok.

I can't seem to find where the data I want to get is stored and what is it called.

I would appreciate some help.

Thank you.


Solution

  • [coll] is very sparsely documented, you should ask on the Cycling74 dev-forum. Below is what I do in [posit] after traversing the patcher to find a coll’s box. hth /*j

    #include “coll.h”
    
    <snip>
    
    t_object *o;
    t_coll   *collob;
    t_object *jb;
    t_symbol *collname;
    
    <snip>
    
    o = jbox_get_object(jb);
    collob = (t_coll *)o;
    collname = (t_symbol *)collob->c_x->c_sym;
    
    </snip>