Forums > MaxMSP

Number splitting possible?

May 17, 2010 | 6:40 pm

If I have a number, say 91

Is it possible to split it, and have 9 out of one output, and then 1 out another?

Sorry if it’s stupidly easy, I can’t figure it out :(

Thanks.


May 17, 2010 | 6:45 pm

dividing and modulo:

– Pasted Max Patch, click to expand. –

May 17, 2010 | 7:42 pm

Or regexp:

– Pasted Max Patch, click to expand. –

May 17, 2010 | 8:17 pm

The regexp solution is considerably slower than the direct math solution, and it might be hard to nicely unpack into individual digits.

– Pasted Max Patch, click to expand. –

May 17, 2010 | 11:45 pm

ahh, it really is slower!


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