diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2009-04-23 22:00:49 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2009-04-23 22:00:49 +0000 |
commit | ed884cfd2d33f197c7c4625f05b84e8a9e9597c3 (patch) | |
tree | 66f72e7fc07c024c20603fa926e00fd6215444d5 /max2pd.h | |
parent | 2816ecbd4002c8260de586b5fc2e73515010fcbb (diff) |
took VBAP v1.0.3 Max/MSP source that I got via email from Ville Pulkki and got it to build for Pd. Now let's test it and see what happens
svn path=/trunk/externals/vbap/; revision=11102
Diffstat (limited to 'max2pd.h')
-rw-r--r-- | max2pd.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/max2pd.h b/max2pd.h new file mode 100644 index 0000000..2f06217 --- /dev/null +++ b/max2pd.h @@ -0,0 +1,46 @@ +/* + * this header aims to make it easy to port Max objects to Pd + */ + +/* name changes */ +#define SETSYM SETSYMBOL + +/* Pd doesn't have longs */ +#define SETLONG SETFLOAT + +/* different names for the same thing */ +#define Atom t_atom +#define Symbol t_symbol + +/* allocate memory */ +#define sysmem_newptr(size) getbytes(128) +#define sysmem_freeptr(ptr) freebytes(ptr, 128) + +/* standard object API functions */ +#define atom_getlong(atom) atom_getfloatarg(0, 1, atom) +#define atom_getsym(atom) atom_getsymbolarg(0, 1, atom) +#define object_alloc(obj_class) pd_new(obj_class) +#define object_free(obj) pd_free((t_pd*)obj) +#define newobject(class) pd_new(class) +#define outlet_int(outlet, number) outlet_float(outlet, number) + +/* debug things */ +#define _enable_trace sys_verbose + +/* these are NOT included here because they would cause more problems than + * they would solve. Usually, they are used in the setup() and new() + * functions, where most of the differences are between the Max and PD APIs */ + +/* macros */ +// A_DEFLONG + +/* types */ +// method +// Object + +/* functions */ +// addint() +// addmess() +// newobject() +// outlet_new() +// setup() |