Forums > MaxMSP

change with range

March 12, 2008 | 9:42 pm

Is there any sort of 3rd party object that functions like a change object, except it allows you to specify a range above and below the original input?

Something like [change +-5.], where as long as the incoming value (in this case, a float) was within 5, it wouldn’t output the value. I have a really kludgy [if] object that sort of does what I want, but I’m hoping there might be an elegant solution already out there. Thanks.


March 13, 2008 | 2:27 am

Hi. I don’t know if this any help to you but this is the best solution I could think of with out using any third party objects.

#P window setfont "Sans Serif" 9.;
#P flonum 194 187 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 141 161 63 196617 split 0. 0.;
#P newex 167 140 25 196617 – 5.;
#P newex 193 140 25 196617 + 5.;
#P newex 141 110 48 196617 bucket 2;
#P newex 141 87 29 196617 t b f;
#P flonum 141 63 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 141 187 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P comment 229 187 100 196617 output if outside of range;
#P fasten 4 1 6 0 184 133 172 133;
#P fasten 4 1 5 0 184 133 198 133;
#P connect 4 0 7 0;
#P connect 6 0 7 1;
#P connect 5 0 7 2;
#P connect 7 1 8 0;
#P connect 7 0 1 0;
#P connect 3 0 4 0;
#P connect 3 1 4 0;
#P connect 2 0 3 0;
#P window clipboard copycount 9;


March 13, 2008 | 7:02 am

Hey vze1mk7d,

That’s pretty slick. I’d forgotten about bucket. Thanks!


March 17, 2008 | 6:16 am

Brian Shepard schrieb:
> Something like [change +-5.], where as long as the incoming value (in
> this case, a float) was within 5, it wouldn’t output the value. I
> have a really kludgy [if] object that sort of does what I want, but
> I’m hoping there might be an elegant solution already out there.

Your description sounds like a single split object would do it, but
maybe you mean, that the object should only output if there is a change
in the integer part of your float?…
(If you would have sent your kludgy [if] it would have been more clear)

#P window setfont "Sans Serif" 9.;
#P flonum 106 206 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 106 182 50 196617 f;
#P newex 106 160 24 196617 b;
#P newex 106 137 40 196617 change;
#P flonum 106 90 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 106 112 50 196617 t i f;
#P connect 1 0 0 0;
#P connect 4 0 5 0;
#P connect 0 1 4 1;
#P connect 3 0 4 0;
#P connect 2 0 3 0;
#P connect 0 0 2 0;
#P window clipboard copycount 6;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


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