Skip to content

Instantly share code, notes, and snippets.

@drart
Created September 19, 2011 17:12
Show Gist options
  • Save drart/1226975 to your computer and use it in GitHub Desktop.
Save drart/1226975 to your computer and use it in GitHub Desktop.
A Max/MSP patch for mixing sine waves forever.
{
"patcher" : {
"fileversion" : 1,
"rect" : [ 249.0, 44.0, 955.0, 593.0 ],
"bglocked" : 0,
"defrect" : [ 249.0, 44.0, 955.0, 593.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" : "OFF BUTTON",
"fontname" : "Arial",
"patching_rect" : [ 513.0, 105.0, 150.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-51",
"fontsize" : 12.0,
"numoutlets" : 0
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "0 20000",
"fontname" : "Arial",
"patching_rect" : [ 457.0, 101.0, 54.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-49",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "slider",
"patching_rect" : [ 249.0, 22.0, 390.0, 38.0 ],
"numinlets" : 1,
"id" : "obj-48",
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "$1 1000",
"fontname" : "Arial",
"patching_rect" : [ 655.0, 319.0, 54.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-42",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"patching_rect" : [ 646.0, 381.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-43",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "line 0.",
"fontname" : "Arial",
"patching_rect" : [ 648.0, 346.0, 46.0, 20.0 ],
"numinlets" : 3,
"id" : "obj-44",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "", "" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "random 100",
"fontname" : "Arial",
"patching_rect" : [ 647.0, 236.0, 75.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-45",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "$1 1000",
"fontname" : "Arial",
"patching_rect" : [ 557.0, 313.0, 54.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-38",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"patching_rect" : [ 548.0, 375.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-39",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "line 0.",
"fontname" : "Arial",
"patching_rect" : [ 550.0, 340.0, 46.0, 20.0 ],
"numinlets" : 3,
"id" : "obj-40",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "", "" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "random 100",
"fontname" : "Arial",
"patching_rect" : [ 549.0, 230.0, 75.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-41",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "$1 1000",
"fontname" : "Arial",
"patching_rect" : [ 459.0, 307.0, 54.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-34",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"patching_rect" : [ 451.0, 356.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-35",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "line 0.",
"fontname" : "Arial",
"patching_rect" : [ 452.0, 334.0, 46.0, 20.0 ],
"numinlets" : 3,
"id" : "obj-36",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "", "" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "random 100",
"fontname" : "Arial",
"patching_rect" : [ 451.0, 224.0, 75.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-37",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "$1 1000",
"fontname" : "Arial",
"patching_rect" : [ 361.0, 301.0, 54.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-30",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"patching_rect" : [ 352.0, 363.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-31",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "line 0.",
"fontname" : "Arial",
"patching_rect" : [ 354.0, 328.0, 46.0, 20.0 ],
"numinlets" : 3,
"id" : "obj-32",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "", "" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "random 100",
"fontname" : "Arial",
"patching_rect" : [ 353.0, 218.0, 75.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-33",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "$1 1000",
"fontname" : "Arial",
"patching_rect" : [ 263.0, 295.0, 54.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-26",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"patching_rect" : [ 254.0, 357.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-27",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "line 0.",
"fontname" : "Arial",
"patching_rect" : [ 256.0, 322.0, 46.0, 20.0 ],
"numinlets" : 3,
"id" : "obj-28",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "", "" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "random 100",
"fontname" : "Arial",
"patching_rect" : [ 255.0, 212.0, 75.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-29",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "toggle",
"patching_rect" : [ 150.0, 107.0, 20.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-25",
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "$1 1000",
"fontname" : "Arial",
"patching_rect" : [ 156.0, 289.0, 54.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-24",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ]
}
}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"patching_rect" : [ 156.0, 351.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-23",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "line 0.",
"fontname" : "Arial",
"patching_rect" : [ 158.0, 316.0, 46.0, 20.0 ],
"numinlets" : 3,
"id" : "obj-19",
"fontsize" : 12.0,
"numoutlets" : 2,
"outlettype" : [ "", "" ]
}
}
, {
"box" : {
"maxclass" : "button",
"patching_rect" : [ 108.0, 198.0, 20.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-17",
"numoutlets" : 1,
"outlettype" : [ "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "random 100",
"fontname" : "Arial",
"patching_rect" : [ 157.0, 206.0, 75.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-16",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "metro 1000",
"fontname" : "Arial",
"patching_rect" : [ 151.0, 135.0, 71.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-15",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "bang" ]
}
}
, {
"box" : {
"maxclass" : "gain~",
"patching_rect" : [ 625.0, 417.0, 20.0, 140.0 ],
"numinlets" : 2,
"id" : "obj-13",
"numoutlets" : 2,
"outlettype" : [ "signal", "int" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "cycle~ 44",
"fontname" : "Arial",
"patching_rect" : [ 625.0, 385.0, 62.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-14",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}
}
, {
"box" : {
"maxclass" : "gain~",
"patching_rect" : [ 532.0, 418.0, 20.0, 140.0 ],
"numinlets" : 2,
"id" : "obj-11",
"numoutlets" : 2,
"outlettype" : [ "signal", "int" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "cycle~ 410",
"fontname" : "Arial",
"patching_rect" : [ 532.0, 386.0, 68.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-12",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}
}
, {
"box" : {
"maxclass" : "gain~",
"patching_rect" : [ 439.0, 419.0, 20.0, 140.0 ],
"numinlets" : 2,
"id" : "obj-9",
"numoutlets" : 2,
"outlettype" : [ "signal", "int" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "cycle~ 420",
"fontname" : "Arial",
"patching_rect" : [ 439.0, 387.0, 68.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-10",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}
}
, {
"box" : {
"maxclass" : "gain~",
"patching_rect" : [ 347.0, 428.0, 20.0, 140.0 ],
"numinlets" : 2,
"id" : "obj-7",
"numoutlets" : 2,
"outlettype" : [ "signal", "int" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "cycle~ 430",
"fontname" : "Arial",
"patching_rect" : [ 346.0, 388.0, 68.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-8",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}
}
, {
"box" : {
"maxclass" : "gain~",
"patching_rect" : [ 253.0, 421.0, 20.0, 140.0 ],
"numinlets" : 2,
"id" : "obj-5",
"numoutlets" : 2,
"outlettype" : [ "signal", "int" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "cycle~ 442",
"fontname" : "Arial",
"patching_rect" : [ 253.0, 389.0, 68.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-6",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}
}
, {
"box" : {
"maxclass" : "gain~",
"patching_rect" : [ 160.0, 422.0, 20.0, 140.0 ],
"numinlets" : 2,
"id" : "obj-4",
"numoutlets" : 2,
"outlettype" : [ "signal", "int" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "cycle~ 440",
"fontname" : "Arial",
"patching_rect" : [ 160.0, 390.0, 68.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-2",
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "dac~ 1 2 3 4 5 6",
"fontname" : "Arial",
"patching_rect" : [ 160.0, 591.0, 478.0, 20.0 ],
"numinlets" : 6,
"id" : "obj-1",
"fontsize" : 12.0,
"numoutlets" : 0
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-49", 0 ],
"destination" : [ "obj-44", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-49", 0 ],
"destination" : [ "obj-40", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-49", 0 ],
"destination" : [ "obj-28", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-49", 0 ],
"destination" : [ "obj-32", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-49", 0 ],
"destination" : [ "obj-36", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-49", 0 ],
"destination" : [ "obj-23", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-15", 0 ],
"destination" : [ "obj-45", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-15", 0 ],
"destination" : [ "obj-41", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-15", 0 ],
"destination" : [ "obj-37", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-15", 0 ],
"destination" : [ "obj-33", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-15", 0 ],
"destination" : [ "obj-29", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-27", 0 ],
"destination" : [ "obj-5", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-31", 0 ],
"destination" : [ "obj-7", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-35", 0 ],
"destination" : [ "obj-9", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-39", 0 ],
"destination" : [ "obj-11", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-43", 0 ],
"destination" : [ "obj-13", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-44", 0 ],
"destination" : [ "obj-43", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-45", 0 ],
"destination" : [ "obj-42", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-42", 0 ],
"destination" : [ "obj-44", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-38", 0 ],
"destination" : [ "obj-40", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-41", 0 ],
"destination" : [ "obj-38", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-40", 0 ],
"destination" : [ "obj-39", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-36", 0 ],
"destination" : [ "obj-35", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-37", 0 ],
"destination" : [ "obj-34", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-34", 0 ],
"destination" : [ "obj-36", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-30", 0 ],
"destination" : [ "obj-32", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-33", 0 ],
"destination" : [ "obj-30", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-32", 0 ],
"destination" : [ "obj-31", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-28", 0 ],
"destination" : [ "obj-27", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-29", 0 ],
"destination" : [ "obj-26", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-26", 0 ],
"destination" : [ "obj-28", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-25", 0 ],
"destination" : [ "obj-15", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-15", 0 ],
"destination" : [ "obj-16", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-23", 0 ],
"destination" : [ "obj-4", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-24", 0 ],
"destination" : [ "obj-19", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-16", 0 ],
"destination" : [ "obj-24", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-19", 0 ],
"destination" : [ "obj-23", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-17", 0 ],
"destination" : [ "obj-16", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-5", 0 ],
"destination" : [ "obj-1", 1 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-7", 0 ],
"destination" : [ "obj-1", 2 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-9", 0 ],
"destination" : [ "obj-1", 3 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-11", 0 ],
"destination" : [ "obj-1", 4 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-13", 0 ],
"destination" : [ "obj-1", 5 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-14", 0 ],
"destination" : [ "obj-13", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-12", 0 ],
"destination" : [ "obj-11", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-10", 0 ],
"destination" : [ "obj-9", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-8", 0 ],
"destination" : [ "obj-7", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-6", 0 ],
"destination" : [ "obj-5", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-4", 0 ],
"destination" : [ "obj-1", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-4", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment