Forums > MaxMSP

comma string from osc


efe
October 31, 2010 | 2:40 pm

hello!
We are currently working on a project where we need to pass text over the net and then print it on the screen. So far everything is working fine EXCEPT one small detail: every time we try to get a comma on the system it is always taken as a comma message to the max objects. As a consequence when the value arrives there is no print of it.
Herewith the three different approaches we are currently trying:
fromsymbol, tosymbol and itoa,
No success so far. Herewith a patch of the procedure we are using. From the text editor in max it goes into a matrix and then printed on the window.
Another important information: the characters are coming from supercollider where the method .asString sends it over the net as an osc message.

– Pasted Max Patch, click to expand. –

Any pointer would be…lovely!!

thanks

-emmanuel


October 31, 2010 | 6:20 pm

Have you tried adding in the escaping slash to the original string? Something like [regexp , @substitute \,] should work (notice the extra-extra slashes to escape everything).

lh



efe
October 31, 2010 | 6:48 pm

Hey Luke:
thanks for the answer, you mean something like this?

– Pasted Max Patch, click to expand. –

is that the correct way?, any optimization suggested?

I will test tomorrow with the osc messages coming from sc(we have a network) and see if it works properly with our set.

I will post the results

-emmanuel


October 31, 2010 | 7:35 pm

Something like that should work, give it a try and let me know how you get on. You probably want to hook the fourth outlet of [regexp] to the same places as the first. This way the string will get sent through even if it doesn’t contain any commas.

lh



efe
November 1, 2010 | 6:00 pm

Hey Luke, the patch works perfectly!
thanks again

-emmanuel


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