comma string from osc

efe's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

Any pointer would be…lovely!!

thanks

-emmanuel

Luke Hall's icon

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's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

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

Luke Hall's icon

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's icon

Hey Luke, the patch works perfectly!
thanks again

-emmanuel

Gwen Taualai's icon

Hi there,

Sorry to re-awaken this thread, but I'm having the same problem with removing commas from OSC strings.

In the sample provided by Luke above (attached here also), I can remove the comma, but the regexp also removes any characters before the function.

How can I edit this so I can change "wow, thanks luke" to "wow thanks luke", and not just "thanks luke"?

Any help would be very much appreciated. (I've been on this issue for an hour now).

Thanks,

Gwen

Max Patch
Copy patch and select New From Clipboard in Max.


broc's icon

Like this?

Max Patch
Copy patch and select New From Clipboard in Max.

Gwen Taualai's icon

Exactly like that!

Thank you Broc, lifesaver.