No announcement yet.

Sending OSC messages to a changing address

  • Filter
  • Time
  • Show
Clear All
new posts

  • Sending OSC messages to a changing address

    Hi there,

    I'm trying to send an OSC message to a changing "rewrite address". I want to set up an OSC message to the following address: /1/label1/<var1> where var1 stores a string that changes between position/x and position/y.

    The problem is (when var1 is the string: position/x) that this is sending a message to /1/label1/"position/x" with the quotes included. Because of the quotes the message is not sent to the correct destination, which should be /1/label1/position/x. I think this is because of how I set var1. I entered the arguments in the function for setting var1 as: (position/x,position/y) which once entered goes to ("position/x","position/y") with the quotation marks as shown in the picture below:

    So my question is, is there anyway to set these arguments to the string: position/x without the quotes around it? Or is there a way to access just what is inside the quotes when using var1(which has the string "position/x" saved in it) in the 'Rewrite address:' field?

    Thank you in advance for any help you can give!
    Last edited by jrhun; 10-28-2012, 10:24 AM. Reason: fix picture

  • #2
    Hi Jesse,

    Thank you for this interesting use-case.
    The problem you had is caused by a bug in the way OSCulator formats the string argument into the rewrite address.

    I was wondering how you did set the value of the variable. When I tried to reproduce your problem, I noticed that there was no way of assigning a Variable event to a OSC message with a single string argument. So I fixed that as well, but I want to be sure I did not miss something !

    So, let me know how you set this variable, and I will send you a build that fixes the rewrite address problem.




    • #3
      It took me a while to work out a way to set the variable.

      I set up an osc routing to the following: (localhost) var/1 : (position/x,position/y)
      Then before sending a message to var/1 (or just deleting it if it was already there), I manually created the message: var/1 and set it up as event type: variable value: 1. This allowed me to store any argument sent to var/1 in variable 1. (var/1 the osc address, variable 1 the osculator variable. )

      The var/1 automatically created by osculator could only have the event type: osc routing, but by first manually creating the message I could avoid this. Was that the problem you had in reproducing it?

      Thank you for your quick and helpful response as well!
      Last edited by jrhun; 10-29-2012, 01:12 PM.