remove /

Jonas Barsten's icon

Hi there!

I'm working with some OSC-messages that look like this: /1/fader/1 "value".

I route away the first "/1" and the "/fader", then I unpack the "/1" and the "value".

The problem is the last "/1" that I want to be just "1".

I've tried to use an atoi to solve it, but when the fader number (/1, /2 ... /9, /10, /11) get's to 10 (or above) I'm f*d.

Ideas?

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

-jbj

btw, using external "OSC-route".

Luke Hall's icon

Either use more instances of [OSC-route] with arguments for each of the expected values. Or destroy the slash with [regexp (/) @substitute %0].

Jonas Barsten's icon

Thank you!

Been on this for hours, you made my day :)

-jbj

Luke Hall's icon

I am starting the day well!