aboutsummaryrefslogtreecommitdiff
path: root/xbee/max2pd.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbee/max2pd.h')
-rw-r--r--xbee/max2pd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/xbee/max2pd.h b/xbee/max2pd.h
new file mode 100644
index 0000000..6f09500
--- /dev/null
+++ b/xbee/max2pd.h
@@ -0,0 +1,19 @@
+/*
+ * 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
+
+/* allocate memory */
+#define sysmem_newptr(size) getbytes(128)
+#define sysmem_freeptr(ptr) freebytes(ptr, 128)
+
+
+#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)