Forums > MaxMSP

Changing values in a message box

September 29, 2011 | 12:22 am

im looking to change the individual values in a message box via number boxes and i wish for the output to be in the following format… (text below). i want to be able to change the values for the second and third integers via number boxes.

$1, 80 6000

assistance please?


September 29, 2011 | 2:01 am

Is this going to be sent to a line object? I had trouble building a message with a comma in it. I did this instead:

– Pasted Max Patch, click to expand. –

September 29, 2011 | 2:27 am

There are many earlier posts on this type of question, check out: message using $1 $2 $3 etc. from earlier today. Luke posted a solution that would solve your type of issue here. When using ‘pak’ a 0 or a 0. allows you to specify whether the values are going to be float point or integer.

Luke’s patch he submitted solves your problem I think.

Good luck.


September 29, 2011 | 2:31 am

check out Luke’s solution…

– Pasted Max Patch, click to expand. –

September 29, 2011 | 11:42 am

perfect. thats great.
it helped me to the result i was looking for. much appreciated.
if anyone is interested… see below for the result i was looking for.

ben

{
"boxes" : [ {
"box" : {
"maxclass" : "number",
"id" : "obj-32",
"numinlets" : 1,
"fontsize" : 12.0,
"numoutlets" : 2,
"triangle" : 0,
"outlettype" : [ "int", "bang" ],
"minimum" : 0,
"fontname" : "Arial",
"maximum" : 100,
"patching_rect" : [ 296.0, 136.0, 41.0, 20.0 ]
}

}
, {
"box" : {
"maxclass" : "number",
"id" : "obj-27",
"numinlets" : 1,
"fontsize" : 12.0,
"numoutlets" : 2,
"triangle" : 0,
"outlettype" : [ "int", "bang" ],
"minimum" : 0,
"fontname" : "Arial",
"maximum" : 100,
"patching_rect" : [ 250.0, 136.0, 41.0, 20.0 ]
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "pak 0 0 0",
"id" : "obj-11",
"numinlets" : 3,
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial",
"patching_rect" : [ 267.0, 166.0, 60.0, 20.0 ]
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "71, 0 6000",
"id" : "obj-4",
"numinlets" : 2,
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial",
"patching_rect" : [ 267.0, 213.0, 123.0, 18.0 ]
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "$1 \, $2 $3",
"id" : "obj-22",
"numinlets" : 2,
"fontsize" : 12.0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial",
"patching_rect" : [ 267.0, 191.0, 67.0, 18.0 ]
}

}
, {
"box" : {
"maxclass" : "number",
"id" : "obj-542",
"numinlets" : 1,
"fontsize" : 12.0,
"numoutlets" : 2,
"triangle" : 0,
"outlettype" : [ "int", "bang" ],
"minimum" : 0,
"fontname" : "Arial",
"patching_rect" : [ 367.0, 136.0, 41.0, 20.0 ]
}

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

}
, {
"patchline" : {
"source" : [ "obj-22", 0 ],
"destination" : [ "obj-4", 1 ],
"hidden" : 0,
"midpoints" : [ 276.5, 210.0, 380.5, 210.0 ]
}

}
, {
"patchline" : {
"source" : [ "obj-27", 0 ],
"destination" : [ "obj-11", 0 ],
"hidden" : 0,
"midpoints" : [ 259.5, 160.5, 276.5, 160.5 ]
}

}
, {
"patchline" : {
"source" : [ "obj-542", 0 ],
"destination" : [ "obj-11", 2 ],
"hidden" : 0,
"midpoints" : [ 376.5, 160.5, 317.5, 160.5 ]
}

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

}
]
}


September 29, 2011 | 11:44 am

on another note. can someone please let me know how to post encapsulated max patches on this forum? as seen above, i am only aware of the "copy out of Max, paste into forum post window" method.

thanks.

ben


September 29, 2011 | 12:45 pm

Copy Compressed


September 29, 2011 | 1:44 pm

thanks.
my future post responders also thank you…


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