{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 1, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 345.0, 226.0, 853.0, 593.0 ], "bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "editing_bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 1, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 1, "objectsnaponopen" : 1, "statusbarvisible" : 2, "toolbarvisible" : 1, "lefttoolbarpinned" : 0, "toptoolbarpinned" : 0, "righttoolbarpinned" : 0, "bottomtoolbarpinned" : 0, "toolbars_unpinned_last_save" : 0, "tallnewobj" : 0, "boxanimatetime" : 200, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "style" : "", "subpatcher_template" : "IceCubeTray", "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-93", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 360.0, 385.0, 210.0, 47.0 ], "style" : "", "text" : "The matrixctrl gives us a form of notation similar to the Time Unit Box System (TUBS)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-91", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 256.0, 222.0, 47.0 ], "style" : "", "text" : "On MIDI channel 10, each note number corresponds to a different percussion instrument. Here we are using bongos." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-89", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 695.0, 538.0, 75.0, 20.0 ], "style" : "", "text" : "Low Bongo" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-88", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 595.0, 538.0, 68.0, 20.0 ], "style" : "", "text" : "Hi Bongo" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-86", "linecount" : 6, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 450.0, 192.0, 287.0, 87.0 ], "style" : "", "text" : "The getcolumn message causes matrixctrl to output a pair of messages, one of which corresponds to one drum, and one to the other. If a given row and column is set, a one is output for the cell. Otherwise it is zero. The select commands send a differently pitched note to each drum when they receive a 1." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-84", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 122.0, 379.0, 47.0 ], "style" : "", "text" : "Here we use counter to play a sequence of 24 notes. The 3 against 2 pattern repeats every 6 notes, so it will play four times. The 4 against 3 pattern repeats every 12 notes, so it will play twice." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-82", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 360.0, 90.0, 420.0, 20.0 ], "style" : "", "text" : "In a polyrhythm, two or more conflicting rhythms are played at the same time." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-80", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 360.0, 192.0, 65.0, 22.0 ], "style" : "", "text" : "metro 200" } } , { "box" : { "id" : "obj-79", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 360.0, 122.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-76", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "bang", "" ], "patching_rect" : [ 695.0, 434.0, 36.0, 22.0 ], "style" : "", "text" : "sel 1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-75", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "bang", "" ], "patching_rect" : [ 595.0, 434.0, 36.0, 22.0 ], "style" : "", "text" : "sel 1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-74", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 30.0, 165.0, 67.0, 22.0 ], "style" : "", "text" : "pgmout 10" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-73", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 695.0, 471.5, 32.5, 22.0 ], "style" : "", "text" : "61" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-72", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 595.0, 471.5, 32.5, 22.0 ], "style" : "", "text" : "60" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-67", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 695.0, 501.5, 79.0, 22.0 ], "style" : "", "text" : "send midiout" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-66", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 595.0, 501.5, 79.0, 22.0 ], "style" : "", "text" : "send midiout" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-65", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "int" ], "patching_rect" : [ 645.0, 388.5, 69.0, 22.0 ], "style" : "", "text" : "unpack 0 0" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-62", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 360.0, 256.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-60", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 4, "outlettype" : [ "int", "", "", "int" ], "patching_rect" : [ 360.0, 225.0, 73.0, 22.0 ], "style" : "", "text" : "counter 23" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-57", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 360.0, 301.0, 83.0, 22.0 ], "style" : "", "text" : "getcolumn $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-36", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 465.0, 301.0, 37.0, 22.0 ], "style" : "", "text" : "clear" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-34", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 525.0, 300.0, 33.0 ], "style" : "", "text" : "Click on a light square to recall a preset. You can shift-click on a dark square to store a new preset." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-32", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 91.5, 435.0, 142.0, 20.0 ], "style" : "", "text" : "4-beat against 3-beat" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-31", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 143.5, 465.0, 90.0, 33.0 ], "style" : "", "text" : "Polyrhythm presets" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-29", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 44.25, 435.0, 32.5, 22.0 ], "style" : "", "text" : "2" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 44.25, 405.0, 32.5, 22.0 ], "style" : "", "text" : "1" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-26", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 91.5, 405.0, 142.0, 20.0 ], "style" : "", "text" : "3-beat against 2-beat" } } , { "box" : { "id" : "obj-24", "maxclass" : "preset", "numinlets" : 1, "numoutlets" : 4, "outlettype" : [ "preset", "int", "preset", "int" ], "patching_rect" : [ 30.0, 465.0, 100.0, 40.0 ], "preset_data" : [ { "number" : 1, "data" : [ 148, "obj-21", "matrixctrl", "list", 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 2, 0, 1, 2, 1, 0, 3, 0, 0, 3, 1, 1, 4, 0, 1, 4, 1, 0, 5, 0, 0, 5, 1, 0, 6, 0, 1, 6, 1, 1, 7, 0, 0, 7, 1, 0, 8, 0, 1, 8, 1, 0, 9, 0, 0, 9, 1, 1, 10, 0, 1, 10, 1, 0, 11, 0, 0, 11, 1, 0, 12, 0, 1, 12, 1, 1, 13, 0, 0, 13, 1, 0, 14, 0, 1, 14, 1, 0, 15, 0, 0, 15, 1, 1, 16, 0, 1, 16, 1, 0, 17, 0, 0, 17, 1, 0, 18, 0, 1, 18, 1, 1, 19, 0, 0, 19, 1, 0, 20, 0, 1, 20, 1, 0, 21, 0, 0, 21, 1, 1, 22, 0, 1, 22, 1, 0, 23, 0, 0, 23, 1, 0 ] } , { "number" : 2, "data" : [ 148, "obj-21", "matrixctrl", "list", 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 1, 0, 3, 0, 1, 3, 1, 0, 4, 0, 0, 4, 1, 1, 5, 0, 0, 5, 1, 0, 6, 0, 1, 6, 1, 0, 7, 0, 0, 7, 1, 0, 8, 0, 0, 8, 1, 1, 9, 0, 1, 9, 1, 0, 10, 0, 0, 10, 1, 0, 11, 0, 0, 11, 1, 0, 12, 0, 1, 12, 1, 1, 13, 0, 0, 13, 1, 0, 14, 0, 0, 14, 1, 0, 15, 0, 1, 15, 1, 0, 16, 0, 0, 16, 1, 1, 17, 0, 0, 17, 1, 0, 18, 0, 1, 18, 1, 0, 19, 0, 0, 19, 1, 0, 20, 0, 0, 20, 1, 1, 21, 0, 1, 21, 1, 0, 22, 0, 0, 22, 1, 0, 23, 0, 0, 23, 1, 0 ] } , { "number" : 3, "data" : [ 148, "obj-21", "matrixctrl", "list", 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 1, 0, 3, 0, 0, 3, 1, 0, 4, 0, 0, 4, 1, 0, 5, 0, 0, 5, 1, 0, 6, 0, 0, 6, 1, 0, 7, 0, 0, 7, 1, 0, 8, 0, 0, 8, 1, 0, 9, 0, 0, 9, 1, 0, 10, 0, 0, 10, 1, 0, 11, 0, 0, 11, 1, 0, 12, 0, 0, 12, 1, 0, 13, 0, 0, 13, 1, 0, 14, 0, 0, 14, 1, 0, 15, 0, 0, 15, 1, 0, 16, 0, 0, 16, 1, 0, 17, 0, 0, 17, 1, 0, 18, 0, 0, 18, 1, 0, 19, 0, 0, 19, 1, 0, 20, 0, 0, 20, 1, 0, 21, 0, 0, 21, 1, 0, 22, 0, 0, 22, 1, 0, 23, 0, 0, 23, 1, 0, 5, "obj-62", "number", "int", 3, 5, "obj-79", "toggle", "int", 0 ] } , { "number" : 4, "data" : [ 148, "obj-21", "matrixctrl", "list", 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 1, 0, 3, 0, 0, 3, 1, 0, 4, 0, 0, 4, 1, 0, 5, 0, 0, 5, 1, 0, 6, 0, 0, 6, 1, 0, 7, 0, 0, 7, 1, 0, 8, 0, 0, 8, 1, 0, 9, 0, 0, 9, 1, 0, 10, 0, 0, 10, 1, 0, 11, 0, 0, 11, 1, 0, 12, 0, 0, 12, 1, 0, 13, 0, 0, 13, 1, 0, 14, 0, 0, 14, 1, 0, 15, 0, 0, 15, 1, 0, 16, 0, 0, 16, 1, 0, 17, 0, 0, 17, 1, 0, 18, 0, 0, 18, 1, 0, 19, 0, 0, 19, 1, 0, 20, 0, 0, 20, 1, 0, 21, 0, 0, 21, 1, 0, 22, 0, 0, 22, 1, 0, 23, 0, 0, 23, 1, 0, 5, "obj-62", "number", "int", 2, 5, "obj-79", "toggle", "int", 0 ] } ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-23", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 345.0, 301.0, 47.0 ], "style" : "", "text" : "This object is called preset. You can use it to store one or more sets of values for your patch, so they don't have to be recreated from scratch" } } , { "box" : { "columns" : 24, "id" : "obj-21", "maxclass" : "matrixctrl", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "list", "list" ], "parameter_enable" : 0, "patching_rect" : [ 360.0, 333.0, 345.0, 32.0 ], "rows" : 2, "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 219.0, 20.0 ], "style" : "", "text" : "Set to MIDI percussion channel (10)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-10", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "float", "float" ], "patching_rect" : [ 139.0, 165.0, 110.0, 22.0 ], "style" : "", "text" : "makenote 127 200" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 0, "patching_rect" : [ 139.0, 210.0, 67.0, 22.0 ], "style" : "", "text" : "noteout 10" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-8", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 139.0, 122.0, 91.0, 22.0 ], "style" : "", "text" : "receive midiout" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-6", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 122.0, 32.5, 22.0 ], "style" : "", "text" : "0" } } , { "box" : { "bubble" : 1, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-2", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 15.0, 315.0, 51.0 ], "style" : "", "text" : "Patch 7-021. Polyrhythms\nWilliam J Turkel\nhttp://williamjturkel.net/code/#programming" } } , { "box" : { "angle" : 0.0, "bgcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "border" : 1, "id" : "obj-3", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 75.0, 810.0, 495.0 ], "proportion" : 0.39, "rounded" : 20, "style" : "" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-9", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-10", 1 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-10", 0 ] } } , { "patchline" : { "destination" : [ "obj-65", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-21", 1 ] } } , { "patchline" : { "destination" : [ "obj-24", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 53.75, 423.0, 39.5, 423.0 ], "source" : [ "obj-28", 0 ] } } , { "patchline" : { "destination" : [ "obj-24", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 53.75, 454.0, 39.5, 454.0 ], "source" : [ "obj-29", 0 ] } } , { "patchline" : { "destination" : [ "obj-21", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-36", 0 ] } } , { "patchline" : { "destination" : [ "obj-21", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-57", 0 ] } } , { "patchline" : { "destination" : [ "obj-74", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-6", 0 ] } } , { "patchline" : { "destination" : [ "obj-62", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-60", 0 ] } } , { "patchline" : { "destination" : [ "obj-57", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-62", 0 ] } } , { "patchline" : { "destination" : [ "obj-75", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-65", 0 ] } } , { "patchline" : { "destination" : [ "obj-76", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-65", 1 ] } } , { "patchline" : { "destination" : [ "obj-66", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-72", 0 ] } } , { "patchline" : { "destination" : [ "obj-67", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-73", 0 ] } } , { "patchline" : { "destination" : [ "obj-72", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-75", 0 ] } } , { "patchline" : { "destination" : [ "obj-73", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-76", 0 ] } } , { "patchline" : { "destination" : [ "obj-80", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-79", 0 ] } } , { "patchline" : { "destination" : [ "obj-10", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 0 ] } } , { "patchline" : { "destination" : [ "obj-60", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-80", 0 ] } } ], "dependency_cache" : [ ], "embedsnapshot" : 0, "default_bgcolor" : [ 0.207843, 0.215686, 0.278431, 1.0 ], "color" : [ 0.901961, 0.901961, 0.901961, 1.0 ], "elementcolor" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "accentcolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "selectioncolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "textcolor" : [ 0.090196, 0.07451, 0.07451, 1.0 ], "textcolor_inverse" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "patchlinecolor" : [ 0.207843, 0.215686, 0.278431, 0.9 ], "bgfillcolor_type" : "gradient", "bgfillcolor_color1" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color2" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color" : [ 0.290196, 0.309804, 0.301961, 1.0 ], "bgfillcolor_angle" : 270.0, "bgfillcolor_proportion" : 0.39 } }