Permalink
Browse files

Added another patch to handle IO with the monome.

  • Loading branch information...
jbaudanza committed Nov 10, 2009
1 parent fed4b94 commit 3a162ed32c0beaf1b69a94f10de8e0292b684b7d
Showing with 435 additions and 194 deletions.
  1. BIN Monome Clip Launcher.amxd
  2. +22 −0 monome_input.js
  3. +201 −0 monome_io.maxpat
  4. +18 −0 monome_ouput.js
  5. +194 −194 track_control.maxpat
View
Binary file not shown.
View
@@ -0,0 +1,22 @@
+inlets = 2;
+
+prefix = "/box";
+
+function anything() {
+ if(inlet != 0 )
+ return;
+
+ var matcher = prefix + "/";
+ var i = messagename.indexOf(matcher);
+
+ if( i == 0 ) {
+ var a = arrayfromargs(arguments);
+ a.unshift(messagename.substring(matcher.length));
+ outlet(0, a);
+ }
+}
+anything.immediate = 1;
+
+function text(new_prefix) {
+ this.prefix = new_prefix;
+}
View
@@ -0,0 +1,201 @@
+{
+ "patcher" : {
+ "fileversion" : 1,
+ "rect" : [ 214.0, 162.0, 419.0, 371.0 ],
+ "bglocked" : 0,
+ "defrect" : [ 214.0, 162.0, 419.0, 371.0 ],
+ "openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
+ "openinpresentation" : 0,
+ "default_fontsize" : 12.0,
+ "default_fontface" : 0,
+ "default_fontname" : "Arial",
+ "gridonopen" : 0,
+ "gridsize" : [ 15.0, 15.0 ],
+ "gridsnaponopen" : 0,
+ "toolbarvisible" : 1,
+ "boxanimatetime" : 200,
+ "imprint" : 0,
+ "enablehscroll" : 1,
+ "enablevscroll" : 1,
+ "devicewidth" : 0.0,
+ "boxes" : [ {
+ "box" : {
+ "maxclass" : "comment",
+ "text" : "Output",
+ "fontsize" : 12.0,
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "fontname" : "Arial",
+ "patching_rect" : [ 188.0, 39.0, 150.0, 20.0 ],
+ "id" : "obj-15"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "comment",
+ "text" : "Input",
+ "fontsize" : 12.0,
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "fontname" : "Arial",
+ "patching_rect" : [ 154.0, 251.0, 150.0, 20.0 ],
+ "id" : "obj-14"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "js monome_input.js",
+ "fontsize" : 12.0,
+ "numinlets" : 2,
+ "numoutlets" : 1,
+ "fontname" : "Arial",
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 34.0, 292.0, 114.0, 20.0 ],
+ "id" : "obj-13"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "send monome_in",
+ "fontsize" : 12.0,
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "fontname" : "Arial",
+ "patching_rect" : [ 34.0, 332.0, 103.0, 20.0 ],
+ "id" : "obj-12"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "receive monome_out",
+ "fontsize" : 12.0,
+ "numinlets" : 0,
+ "numoutlets" : 1,
+ "fontname" : "Arial",
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 26.0, 32.0, 123.0, 20.0 ],
+ "id" : "obj-11"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "receive monome_address_prefix",
+ "fontsize" : 12.0,
+ "numinlets" : 0,
+ "numoutlets" : 1,
+ "fontname" : "Arial",
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 222.0, 188.0, 185.0, 20.0 ],
+ "id" : "obj-10"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "udpsend localhost 8080",
+ "fontsize" : 12.0,
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "fontname" : "Arial",
+ "patching_rect" : [ 32.0, 187.0, 137.0, 20.0 ],
+ "id" : "obj-3"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "js monome_ouput.js",
+ "fontsize" : 12.0,
+ "numinlets" : 2,
+ "numoutlets" : 1,
+ "fontname" : "Arial",
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 32.0, 156.0, 118.0, 20.0 ],
+ "id" : "obj-8"
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "udpreceive 8000",
+ "fontsize" : 12.0,
+ "numinlets" : 1,
+ "numoutlets" : 1,
+ "fontname" : "Arial",
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 34.0, 249.0, 99.0, 20.0 ],
+ "id" : "obj-1"
+ }
+
+ }
+ ],
+ "lines" : [ {
+ "patchline" : {
+ "source" : [ "obj-13", 0 ],
+ "destination" : [ "obj-12", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-10", 0 ],
+ "destination" : [ "obj-8", 1 ],
+ "hidden" : 0,
+ "midpoints" : [ 231.5, 153.0, 180.0, 153.0, 180.0, 153.0, 140.5, 153.0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-10", 0 ],
+ "destination" : [ "obj-13", 1 ],
+ "hidden" : 0,
+ "midpoints" : [ 231.5, 241.0, 138.5, 241.0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-1", 0 ],
+ "destination" : [ "obj-13", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-11", 0 ],
+ "destination" : [ "obj-8", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-8", 0 ],
+ "destination" : [ "obj-3", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+ ]
+ }
+
+}
View
@@ -0,0 +1,18 @@
+inlets = 2;
+
+prefix = "/box";
+
+function anything() {
+ if(inlet != 0 )
+ return;
+
+ var a = arrayfromargs(arguments);
+ a.unshift(prefix + "/" + messagename);
+ outlet(0, a);
+}
+
+anything.immediate = 1;
+
+function text(new_prefix) {
+ this.prefix = new_prefix;
+}
Oops, something went wrong.

0 comments on commit 3a162ed

Please sign in to comment.