Pure Data (or Pd) is a real-time graphical programming environment for audio, video, and graphical processing. Pure Data is commonly used for live music performance, VeeJaying, sound effects, composition, audio analysis, interfacing with sensors, using cameras, controlling robots or even interacting with websites. flossmanuals Pure Data
Pd is a data flow programming language and supports four basic types of text entities: messages, objects, atoms, and comments. Atoms consist of either a float, a symbol, or a pointer to a data structure and are the most basic unit of data in Pd. In Pd, all numbers are stored as 32-bit floats. Messages provide instructions to objects and are composed of one or more atoms. To initiate events and push data into flow, much like pushing a button, a special type of message with null content called a bang is used.
Pure Data (Pd) is a visual programming language developed by Miller Puckette in the 1990s for creating interactive computer music and multimedia works. While Puckette is the main author of the program, Pd is an open source project with a large developer base working on new extensions. It is released under a license similar to the BSD license. It runs on GNU/Linux, Mac OS X, iOS, Android and Windows. Ports exist for FreeBSD and IRIX. wikipedia Pure Data
You can download Pd from here. The learning curve is quite steep, but once you pick up and remember by heart the graphic syntax and know a lot about audio composing methods and science behind producing sound you’re good to go for Pd. Personally I struggled a lot to grasp the idea behind it.
First of all the code for this project can all be found here. It includes all the pure data pads used, socket.io code for running both the server and the wikipedia stream. There is also some extra things that i needed to submit in order to pass this course, but are in no way needed to run this project on your own.
It is important you have an older version (5) of node installed! Don’t install the newest one!
The wikipedia recent changes stream info can be found here. When starting the project i was able to get access to the stream but getting something from the stream to pure data was a challenge.
First I needed to create a local server so that I could have access to the wiki stream from pure data. This is because pure data only supports two ways of accessing external data. One is [netsend] and [netreceive] that are objects for transmitting and receiving messages over a network. The second is Open Sound Control (OSC) and these are objects for sharing musical data over a network. “Using OSC you can exchange data with a number of devices, such as Lemur, iPhone (through OSCulator), Monome, or applications such as Ardour, Modul8, Reaktor and many more. Most modern programming languages are OSC enabled, notably Processing, Java, Python, C++, Max/MSP and SuperCollider.” Open Sound Control (OSC). When we send the data to the netsend port I make sure i send only the first letter of the title that we get from the wikipedia stream.
Next we create the actual wiki stream so that we can connect it to the opened server port. Here we just connect to the provided RC Stream and when there is a change in data we feed the title of the change.
In Pure Data using the [netsend] and [netreceive] I access the port 8006 to read the data and covert the input to ascii values using the object [spell]. Then with [iter] we split a list of ascii codes into a series of numbers. Depending on this number we are able to produce different sounds. For the sounds i’m using Matt Davey’s DIY patches. To get these onto a personal Pd project one has to copy the necessary patches completely (Check picture below).
Lastly I wanted to connect what ever music was produced into Processing to make graphics out of the live stream data. I was able to make the connection using OSC, but time ran out to actually create any cool graphics with the data i was sending with Pd. I’ll just leave you with some inspiration before i can come back to making mine awesome too.
Some great Processing examples and inspiration for future projects by Joshua Davis. He also created Hype library with James Cruz. It is a collection of classes that performs heavy lifting tasks while using a minimal amount of code writing using Processing and ProcessingJS.