Announcement

Collapse
No announcement yet.

A few general questions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A few general questions

    Hello Cam,

    i have a few questions for better understanding.
    1) are all commands on an event fired in sequence? For instance one button in TouchOSC triggers over a hundred commands, could the last ones be more likely to be lost on a udp connection? and could i assume that if my last command is a color change, that once the color has changed all commands have been executed?

    2) Is there any way to basically copy and paste or move the whole bunch of commands that sit on one control. I ask because i have a fine setup with very many commands but for the sake of ergonomics i want to move many of them on to other events. so it would of course be amazing if there s a way to copy them.

    3) Do you know if there is something like a limit on the amount of messages that can be sent out at once via UDP and WiFi?

    Thanks already and a nice day

    Gabriel

  • #2
    Hello Gabriel,

    1) This is an excellent question, thanks for asking! If you use the UDP protocol to send OSC messages from a controller (TouchOSC) to a receiver (OSCulator) you will have in theory problems of packet order – messages do not arrive in the same order they were sent – and packet drop – messages do not arrive to their destination.

    In practice on a local network I have never been able to observe cases of packet disorder, but packet drop is quite frequent especially on WiFi connections, or through some routers.

    For these reasons UDP is considered as lacking reliability, but there ways around that. For example instead of sending single on or off messages for a button, you could send streams of on messages and off messages, the idea being that with more messages you reduce the probability of never receiving the information.

    So to answer your original question :
    No, last messages are not likely to be dropped more because packet drop is an effect of the network (WiFi interferences, router overload, etc.), ie. you have no control on it at any moment. Similarly if you receive the last message of a long chain, it does mean that none of the previous messages were properly received.

    What you say is true however if you use the TCP protocol, which OSCulator supports, but not TouchOSC.

    2) Copy/paste has always been fiddly in OSCulator, you can try but I am not sure it will do what you want. This will be enhanced in a future version.

    3) I am not exactly sure about what you mean by "sent at once", but I will assume that you try to reach the maximum performance out of OSC messages sent over UDP.

    The size limit of a UDP packet depends on the network MTU which is roughly 1500 bytes. If you want to be able to use that space in full you need a program that crams many OSC messages in a single UDP packet, making sure the size of the whole stays below the MTU. Given that typical OSC message size is around 30 bytes, that means you can put 50 of those message in a UDP packet.

    Now, if you meant by "sent at once" the maximum number of messages sent in a single stream, it is difficult to give a precise answer because it depends on your WiFi antennas, and the interferences around.

    At home I once made some tests with a WiFi development board with a basic chip, and the best I could transmit was between 250 and 300 packets per second. Newer chips are able to achieve better performance, sometimes at the cost of the wireless range.

    Let me know if that answered your questions.

    Cam

    Comment


    • #3
      Hello Cam,

      thanks so much for your excellent support.
      Its great you gave that figure of 1500 bytes because i should definitely try to get greedier with the amounts of controls, now that i know that.

      that answered all my questions very good and raises 2 new questions
      1) do you know if an ad hoc network would be more stable than a regular home wifi with good bandwidth?
      2) How can i send streams instead of single messages?

      Thanks again

      Gabriel

      Comment


      • #4
        Hi Gabriel,

        Its great you gave that figure of 1500 bytes because i should definitely try to get greedier with the amounts of controls, now that i know that.
        I understand you are using TouchOSC, is that right?
        Or are you writing your own program?
        Because if you use TouchOSC, then the numbed of controls does not matter, as TouchOSC does not optimize the sending of OSC message. It's just one control -> one OSC message -> one packet. Therefore packets are underutilized, but that's not a problem at all in practice since you can do so much with 10 fingers...


        1) do you know if an ad hoc network would be more stable than a regular home wifi with good bandwidth?
        Ad-hoc network usually has bad performances, I recommend using a dedicated WiFi base station with a wire connection (Ethernet) to your computer. But it depends on your usage, if it is at home, then ad-hoc is ok.

        2) How can i send streams instead of single messages?
        You can not do that with TouchOSC, the messaging protocol is not designed to be extra-reliable, but again it is fine if you are under controller network conditions.


        Best,
        Cam

        Comment


        • #5
          Hi Cam,

          great, thanks very much

          yes i use TouchOSC. Lemur too. But for this special project TouchOSC. I assign all my controls in OSCulator except for some LED Feedbacks.
          Most controls dont have too many commands. But on a few menu changes i had up to 250 commands. I reduced these to a maximum of 100 or so.
          I understood you that in this case that doesnt matter anyway.
          Also i must say that i didnt experience any trouble there except for these packet drops you mentioned, which seem unavoidable. Luckily its no showstopper just a little flaw that doesnt affect the workflow too bad.

          Have a nice day

          Gabriel

          Comment

          Working...
          X