[maxmsp] Output of an if statement
amietbeach
amietbeach at gmail.com
Mon Jul 2 07:23:51 MDT 2007
- Previous message: [maxmsp] Goldsmiths summer school: introduction to coding externals
- Next message: [maxmsp] Re: Output of an if statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, This is probably a very stupid question but I'm stuck. I've got an if statement and I'm trying to output a float. This is what it would look like in C: If $i1 < 44 Then output $i1/44 (float) else output 1. This is the patch I have so far... #P window setfont "Sans Serif" 9.; #P flonum 314 322 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P window linecount 1; #P newex 236 306 27 9109513 / 1.; #P flonum 271 283 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 234 233 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 206 374 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P message 278 259 21 9109513 44.; #P newex 206 345 119 9109513 if $i1 < $i2 then $i3 else 1.; #P user hslider 340 165 18 128 128 1 0 0; #P connect 5 0 6 1; #P connect 5 0 1 1; #P connect 4 0 1 0; #P connect 4 0 6 0; #P connect 4 0 2 0; #P connect 7 0 1 2; #P connect 1 0 3 0; #P connect 0 0 4 0; #P connect 2 0 5 0; #P connect 6 0 7 0; #P window clipboard copycount 8; As you can see, I can only get an int at the output (1 or 0). Is there something to specify somewhere for me to get a float? Thanks for your help. JC
- Previous message: [maxmsp] Goldsmiths summer school: introduction to coding externals
- Next message: [maxmsp] Re: Output of an if statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
