Forums > MaxMSP

Simplification


Mar 20 2011 | 5:44 pm

Just a small one:

can any one think of a simpler way to make this?

its just to make 2 variables in to one for the x input of a x y pad.

{
"boxes" : [ {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"patching_rect" : [ 174.0, 201.0, 50.0, 20.0 ],
"id" : "obj-36",
"fontsize" : 12.0,
"numinlets" : 1
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "scale -0.7 0 -508. 0",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 175.0, 173.0, 113.0, 20.0 ],
"id" : "obj-37",
"fontsize" : 12.0,
"numinlets" : 6
}

}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"patching_rect" : [ 176.0, 150.0, 50.0, 20.0 ],
"id" : "obj-38",
"fontsize" : 12.0,
"numinlets" : 1
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "scale 0. 0.7 0 -0.7",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 176.0, 128.0, 106.0, 20.0 ],
"id" : "obj-39",
"fontsize" : 12.0,
"numinlets" : 6
}

}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"patching_rect" : [ 176.0, 100.0, 50.0, 20.0 ],
"id" : "obj-40",
"fontsize" : 12.0,
"numinlets" : 1
}

}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"patching_rect" : [ 111.0, 310.0, 113.0, 20.0 ],
"id" : "obj-47",
"fontsize" : 12.0,
"numinlets" : 1
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "/ 2.",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "float" ],
"patching_rect" : [ 109.0, 284.0, 32.5, 20.0 ],
"id" : "obj-48",
"fontsize" : 12.0,
"numinlets" : 2
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "+ 0.",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "float" ],
"patching_rect" : [ 108.0, 236.0, 32.5, 20.0 ],
"id" : "obj-49",
"fontsize" : 11.595187,
"numinlets" : 2
}

}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"patching_rect" : [ 110.0, 262.0, 113.0, 20.0 ],
"id" : "obj-53",
"fontsize" : 12.0,
"numinlets" : 1
}

}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"patching_rect" : [ 50.0, 168.0, 50.0, 20.0 ],
"id" : "obj-54",
"fontsize" : 12.0,
"numinlets" : 1
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "scale 0. 0.7 0 508.",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 51.0, 145.0, 109.0, 20.0 ],
"id" : "obj-62",
"fontsize" : 12.0,
"numinlets" : 6
}

}
, {
"box" : {
"maxclass" : "flonum",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"patching_rect" : [ 52.0, 118.0, 50.0, 20.0 ],
"id" : "obj-71",
"fontsize" : 12.0,
"numinlets" : 1
}

}
, {
"box" : {
"maxclass" : "inlet",
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 52.0, 40.0, 25.0, 25.0 ],
"id" : "obj-27",
"numinlets" : 0,
"comment" : ""
}

}
, {
"box" : {
"maxclass" : "inlet",
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 176.0, 40.0, 25.0, 25.0 ],
"id" : "obj-30",
"numinlets" : 0,
"comment" : ""
}

}
, {
"box" : {
"maxclass" : "outlet",
"numoutlets" : 0,
"patching_rect" : [ 111.0, 390.0, 25.0, 25.0 ],
"id" : "obj-31",
"numinlets" : 1,
"comment" : ""
}

}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-47", 0 ],
"destination" : [ "obj-31", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-30", 0 ],
"destination" : [ "obj-40", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-27", 0 ],
"destination" : [ "obj-71", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-71", 0 ],
"destination" : [ "obj-62", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-62", 0 ],
"destination" : [ "obj-54", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-53", 0 ],
"destination" : [ "obj-48", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-48", 0 ],
"destination" : [ "obj-47", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-38", 0 ],
"destination" : [ "obj-37", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-37", 0 ],
"destination" : [ "obj-36", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-49", 0 ],
"destination" : [ "obj-53", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-54", 0 ],
"destination" : [ "obj-49", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-36", 0 ],
"destination" : [ "obj-49", 1 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-40", 0 ],
"destination" : [ "obj-39", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-39", 0 ],
"destination" : [ "obj-38", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
]
}

thanks

Mar 20 2011 | 6:03 pm

short answer: no.

+ then /2; the [expr] object will also do this of course

Mar 20 2011 | 6:19 pm

I hope you’ll be getting rid of all those number boxes once you’re sure the patch does what you want, number boxes are good for debugging during development but once everything is working ok get rid of any number boxes that aren’t part of the interface (not needed in presentation mode) as they just add more useless computation (as well as taking up space, which can be an issue when you have lots of stuff going on).

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > MaxMSP