Atte André Jensen wrote:
Hi
I'm writing my second external, an arpeggiator called "arp". I know I was encouraged to write it as an abstraction, but the exact features that I wanted seemed too overwhelming for a pd-newbie.
Anyways, I have two questions:
- Whenever I instantiate it in pd I get "consistency check failed:
class_addmethod: arp_bang: bad argument types" in the pd console. However the external seems to work just fine. If someone clever could look at the code an spot the mistake, I'd be most happy! Basically I have four float-inlets where the first should also accept "bang"-messages.
1. most likely this is the culprit:
class_addmethod(arp_class, (t_method)arp_bang, gensym("bang"), A_DEFFLOAT, 0);
with this code you say that arp_bang() expects a float as an argument. but arp_bang() does not!! (and btw, you already have added a bang-method with the class_addbang() for arp_bang()
2. it might be a better idea to use "static" for all functions that you don't want to export (all but the _setup() function(s))
3. pd-dev is the list... :-)
fmasd.r IOhannes
IOhannes m zmoelnig wrote:
- most likely this is the culprit:
class_addmethod(arp_class, (t_method)arp_bang, gensym("bang"), A_DEFFLOAT, 0);
with this code you say that arp_bang() expects a float as an argument. but arp_bang() does not!! (and btw, you already have added a bang-method with the class_addbang() for arp_bang()
Aha. So I should simply remove the above lines, right?
- it might be a better idea to use "static" for all functions that you
don't want to export (all but the _setup() function(s))
To remove the risk of name clashes between my external and others, right?
- pd-dev is the list... :-)
I'm now subscribed to that also, thanks!