making 2 expressions in to 1?

May 11, 2011 at 6:18pm

making 2 expressions in to 1?

is their a way of putting the following in to 1 expression

“if $i1 > 270 < 285 then $i1" ??

alternatively is their a way to declare ranges i.e. 11 – 30, 31- 55, 56-80… and get an output of a specific number or letter. i.e A if the input was 30, B if the input was 31 – 55, C if the input was 56 – 80 ??

May 11, 2011 at 7:24pm

the correct syntax would be if(($i1>270)&&($i1<285)) then $i1. I don't like using [if] though. Ordinarily I'd write a look-up table in a text file and use [coll] instead

May 11, 2011 at 8:14pm

Few things for you, regarding the <> I typically do the first part of the operation then the second part, passing the variable through the first stage then the second.

– Pasted Max Patch, click to expand. –

But it you want to output a different value than you input, check out the object zmap It should do the job for ya.

May 11, 2011 at 8:38pm

Hi LMomrelle,
you could use the [split] !!
for example [split 100 200] outputs numbers 100-200 from the left outlet and oll the other from the right!
Hope it helps!

May 12, 2011 at 12:16am

here’s an example using split

– Pasted Max Patch, click to expand. –

You must be logged in to reply to this topic.