Add more numbers

Mar 29, 2009 at 9:17pm

Add more numbers

Hello,
could not find help on the forum (prev messages), though it might be too easy:

Is there a smarted way of doing this?
Thank you!
Krisztian

{
“boxes” : [ {
"box" : {
"maxclass" : "number",
"fontname" : "Arial",
"outlettype" : [ "int", "bang" ],
“patching_rect” : [ 20.0, 239.0, 50.0, 20.0 ],
“id” : “obj-10″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 149.0, 477.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “+”,
“fontname” : “Arial”,
“outlettype” : [ "int" ],
“patching_rect” : [ 20.0, 212.0, 290.5, 20.0 ],
“id” : “obj-8″,
“fontsize” : 11.595187,
“numinlets” : 2,
“presentation_rect” : [ 146.0, 449.0, 0.0, 0.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “+”,
“fontname” : “Arial”,
“outlettype” : [ "int" ],
“patching_rect” : [ 20.0, 177.0, 235.5, 20.0 ],
“id” : “obj-9″,
“fontsize” : 11.595187,
“numinlets” : 2,
“presentation_rect” : [ 146.0, 414.0, 0.0, 0.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “+”,
“fontname” : “Arial”,
“outlettype” : [ "int" ],
“patching_rect” : [ 20.0, 148.0, 180.5, 20.0 ],
“id” : “obj-7″,
“fontsize” : 11.595187,
“numinlets” : 2,
“presentation_rect” : [ 147.0, 386.0, 0.0, 0.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “number”,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“patching_rect” : [ 291.0, 18.0, 50.0, 20.0 ],
“id” : “obj-3″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 418.0, 256.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “number”,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“patching_rect” : [ 237.0, 18.0, 50.0, 20.0 ],
“id” : “obj-4″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 364.0, 256.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “number”,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“patching_rect” : [ 182.0, 18.0, 50.0, 20.0 ],
“id” : “obj-5″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 309.0, 256.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “number”,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“patching_rect” : [ 129.0, 17.0, 50.0, 20.0 ],
“id” : “obj-2″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 202.0, 334.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “+”,
“fontname” : “Arial”,
“outlettype” : [ "int" ],
“patching_rect” : [ 20.0, 113.0, 127.5, 20.0 ],
“id” : “obj-1″,
“fontsize” : 11.595187,
“numinlets” : 2,
“presentation_rect” : [ 137.0, 367.0, 0.0, 0.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “number”,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“patching_rect” : [ 75.0, 17.0, 50.0, 20.0 ],
“id” : “obj-16″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 15.0, 15.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “number”,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“patching_rect” : [ 20.0, 17.0, 50.0, 20.0 ],
“id” : “obj-17″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 15.0, 15.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “number”,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“patching_rect” : [ 20.0, 84.0, 50.0, 20.0 ],
“id” : “obj-25″,
“fontsize” : 11.595187,
“numinlets” : 1,
“triscale” : 0.9,
“presentation_rect” : [ 15.0, 15.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “+”,
“fontname” : “Arial”,
“outlettype” : [ "int" ],
“patching_rect” : [ 20.0, 53.0, 73.5, 20.0 ],
“id” : “obj-26″,
“fontsize” : 11.595187,
“numinlets” : 2,
“numoutlets” : 1
}

}
],
“lines” : [ {
"patchline" : {
"source" : [ "obj-8", 0 ],
“destination” : [ "obj-10", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-3", 0 ],
“destination” : [ "obj-8", 1 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-4", 0 ],
“destination” : [ "obj-9", 1 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-7", 0 ],
“destination” : [ "obj-9", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-9", 0 ],
“destination” : [ "obj-8", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-5", 0 ],
“destination” : [ "obj-7", 1 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-1", 0 ],
“destination” : [ "obj-7", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-2", 0 ],
“destination” : [ "obj-1", 1 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-25", 0 ],
“destination” : [ "obj-1", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-16", 0 ],
“destination” : [ "obj-26", 1 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-26", 0 ],
“destination” : [ "obj-25", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-17", 0 ],
“destination” : [ "obj-26", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
]
}

#43095
Mar 29, 2009 at 9:33pm

Below is one approach. Also read the sticky notes on posting examples. Copy compressed is the way to go.

_
johan

– Pasted Max Patch, click to expand. –
#154432
Mar 29, 2009 at 9:55pm

Copy compressed! got it now and also thank you for the example!
best
Krisztian

#154433
Mar 29, 2009 at 10:01pm

…huhh the maximum it can take is 9 variables!…

I would like to use it with 16 inlets, thank you.
K

#154434
Mar 29, 2009 at 10:38pm

Have a look at accum.

_
johan

#154435
Mar 30, 2009 at 1:02am

or zl sum

#154436
Mar 30, 2009 at 10:15am

hello Emmanuel and jvkr
thank you!
K

#154437
Mar 30, 2009 at 5:04pm

You might also want to look at lp.sigma & Co. for multi-value addition, multiplication, subtraction and division.

In addition to everything else, all inlets in lp.sigma and friends are hot, so you don’t have to [t b i] for updates when the 2nd, 3rd, etc inlet changes.

Sigma is in the Starter Pack (free, but happier with Max 4.x). The friends (delta, pi, and logos for subtraction, multiplication, and division respectively) are in the Max-5 savvy Litter Pro.

Best,
Peter

#154438
Mar 31, 2009 at 8:55am

Peter

yes, sigma does the job, and the others look good as well. Will have to try them…

thank you.
K

#154439
Apr 1, 2009 at 12:43pm

I previously overlooked the requirement of >9 inlets. In that case you’ll love lp.sigma. On Max 5 I’ve instantiated over 960 inlets (at which point I started to lose count). This is a little insane for patching, but someone will want to do it.

Max 4 limits argument lists to 255 items, but that’s Max 4′s limitation.

#154440
Apr 1, 2009 at 1:46pm

Or the jitter way, to add even more values.
Jean-François.

– Pasted Max Patch, click to expand. –
#154441
Apr 2, 2009 at 10:24am

The Jitter patch is cute, but only works for positive sums (otherwise the rounding is wrong) and requires a lot more objects and patch cords than this:

– Pasted Max Patch, click to expand. –
#154442

You must be logged in to reply to this topic.