Osc not sending osc messages to network address

Good evening,

Under windows 10,

osc_send “localhost”, 4559, “/helloWorld” works !
osc_send “192.1668.0.8”, 4559, “/helloWorld” doesn’t work

192.168.0.8 is of course the ip address of the localhost.
Can’t manage to send osc messages to other computer on the same network.

i was able to send osc messages with js script to this machine from another computer.

An idea ?

Nicolas

Would you please test this code and tell me if i’m alone ? (“mais non Jeff t’es pas tout seul” - J. Brel)

# issue address ip ?

ip_address = "192.168.1.10"

osc_send "127.0.0.1", 4559, "/play"
osc_send ip_address, 4559, "/ipnetwork"


live_loop :test do
  b = sync "/osc/play"
  sample :guit_e_fifths
  sleep 2
end

live_loop :test2 do
  b = sync "/osc/ipnetwork"
  sample :sn_dolf
  sleep 4
end

Thanks

Great question, thanks!

This works perfectly well on my Mac, but on my Windows 7 VM only the "127.0.0.1" message gets through. I tried enabling remote OSC messages in the IO prefs, but that didn’t appear to help. Could you just briefly try doing this yourself to confirm it also makes no difference on your machine?

Also, there are occasions where sleeping a machine can stop the OSC system working, but restarting Sonic Pi totally fixes it. Could you also try restarting Sonic Pi to confirm that doesn’t fix things either?

thanks for your answer.

It works in mac OS Sierra but doesn’t under windows 10. I’ve tested on 4 different computers. Not able to send osc message to another ip…
I precise that i can send osc messages with another program (open stage control :slight_smile: ) to the sonic pi i try to send command.

Is there some logs i can send you ?

Nicolas

Good evening !
is there somebody to test on a windows 10 computer and give me some feedback ? Is it an issue with this command or a exception …
Thanks

Nicolas

I’ve just tried this on a virtual machine running Windows 10 on my Mac with version 3.1 of SP. I can confirm the same behaviour. I can receive osc send to the loopback address or from an external computer to the actual ip address of the Windows 10 computer, but I can only SEND osc messages addressed to the loopback address 127.0.0.1, not to an external machine, or from the Windows 10 sonic pi to itself when addressed to the actual local ip address.

Behavior is fine when running SP 3.1 on my Mac.

ADDENDUM
There is a problem noted in the erlang log. Looks like it is trying to find something on Sam’s Computer! must be a link wrongly defined somewhere. I’ll investigate.

[{pi_server,send_later,7,
             [{file,"c:/Users/Samuel Aaron/Development/RPi/sonic-pi/app/server/erlang/pi_server.erl"},
              {line,185}]}]}
Ignoring negative sleep: -22

=ERROR REPORT==== 28-Jan-2018::16:28:40 ===
Error in process <0.38.0> with exit value:
{{badmatch,{error,enetunreach}},
 [{pi_server,send_later,7,
             [{file,"c:/Users/Samuel Aaron/Development/RPi/sonic-pi/app/server/erlang/pi_server.erl"},
              {line,185}]}]}
Ignoring negative sleep: -9

=ERROR REPORT==== 28-Jan-2018::16:28:41 ===
Error in process <0.39.0> with exit value:
{{badmatch,{error,enetunreach}},
 [{pi_server,send_later,7,
             [{file,"c:/Users/Samuel Aaron/Development/RPi/sonic-pi/app/server/erlang/pi_server.erl"},
              {line,185}]}]}
Ignoring negative sleep: -1

=ERROR REPORT==== 28-Jan-2018::16:28:42 ===
Error in process <0.40.0> with exit value:
{{badmatch,{error,enetunreach}},
 [{pi_server,send_later,7,
             [{file,"c:/Users/Samuel Aaron/Development/RPi/sonic-pi/app/server/erlang/pi_server.erl"},
              {line,185}]}]}
Ignoring negative sleep: -4

=ERROR REPORT==== 28-Jan-2018::16:28:42 ===
Error in process <0.41.0> with exit value:
{{badmatch,{error,enetunreach}},
 [{pi_server,send_later,7,
             [{file,"c:/Users/Samuel Aaron/Development/RPi/sonic-pi/app/server/erlang/pi_server.erl"},
              {line,185}]}]}

A big thank you for testing this malfunction. Sure it will be resolved quickly :slight_smile:

not sure that the string routing the file pi_server.erl via Sam’s machine is actually a problem as the file seems to being used, despite this log entry The error line 185 is where the error is generated in this file. However the fact that erlang is returning am error,enetunreach is relevant, and shows that it can’t send to the specified address, so there is a problem.

Hi. I’m having the same issue on windows 10.
When I try to send a message to a remote device on my LAN the device will never get the message.

On “127.0.0.1”, the localhost, it works fine, but if I use something else (192.168.1.74 for example, it never reaches it). To test that it wasn’t a firewall blocking the connection, I tried to send an OSC message with puredata on the same port and it worked perfectly.

Interestingly, it seems to be generating some network traffic activity (ruby.exe does seem to generate some sent bytes on the Resource monitor).

{{badmatch,{error,enetunreach}},
 [{pi_server,send_later,7,
         [{file,"c:/Users/Samuel Aaron/Development/RPi/sonic-pi/app/server/erlang/pi_server.erl"},
          {line,185}]}]}
udp server timeout:8

Also getting the same erlang error as mentioned above, pi_server.erl path must be wrong.

By default outgoing OSC comes from Erlang.

Sonic Pi runs slightly ahead of time, so it can send messages just slightly ahead of time. These ahead-of-time messages are then scheduled to execute at precise time in a well-timed schedule. This is true for the built-in synths (which are triggered via OSC) and is also true for the outgoing MIDI and OSC messages (so that they are sent at the same time a synth is triggered).

For audio, Sonic Pi uses SuperCollider for this well-timed scheduler. For outgoing OSC and MIDI, Sonic Pi uses a scheduler written in Erlang. The network traffic activity you’re observing is likely ruby.exe sending the OSC message ahead-of-time to Erlang for it to then schedule and then send on to the correct address. I think that it’s pretty likely that something odd is happening within the Erlang scheduler for these kinds of addresses. I’ll investigate and see what I can do.

Out of interest, and forgive me for not having a huge amount of knowledge in this area. What are you doing with these kinds of addresses? Is this a typical thing to be seen in Windows networking topologies? I’d definitely like any solution we end up with not just being able to deal with the issues we see in this topic, but also the full broad class of addresses (if this is something we can determine).

1 Like

Think we tweeted back and forth yesterday :slight_smile:

Thanks for the explanation on the ruby.exe traffic, that makes a lot of sense.

The address I used in my example (“192.168.1.74”) is merely the LAN address of a mobile device running TouchOSC. So, just an IP on the local router. If this is what you mean. Or what addresses do you mean?

I did a search of the files and the sam aaron string is actually inside the compiled pi_server.beam file, presumably from where this was built on Sam’s computer. As I’ve said earlier in the thread I think this may be a red herring as the file is running I think. The error is generated because it can’t access the network address, and I’m not sure that erlang is the problem. I think it is just indicating the error.

1 Like

Ah, ok - I completely misunderstood the problem then. I thought that it was for certain classes of IP addresses that you were having problems, when in fact that it’s any external network address.

OK, I apologise for my misunderstanding. However, this means that the problem is likely somehow with Erlang sending OSC messages externally. I’ll explore.

2 Likes

Hi Sam,
Did you ever discover the problem with windows & OSC to non localhost machines?
I’ve run into this problem (dinkyOSC device works over wifi to Raspberry Pi & a Mac, but nothing on the windowz machine (but localHost osc messae do work from thonny to Sonic Pi in wondowz 10).
yours
Phil.

@philAwesomeTech - I’ve been using OSC from Sonic Pi running on Windows to multiple non-localhost machines in my studio for a few years without any issues now.

I’m assuming you’re running the latest version? Does your ~/.sonic-pi/log/erlang.log have anything weird in it?

hi Sam, cheers for the quick reply…
Our problem is sending OSC to Sonic Pi from a Pico (via a Wifi chip). It sends info to sonic pi on a Raspberry Pi & Mac , but nothing on my windowz machine (all the IP addresses are correct, the Port is correct)… and, I’ve run the OSC “send” from python to Sonic Pi “locally” on the windowz (and it works fine)… so it’s just the networked “send” to Sonic Pi on windowz 10 that doesn’t work.
(I’ve also checked my firewall settings to allow a specific IP address and generic IP addresses… then eventually switched of the firewall completely… which didn’t make a difference)>
I’m a bit stumped…

1 Like

OK, just to confirm - your issue is with a Windows 10 machine running Sonic Pi receiving OSC messages via the network?

For a sanity check - have you enabled the “Allow OSC from other computers” option in the IO tab of the preferences?

Hi Sam,
yeah, everything in sonic Pi is “on” (midi , osc (allow incoming & from external machines))
and yes, sending “from” a wifi enabled device (that works as expected when sending to a mac or raspberry pi)… same set up (bar the changed IP address for the message to send to) - doesn’t work on windows.
firewall switched off (most extreme “lets try this to see if that’s the problem!”).

Some tests you might try

first check local osc is working for you using code below

use_osc "localhost",4560

live_loop :tx do
  osc "/play",rrand_i(48,72)
  sleep 0.2
end

live_loop :rx do
  use_real_time
  n = sync "/osc*/play"
  play n[0],release: 0.2
end

Secondly its worth switching osc and external osc off then on again from the IP prefs window. There was a time when it didn’t initialise properly.

3 Download (free) Protokol | hexler.net and monitor the incoming cues to your windows PC and see that they are arriving. I think you may have to stop this again before trying Sonic Pi.

1 Like

Cheers for the reply… I did say :
“…and, I’ve run the OSC “send” from python to Sonic Pi “locally” on the windowz (and it works fine)”
and that my code works when calling sonic pi on the raspberry Pi IP address (and My colleague’s Mac)…