Can you create your own externals?

Jul 4, 2012 at 4:31am

Can you create your own externals?

If so, how do accomplish that? Can you use C to do it?

Jul 4, 2012 at 5:31am


Yes, you can :-)

C is the main language used to make externals (even if it can be done with C++ and i guess Objective-C). Download the API there (for max5 or max6) :

There is examples inside with a html documentation pretty well done to start. For questions, search then ask in the “dev” forum. If you are more used with Java / Python / Lua… you can use interpreters embedded in Max.

I joined the code of an object [flop] that do nothing except bang when it is banged ;-)

#include "ext.h"
#include "ext_obex.h"

typedef struct _flop {
    t_object    ob;
    void        *outlet;
    } t_flop;

void *flop_new  (t_symbol *s, long argc, t_atom *argv);
void flop_free  (t_flop *x);
void flop_bang  (t_flop *x);

static t_class *flop_class;

int main(void)
t_class	*c = NULL;

c = class_new("flop", (method)flop_new, (method)flop_free, sizeof(t_flop), 0, A_GIMME, 0);
class_addmethod(c, (method)flop_bang, "bang", 0);
class_register(CLASS_BOX, c);

flop_class = c;

return 0;

void *flop_new(t_symbol *s, long argc, t_atom *argv)
    t_flop *x = NULL;

    if (x = (t_flop *)object_alloc(flop_class)) {
        x->outlet = bangout((t_object *)x);

    return x;

void flop_free(t_flop *x)

void flop_bang(t_flop *x)
  1. flop.c
Jul 4, 2012 at 6:01am

Hi new dev,

Look at the dev forum, there are also tutorials :

and if you want, there are a lot of open source projects :
my library

Have fun.


You must be logged in to reply to this topic.