# Send OSC messages to Nodejs - not working

**URL:** <https://in-thread.sonic-pi.net/t/send-osc-messages-to-nodejs-not-working/2970>\
**Category:** Support, Help & Resources\
**Created:** [November 24, 2019, 4:33am UTC](https://in-thread.sonic-pi.net/t/send-osc-messages-to-nodejs-not-working/2970 "2019-11-24T04:33:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vncnt](https://avatars.discourse-cdn.com/v4/letter/v/a6a055/32.png) [@vncnt](https://in-thread.sonic-pi.net/u/vncnt)\
**Post date:** [November 24, 2019, 4:33am UTC](https://in-thread.sonic-pi.net/t/send-osc-messages-to-nodejs-not-working/2970/1 "2019-11-24T04:33:53Z")

</div>

Attempting to stream messages to a nodejs server using either `node-osc` or `osc` npm packages but do not have any messages come through on a server.

Following this example on the backend to receive messages: [https://github.com/colinbdclark/osc.js-examples/blob/master/browser/index.js](https://github.com/colinbdclark/osc.js-examples/blob/master/browser/index.js)

Then in sonic pi, I’m using the following code form the turorial where the same ip / port are used in the nodejs code / sonic pi.

```ruby
use_osc "192.168.2.124", 4559
osc "/hello/world"

```

I’m running this on a mac, is there another step that I’m missing?

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [November 24, 2019, 7:22am UTC](https://in-thread.sonic-pi.net/t/send-osc-messages-to-nodejs-not-working/2970/2 "2019-11-24T07:22:40Z")

</div>

hi,

which version of Sonic Pi ? it’s always a good information to indicate.  
If you use the spi 3.2 dev version, the osc port is 4560.

if you want to explore open sound control, i suggest you to install openstagecontrol to send or receive osc messages and access a live log system [https://openstagecontrol.ammd.net/](https://openstagecontrol.ammd.net/)

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [November 24, 2019, 12:30pm UTC](https://in-thread.sonic-pi.net/t/send-osc-messages-to-nodejs-not-working/2970/3 "2019-11-24T12:30:58Z")

</div>

I’m not sure you can use the same ip address and port simultaneously with Sonic PI in this way.  
I tried a test program on my mac using an osc monitor program. It didn’t work when trying to listen on port 4559 (used by SP) on teh monitor, but when I sent two identical OSC messages to differnt ports on the same ip address that did work.  
See this screen shot. (Right click and open in new window to expand)

 ![Capto_Capture%202019-11-24_12-18-14_pm](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/e/e056b1d508d84ea282d48a9037d08aea77b870d4.png)

You can see the program sending the same message with data the tick value (or look value) on two separate ports. The monitor listens on ports 4559 and 8000 but only receives the data addressed to port 8000.
