Stopping one number box from going below another

Feb 23, 2008 at 1:40pm

Stopping one number box from going below another

How do I stop the number box on the RHS going below the (value of the box on the LHS+1)?

max v2;
#N vpatcher 383 227 983 627;
#P button 137 149 52 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 137 122 111 9109513 if $i1 == $i2+1 then bang;
#P flonum 199 82 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 136 81 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P comment 200 34 187 9109513 How can I set this up so this number box never goes below (LHS number box value + 1)?;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 1 0 3 1;
#P pop;

Any methods I try, crash Max with scheduling errors! :(

Thanks,

Rhys

#36007
Feb 23, 2008 at 1:51pm

If I understand what you are trying to do… this is working.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 137 218 50 9109513 i;
#P newex 137 248 50 9109513 + 1;
#P number 26 51 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 235 51 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 235 80 34 9109513 t b i;
#P newex 168 167 101 9109513 if $i1 < = $i2 then bang;
#P fasten 3 0 0 0 31 105 173 105;
#P connect 3 0 5 1;
#P lcolor 7;
#P connect 1 0 0 0;
#P connect 0 0 5 0;
#P connect 1 1 0 1;
#P fasten 4 0 3 0 142 289 300 289 300 29 31 29;
#P connect 5 0 4 0;
#P connect 2 0 1 0;
#P window clipboard copycount 6;

#123327
Feb 23, 2008 at 2:04pm

Use the [min $1] message. Output of LHS box -> [+=1] -> [min $1] ->
RHS box.

On 23 Feb 2008, at 13:40, Rhys Perkins wrote:

>
> How do I stop the number box on the RHS going below the (value of
> the box on the LHS+1)?
>
> max v2;
> #N vpatcher 383 227 983 627;
> #P button 137 149 52 0;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 137 122 111 9109513 if $i1 == $i2+1 then bang;
> #P flonum 199 82 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 136 81 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 3;
> #P comment 200 34 187 9109513 How can I set this up so this number
> box never goes below (LHS number box value + 1)?;
> #P connect 2 0 3 0;
> #P connect 3 0 4 0;
> #P connect 1 0 3 1;
> #P pop;
>
> Any methods I try, crash Max with scheduling errors! :(
>
> Thanks,
>
> Rhys
>
>

#123328
Feb 23, 2008 at 2:22pm

Brilliant. Thanks very much.

I’m currently using Max in windows and don’t know what is the the equivalent to ctrl+alt clicking an object in the mac version. That would have been very helpful in this situation!

#123329
Feb 24, 2008 at 3:15am

The range bar will also keep the numbers in consecutive order. Barring that, having each number box give “min” and “max” commands to each other is very useful and I have utilized it countless times.

–CJ

#123330

You must be logged in to reply to this topic.