Now that you have both environments ready, you are ready to test out basic communication. Connect to your Pi via SSH again, and navigate to the osc-examples folder.
$ cd osc-examples
Now you can start the print example by running node print.js.
$ node print.js
You should see output that looks like this in the terminal window. Leave this window open while testing with your choice of Max, Pure Data, or ChucK.
Max 7
To test with Max, you will need to open the osc patch inside the max examples folder on your computer. Once opened, click the lock button to enter edit mode, and edit the udpsend box to replace localhost with the IP Address of your Pi.
Once you have that completed, click the lock button to exit edit mode and click on the /print/max message box. You should see a message appear in your Raspberry Pi SSH window.
If everything is working as expected, you will see output in both the Max window and the Raspberry Pi terminal. The Node.js script will send test messages once every second to Max using OSC. You can see that the test messages include strings, floats, and integers. The oscroute.js helper object is used to route OSC message paths, and the unpack object is used to route the OSC arguments sent. You can use the arguments just like any other data source in in Max.
Pure Data
To test with Pure Data, you will need to open the osc patch inside the pd examples folder on your computer. Once opened, enter edit mode by selecting it from the Edit menu. Change the IP Address in the connect object box to match the IP address of your Pi.
Once you have changed the IP, exit edit mode and click on the /print/pd message box to test sending and receiving data.
If everything is working as expected, you will see output in both the Pd window and the Raspberry Pi terminal. The Node.js script will send test messages once every second to Pure Data using OSC. You can see that the test messages include strings, floats, and integers. The routeOSC object is used to route OSC message paths, and the unpack object is used to route the OSC arguments sent. You can use the arguments just like any other data source in in Pure Data.
ChucK
To test with ChucK, open up the osc.ck script in the miniAudicle IDE. Edit the IP address to match the IP address of your Pi, and click Start Virtual Machine.
Click Add Shred to send a test message to your Pi, and to start listening for new OSC messages from the Pi.
If everything is working as expected, you will see output in both the miniAudicle console monitor and the Raspberry Pi terminal. The Node.js script will send test messages once every second to ChucK using OSC. The test messages include strings, floats, and integers. You can use the sent data just like any other data source in in ChucK.
Page last edited March 25, 2015
Text editor powered by tinymce.