Changing OSC Listening Port

Hi friends… I’m brand new to SOnicPi and loving it. Im trying to interface to nan old homage instrument that I can’t configure or reprogram. It’s sending OSC messages to port 12000 and listening on port 10000 . I found in the doc that you can change the port SonicPi used to send OSC via use_osc ip_adder,port … I can’t find a similar way to override the input port. Is it stuck at the default of 4559 ? If so… any ideas on how I can read these OSC messages on a different port ?

Many thanks !
-jc

Hi @johncohn,

a while ago I had the same challange to solve (with an Adafruit controller). As far as I know, there is no easy way to do that. I could solve this when I found out how to change the port on the controller.

The 4559 port is changed to 4560 pin 3.2dev version in a commit on 30th April
Number:
d245d93c5b797ad76fa333f829c32d67480af96c

This is because 4559 is actually reserved by some other software. In the same commit other ports not usually interacted eith by the external user are now allocated dynamically. Eventually there is promised a config file to allow you to change ports used.

If you want to try another value you could Try changing the hard code value 4559 or 4560 in the server file. I’ve not tried it personally but it should work if you want to experiment. I’ll try it out after Christmas and report further.

1 Like

Sorry, changing the port Sonic Pi listens to OSC messages isn’t available in the GUI at this point. I’ve made efforts to make this a bit more flexible in the underlying code in the unreleased developer version and a future release may make this accessible. I think the main reason this hasn’t been worked on is that it’s pretty rate to have an OSC client that doesn’t let you configure the outgoing port. This is clearly a good example where this isn’t the case and provides direct motivation to fix it in a future release.