Search Unity

[Released] extOSC - Open Sound Control

Discussion in 'Assets and Asset Store' started by dr_ext, Oct 13, 2016.

  1. linnspitz

    linnspitz

    Joined:
    Apr 3, 2019
    Posts:
    5
    hello, I am using extOSC to receive OSC data, currently I'm streaming the data from resolume locally on the same computer. Occasionally I get the error

    [OSCReceiver] Receive error: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at extOSC.Core.Packers.OSCPackerFloat.BytesToValue (System.Byte[] buffer, System.Int32& index) [0x00000]

    My project still works though, but I am afraid, it might lead to a crash.
    What could be the cause? I see that someone asked this question earlier in this thread, but it remains unanswered.
    Thank you for the great work.
     
  2. dr_ext

    dr_ext

    Joined:
    Apr 8, 2014
    Posts:
    100
    Hi, I tried to reproduce your error, but I could not repeat it, unfortunately I have an assumption that this is due to some specific settings.

    Hey, it won't lead to crash.
    But it looks like either an incorrectly packaged message comes from the resolume, or I set up somewhere with unpacking the message. But I never received similar problems. Please send me more information about how you're doing everything, and I will try to figure out the problem.
     
    TakuyaBabuya likes this.
  3. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Hello!

    Thanks for making extOSC! It's been awesome so far and is super easy to use. We have an issue that we could use a hand with.

    We're sending data over wifi from Max on a Mac to Unity 2020LTS on a PC. When we have the send frequency set to 16ms in Max, we are only seeing messages come in at like 2 or 3 per second. Is there a setting on the OSC or on the Max side that might remedy this? Also, we are logging the messages in Unity and don't know how to shut that off. Thanks for any guidance!
     
  4. dr_ext

    dr_ext

    Joined:
    Apr 8, 2014
    Posts:
    100
    Hi! If you send packages via broadcast, the router may not deliver data to all clients.

    And so, the principle of operation of OSCReceiver is: We receive packages between Update, after which we process all the messages received for Update.

    So that most likely you have problems specifically with the network, how i think.
     
  5. Fenikkel

    Fenikkel

    Joined:
    Sep 24, 2019
    Posts:
    20
    I'm here just to say you are the number ONE!
    So F***ing thanks mate:)
     
    dr_ext likes this.
  6. Fenikkel

    Fenikkel

    Joined:
    Sep 24, 2019
    Posts:
    20
    Hi another time. I want to send and Array of int via OSC.
    The think is that I don't know which way is better.

    This:
    Code (CSharp):
    1. message.AddValue(OSCValue.Array(OSCValue.Int(0), OSCValue.Int(1), OSCValue.Int(2)));
    Or this:
    Code (CSharp):
    1.         message.AddValue(OSCValue.Int(0));
    2.         message.AddValue(OSCValue.Int(1));
    3.         message.AddValue(OSCValue.Int(2));
    It's the same?
     
  7. Tonytorm

    Tonytorm

    Joined:
    Sep 22, 2020
    Posts:
    2
    Hi there, I am strugglin to send OSC messages through my Oculus Quest (during play test in editor it works fine)

    what i've tried so far:

    modified the androidmanifest.xml file
    put 'require' in internet access in project settings
    put the transmitter/receivers as 'close on pause'
    turned of windows firewall..

    still not working, any new solutions came up??

    many thanks in advance
     
  8. Tonytorm

    Tonytorm

    Joined:
    Sep 22, 2020
    Posts:
    2
    sorted...basically the osc transmitter was flipping the remote host IP address and the reason was pretty obvious:

    while testing within the editor the computer address is used for both receiver and sender (locally),

    once you build it and run it on the headset the computer address is the remote one..quite confusing at first but it makes sense
     
    Fenikkel likes this.
  9. Fenikkel

    Fenikkel

    Joined:
    Sep 24, 2019
    Posts:
    20
    For any noob reading this, what he means is that you need to change in OSC Transmitter the Remote Host from 127.0.01 to 255.255.255.255

    Explanation simplified:
    - 127.0.01 means that you will transmit for any app inside your PC.
    - 255.255.255.255 means that you will transmit for any app connected to the same Internet.
     
    dr_ext likes this.
  10. unity_DEED2554D01512160724

    unity_DEED2554D01512160724

    Joined:
    Dec 17, 2021
    Posts:
    1
    Did you fix it?
    I have sample proble with our Hololens2 and Unity 2020.3.27f. After some seconds extOSC.OSCReceiver seems freezer. But extOSC.OSCTransmitter runs properly.
     
  11. dr_ext

    dr_ext

    Joined:
    Apr 8, 2014
    Posts:
    100
    Unfortunately, I still do not have access to any version of Hololens to able to fix this problem.
     
  12. alpha_rat

    alpha_rat

    Joined:
    Apr 18, 2015
    Posts:
    12
    Running into the same issue on our end as well - in our case it was caused by the message being sent as a UDP message instead of OSC and being formatted the wrong way.

    Also, to the dev : Thank you for your work on this amazing free asset! works like a charm
     
    Last edited: Aug 10, 2022
  13. jdjddjdj

    jdjddjdj

    Joined:
    Apr 5, 2020
    Posts:
    8
    Hello!
    LOVE extOSC !!!!

    Once I got things configured correctly I am able to control the motion/rotation of lights and objects from Max/msp Whee!

    I cannot figure out how to control Light.color on a light (URP) - I was able to find and apply the ColorEvent component, find Light.color from Ext OSC but I am sure I am sending it the wrong command:

    Can you clue me into the message format the Light.color is expecting?
    Thanks you for a wonderful asset!
    jd
     
  14. iam1337

    iam1337

    Joined:
    Jul 27, 2022
    Posts:
    1
    Hi, OSCReceiverEventColor uses the first available value with tag 'r' (Color). But, you can also modify the code so that it accepts messages with three float values. To do this, you need to find the file: OSCReceiverEventColor.cs, and change the line 16 from this:
    Code (CSharp):
    1. if (onReceive != null && message.ToColor(out var value))
    to this:
    Code (CSharp):
    1. if (onReceive != null && message.ToColor(out var value, true))
     
  15. jdjddjdj

    jdjddjdj

    Joined:
    Apr 5, 2020
    Posts:
    8
    BOOM that's it! thank you very very much !

    Works a treat!

    For anyone following this:

    after changing the OSCReceiverEventColor.cs as iam1337 suggested, I now can send 0-1 rgb values from max via udpsend

    mypath command tag R G B
    /light/1/col Light.color r 0.6 0.1 0.9

    In the lights inspector i set it like this:
    OSC Fix.png
     
    iam1337 likes this.
  16. jdjddjdj

    jdjddjdj

    Joined:
    Apr 5, 2020
    Posts:
    8
    Have made huge progress since the last email. Thank you *very* much :):):)

    Q - Are there any starter examples of working extOsc visual scripts? Particularly with incoming osc. Im having a hard time getting started
     
    Last edited: Mar 23, 2023
  17. ShadzaCubexis

    ShadzaCubexis

    Joined:
    Jul 3, 2023
    Posts:
    1
    i tried to connect to another device and this error popped up.


    [OSCTransmitter] Socket Error: Could not use local host "192.168.9.89". Cannot assign requested address.
    UnityEngine.Debug:LogError (object)

    know what i'm missing?