PureData – Tutorial using the help patches

Assumptions

  • The SenseWorld DataNetwork host is already running (the Pd patches won’t be useful without an operational server). If you haven’t gotten the server going, please refer to its documentation and get it up and running.
  • You must know the IP address of the datanetwork server.

PureData Help patch

Getting started

  • Look at dn.makenode-help.pd in the “puredata” folder. It gives you a basic example of how to create a data node using the dn.makenode object and how to subscribe to this node on the network using “dn.node” objects.
  • You will have to modify the pv dn-host object to use the IP address of your datanetwork host. Save, close, and re-open the patch if you have to modify this object so that you don’t have to do it again.
  • When you open the patch you should see a bunch of messages in the Pd console. Some of these will be prefaced with “MAKENODE” and “NODE” (corresponding to the respective objects), and others will be prefaced with “SENSEWORLD” (corresponding to the host). If all goes well the dn.makenode and dn.node objects will both connect and register to the datanetwork. If you don’t see anything from “SENSEWORLD” then you aren’t connected to the host (or the host is not running).
  • If you change the numbers going into the “pack” object above dn.makenode, you should see the data appearing in the Pd console as messages from the host as well as in the message box underneath the dn.node object.

Going further

Using dn.makenode and dn.node objects in a custom patch, you can get data from any node for which you know the ID number, and you can publish any data you like by making your own node. You can even take data from a node, process it using your Pd skills, and publish the output using a dn.makenode object — then other clients in any of the supported languages (Max/MSP, Processing, C++, Pd, SuperCollider) can use your processed data for further processing. Have fun and be safe!

Comments/Questions

Comments are closed.