• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum
    • Categories
    • Recent
    • Popular
    • Tags
    • Register
    • Login

    OSC Sender: TCP vs UDP

    How To... ?
    5
    9
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • eightE
      eight
      last edited by

      I am using the OSC Sender to send commands to hundreds of smartphones in the audience; the smartphones are using OSC UDP receivers. I noticed that not all of the devices receive the signals all the time. This should be expected as UDP is designed to be quick, but does not guarantee delivery.

      TCP– based OSC signal, on the other hand should guarantee the delivery to all devices on the given network (I am using 255.255.255.255 multicast).
      Is there a way in Isadora to send TCP–based OSC signals?
      If the answer is NO, I would have to write an OSC proxy, converting UDP transport to TCP, which I would like to avoid to have another moving part in already complex system.
      And while we are at it, is there a way to send midi data over OSC? My OSC receiver on device allows receiving midi data.
      Thanks.
      --8

      Analysis: http://post.scriptum.ru | Synthesis: http://onewaytheater.us
      Twitter: https://twitter.com/eight_io | Flickr: http://www.flickr.com/photos/eight_io/
      Github: https://github.com/eighteight | MulchCam: https//mulchcam.com
      MulchTune: https://itunes.apple.com/us/app/mulch-tune/id1070973465 | Augmented Theatre: https://augmentedtheatre.com

      1 Reply Last reply Reply Quote 0
      • DusXD
        DusX Tech Staff
        last edited by

        I don't beleive so (not easily). This is something I have mentioned before (my DAW supports tcp OSC)

        The TCP actors are very flexible, so it might be possible to roll your own.. but I can't give any guidance 
        I do suggest entering this as a feature request though.

        Troikatronix Technical Support

        • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        • Isadora Add-ons: https://troikatronix.com/add-ons/
        • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

        Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

        1 Reply Last reply Reply Quote 0
        • eightE
          eight
          last edited by

          @DusX Submitted a feature request.

          Did you try to send MIDI data over OSC?
          Thanks!

          Analysis: http://post.scriptum.ru | Synthesis: http://onewaytheater.us
          Twitter: https://twitter.com/eight_io | Flickr: http://www.flickr.com/photos/eight_io/
          Github: https://github.com/eighteight | MulchCam: https//mulchcam.com
          MulchTune: https://itunes.apple.com/us/app/mulch-tune/id1070973465 | Augmented Theatre: https://augmentedtheatre.com

          1 Reply Last reply Reply Quote 0
          • DusXD
            DusX Tech Staff
            last edited by

            No, I have not. I would imagine you would need a 3rd party tool to convert+send.

            Troikatronix Technical Support

            • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
            • Isadora Add-ons: https://troikatronix.com/add-ons/
            • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

            Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

            1 Reply Last reply Reply Quote 0
            • jhoepffnerJ
              jhoepffner
              last edited by

              Hello,

              You ask for two contradictory things
              TCP is a secured point to point communication, you make a particular session between two IP points, so you send it until handshake from the receiver.
              In UDP you can broadcast your message to all the potential receiver in the network, it's your purpose, I presume. You cannot do that with TCP.
              The only solution, even with a third party software, would be to establish a session with each person in the audience, difficult to manage or you need a dedicated server, like a web server.
              Jacques

              Jacques Hoepffner http://hoepffner.info
              GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
              MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
              MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
              MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

              1 Reply Last reply Reply Quote 0
              • MarciM
                Marci
                last edited by

                Node-Red & websockets running independantly from Izzy can form an OSC buffer / repeater... These days I translate the OSC into JSON, and publish via MQTT as MQTT can be configured to cache, buffer and retransmit as well as rate limit (depending on your chosen MQTT broker and config).

                rMBP 11,3 (mOS 10.13) / rMBP 11,4 (mOS 10.14) / 3x Kinect + Leap / TH2Go
                Warning: autistic - may come across rather blunt and lacking in humour!

                1 Reply Last reply Reply Quote 0
                • eightE
                  eight
                  last edited by

                  @jhoepffner I could do a multicast with TCP transport, given the addresses of all devices on the network. The protocol would look like this:

                  -- send an init UDP OSC multicast to all devices
                  -- once initiated the device would reply back, its address then can be obtained from the reply message
                  -- as the device IPs are coming in, a TCP based OSC sender would update its queue to account for all devices, which replied.
                  @Marci -- thanks for the node-red mqtt suggestion -- this may be the way to go to build this OSC proxy. Would you share a simple node-red flow, which talks to Isadora OSC sender and retransmits using mqtt?
                  --8

                  Analysis: http://post.scriptum.ru | Synthesis: http://onewaytheater.us
                  Twitter: https://twitter.com/eight_io | Flickr: http://www.flickr.com/photos/eight_io/
                  Github: https://github.com/eighteight | MulchCam: https//mulchcam.com
                  MulchTune: https://itunes.apple.com/us/app/mulch-tune/id1070973465 | Augmented Theatre: https://augmentedtheatre.com

                  1 Reply Last reply Reply Quote 0
                  • FredF
                    Fred
                    last edited by

                    Just a quick question as far as I knew, OSC was strictly UDP, is there a TCP version of the spec? I had a look and saw a cinder lib that had something like that going on, but I did not see any official spec, I would be curious. I have TCP, but just my own messages to get the reliability, and also made a dodgy hand made receipt system for OSC over UDP.

                    Looking at your smartphone project I would guess timing is also pretty tight? @Marci is right on, MQTT will give you fast reliable results. If you run a periodic clock stream and timer in your app you can delay message execution to an upcoming tick and have great sync as well. You can also go for a tiny lightweight nodeJS, also super fast.

                    http://www.fredrodrigues.net/
                    https://github.com/fred-dev
                    OSX 10.15.15 MBP 2019 16" 2.3 GHz 8-Core i9, Radeon Pro 5500M 8 GB, 32g RAM
                    Windows 10 7700K, GTX 1080ti, 32g RAM, 2tb raided SSD
                    Windows 10 Threadripper 3960x 64g ram, 1tb NVME, rtx 2080ti + rtx2070 super

                    1 Reply Last reply Reply Quote 0
                    • eightE
                      eight
                      last edited by

                      @Fred this app is cinder-based, using the new OSC block. It supports UDP and TCP transport, which are almost identical in terms of use (TCP can't do multicast, and order of bringing up the server and the client is important). I don't know about the specs, but under the hood this block is based on c++ asio library.

                      I don't have a feeling of how unsynchronized the messages arrive to the devices, if they did arrive. By ear and a naked eye the arrived messages are in sync. Also, in the first show I have embedded the app into, reaching the destination at all is more important than reaching it in sync.
                      Node-red and its mqtt modules are node.js based. I have a solid experience with node, but the node-red flow diagrams operation and semantics escaped me in 5 minutes I spent yesterday after installing all that good stuff. Hence, having a basic flow example of how to wire osc and mqtt would be swell.
                      In the second show I am working on right now, I want to selectively control devices, this is where node-red proxy may become handy (it will keep the addresses of all devices and distribute the messages between them as needed). If not that, cinder's new osc block is great and I don't think I will have any difficulty coding the proxy in it. The only thing that stops me from jumping onto it, is that node-red may provide a much better configuration interface, which should be easily understood by the technicians in the field (once I build it), whereas cinder will require recompiling, until I figure out how to provide an easy off-line configuration.
                      --8 

                      Analysis: http://post.scriptum.ru | Synthesis: http://onewaytheater.us
                      Twitter: https://twitter.com/eight_io | Flickr: http://www.flickr.com/photos/eight_io/
                      Github: https://github.com/eighteight | MulchCam: https//mulchcam.com
                      MulchTune: https://itunes.apple.com/us/app/mulch-tune/id1070973465 | Augmented Theatre: https://augmentedtheatre.com

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post