You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been struggling with getting the OSC server working so that I can receive messages from software sending them on another machine.
I have the example client code working and can see my message received and can see a message coming back in Protokol.
I've changed the IP and Port to a different port on the other machine in the simple server example code. I get the Errno49 noted above when I run it.
I I use the lighting console software on the other machine to trigger an out going OSC message, I can see that in Protokol.
I've spent several days on this trying on different computers with different ports, etc. I disabled the firewall on the second computer with no change.
"""Small example OSC server
This program listens to several addresses, and prints some information about
received packets.
"""
import argparse
import math
from pythonosc import dispatcher
from pythonosc import osc_server
def print_volume_handler(unused_addr, args, volume):
print("[{0}] ~ {1}".format(args[0], volume))
def print_compute_handler(unused_addr, args, volume):
try:
print("[{0}] ~ {1}".format(args[0], args[1](volume)))
except ValueError: pass
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--ip",
default="192.168.86.91", help="The ip to listen on")
parser.add_argument("--port",
type=int, default=5005, help="The port to listen on")
args = parser.parse_args()
dispatcher1 = dispatcher.Dispatcher()
dispatcher1.map("/filter", print)
dispatcher1.map("/volume", print_volume_handler, "Volume")
dispatcher1.map("/logvolume", print_compute_handler, "Log volume", math.log)
server = osc_server.BlockingOSCUDPServer((args.ip, args.port), dispatcher1)
print("Serving on {}".format(server.server_address))
server.serve_forever()
The text was updated successfully, but these errors were encountered:
Sorry, the comment was my testing formatting the code. Accidentally closed the issue. Can't seem to delete the comment. But did get the code in the original post to format.
Hi! In the code, I'm using the IP 0.0.0.0, and in my iPad with TouchOSC, I have the IP 192.168.0.10. I didn't try to send information from my PC to the iPad, but from the iPad to the server, works fine.
Hi,
I've been struggling with getting the OSC server working so that I can receive messages from software sending them on another machine.
I have the example client code working and can see my message received and can see a message coming back in Protokol.
I've changed the IP and Port to a different port on the other machine in the simple server example code. I get the Errno49 noted above when I run it.
I I use the lighting console software on the other machine to trigger an out going OSC message, I can see that in Protokol.
I've spent several days on this trying on different computers with different ports, etc. I disabled the firewall on the second computer with no change.
Any help would be appreciated. Thanks in advance.
Hope this code formats correctly.
======================================================
The text was updated successfully, but these errors were encountered: