Convert json to OSC

Hi - New to scripting but looking for a solution to the following.

I have a piece of software that generates a json string to the network every 10 seconds.
This string would look something like…

    "gender": "male",
    "age_value": 18
} }

When the string is generated I need to convert it to OSC commands depending on values within the string. I’m guessing to do this I need to have script running in something like “Sublime Text”??

I would need the script to do something like…

If gender = female then ignore
If gender = male send Two OSC Commands

/cue/age18/go. (eg the age value is incorporated into the OSC Command)


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.


What are OSC commands?

Hi Jan shah
OSC is open sound control
The resulting translation from my original question could also be a UDP string

I just need a way to translate the incoming Json string to either a udp string or osc command based on the values in the json string