routing numbers

May 30, 2006 at 11:27pm

routing numbers

how do i route/select/split odd from even numbers,
and how do i route/select/split floats from ints
in a most effective and simple way?

- [select 110 110.]

#26222
May 30, 2006 at 11:57pm

JS can do it. I’m a crap at JS so I can’t give you the code here, but
if I remember well, there’s an object for that in Emmanuel’s Ejies.

hth,

Julien.

#77994
May 31, 2006 at 12:05am

modulus “%” is a general solution component for both of these problems.

#77995
May 31, 2006 at 12:11am

#77996
May 31, 2006 at 6:33am

route int float

#77997
May 31, 2006 at 12:46pm

On 31 mai 06, at 08:33, /*j wrote:

> route int float

Yan is right, it’s a lot more efficient than my ej.route…

ej

#77998
May 31, 2006 at 6:35pm

oh okay, i did not know about [route float], i only
knew about [route symbol] until now.:)

odd/even obvouly needs a gate but for now i can live
with that solution:

[110.eeo] (even or odd)

max v2;
#N vpatcher 337 957 538 1152;
#N comlet input if even;
#P outlet 69 152 15 0;
#N comlet input if odd;
#P outlet 99 152 15 0;
#P inlet 99 28 15 0;
#P newex 10 101 40 196617 + 1;
#P newex 99 61 40 196617 t i i;
#P newex 69 119 40 196617 gate 2;
#P newex 10 79 40 196617 % 2;
#P comment 28 29 54 196617 110.eoo;
#P connect 3 1 1 0;
#P connect 1 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 7 0;
#P connect 5 0 3 0;
#P connect 3 0 2 1;
#P connect 2 1 6 0;
#P pop;

it is always those simple things which are difficult.

-110

#77999

You must be logged in to reply to this topic.