{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 273.0, 237.0, 838.0, 583.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 0, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 0, "statusbarvisible" : 2, "toolbarvisible" : 1, "boxanimatetime" : 200, "imprint" : 0, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-93", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 360.0, 385.0, 210.0, 47.0 ], "text" : "The matrixctrl gives us a form of notation similar to the Time Unit Box System (TUBS)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-91", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 256.0, 219.0, 47.0 ], "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, "frgb" : 0.0, "id" : "obj-89", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 695.0, 538.0, 75.0, 20.0 ], "presentation_rect" : [ 659.0, 471.5, 0.0, 0.0 ], "text" : "Low Bongo" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-88", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 595.0, 538.0, 68.0, 20.0 ], "text" : "Hi Bongo" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-86", "linecount" : 6, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 450.0, 192.0, 285.0, 87.0 ], "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, "frgb" : 0.0, "id" : "obj-84", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 122.0, 375.0, 47.0 ], "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, "frgb" : 0.0, "id" : "obj-82", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 360.0, 90.0, 420.0, 20.0 ], "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, 20.0 ], "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 ] } } , { "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, 20.0 ], "presentation_rect" : [ 637.0, 404.0, 0.0, 0.0 ], "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, 20.0 ], "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, 20.0 ], "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, 18.0 ], "presentation_rect" : [ 622.0, 420.0, 0.0, 0.0 ], "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, 18.0 ], "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, 20.0 ], "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, 20.0 ], "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, 20.0 ], "text" : "unpack 0 0" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-62", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 360.0, 256.0, 50.0, 20.0 ] } } , { "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, 20.0 ], "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, 18.0 ], "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, 18.0 ], "text" : "clear" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-34", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 525.0, 300.0, 33.0 ], "text" : "Click on a dark grey circle to recall a preset. You can shift-click on a light grey circle to store a new preset." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-32", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 91.5, 435.0, 142.0, 20.0 ], "presentation_rect" : [ 250.5, 385.0, 0.0, 0.0 ], "text" : "4-beat against 3-beat" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-31", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 143.5, 465.0, 90.0, 33.0 ], "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, 18.0 ], "presentation_rect" : [ 47.0, 411.0, 0.0, 0.0 ], "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, 18.0 ], "text" : "1" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-26", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 91.5, 405.0, 142.0, 20.0 ], "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 ] } ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-23", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 345.0, 300.0, 47.0 ], "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 } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-15", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 219.0, 20.0 ], "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, 20.0 ], "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, 20.0 ], "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, 20.0 ], "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, 18.0 ], "text" : "0" } } , { "box" : { "bubble" : 1, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-2", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 15.0, 315.0, 51.0 ], "text" : "Patch 038. Polyrhythms\nWilliam J Turkel\nhttp://williamjturkel.net/code/#programming" } } , { "box" : { "bgcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "border" : 1, "id" : "obj-3", "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 75.0, 810.0, 495.0 ], "rounded" : 20 } } ], "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" : [ ] } }