An Introduction to Pure Data – 5th August

On August 5th from 13:00-17:00 I’ll be running a Pure Data workshop at Vivid Projects.

puredataworkshop

Pure Data (aka Pd) is an open source a Visual Programming Language, similar to the likes of vvvv and Max/MSP. Pd enables musicians, visual artists, performers, researchers, and developers to create software graphically, without writing lines of code. Pd has seen various implementations including live visuals (VJing), electronic music and even as an embedded library on websites, games or a Raspberry Pi.

This 4-hour workshop looks at using Pd for generative and interactive visuals. Participants will learn how to use Pd to create dynamic motion graphics that react and interact with a variety of sources including audio, live data feeds and hardware controllers.

Logistics

  • The workshop will take place at Vivid Projects, which is located at 16 Minerva Works, 158 Fazeley Street, Birmingham, B5 5RS. Ring the buzzer to be let in.
  • The workshop takes place on Tuesday 5th August and will begin at 13:00 and finish at 17:00.
  • The workshop is limited to 15 places
  • Tickets cost £10 (plus booking fee) and can be purchased from http://www.eventbrite.co.uk/e/pure-data-workshop-tickets-12365061231

What you will need

  • Pure Data Extended. Pure Data is free and open source software that can be downloaded for Max OSX, Windows and Linux from http://puredata.info. The software comes in two versions, Pure Data Vanilla and Pure Data Extended. For this workshop participants should download Pure Data Extended before the workshop begins in order to have more time developing skills and software.
  • A laptop. Although Pd can run on old hardware, newer hardware results in a smoother usage experience.
  • Ideas! After the basics have been covered the workshop will focus on developing any ideas you have.

Thoughts on live coding visuals in Pure Data

I took part in Algorave in Gateshead on 26th April. Apart from being incredibly awesome it was my first time live coding – or rather live patching – visuals in Pure Data from scratch. I emphasise from scratch because nearly all of my performances involve me modifying patches, but never starting with a completely blank canvas. I also occasionally used the HSS3jb as a texture for objects, but never on its own. It’s also great for when crashes occur, which is/was often ;-). Here’s a few sampels of my visuals. Videos by Mariam Rezaei:

I learnt a few things about Pure Data that night, and my general opinion is that it isn’t that great as a live coding visuals tool.

One of first issues is encapsulation of objects. This can be done quite easily but it’s a manual process which would involve cutting all cords and reconstructuring a patch. That is, you would have to cut the selection of objects, paste them into a sub patch and then reattatch it. By way of comparison, Max/MSP has this as a feature already, whereas this isn’t mentioned at all on the bug tracker Feature request is now on the bug tracker. Not being able to auto encapsulate objects makes reuse a bit more difficult and cumbersome, which resulted in some really messy patches from me on the night.

Algorave patches

This also relates to another issue of object insertion. When I was building my patches I would often have to preempt what I would need. I nearly always started with [gemhead]-[translateXYZ]-[rotateXYZ]-[repeat 10]-[rotateXYZ]-[translateXYZ]-[color]-[cube]. Inserting any additional objects required me to cut the cord and therefore the screen output. This would be solved if there were, for example, a method whereby if two objects were selected, the next object was inserted in between them. This is obviously an over-simplified specific use case which would need more thought behind it. Again, no mention of it on the bug tracker. Feature request is now on the bug tracker.

There were other thoughts I had on the night, such as the incosistencies and clumsiness of using the [repeat] object, the lack of a snap-to-grid option for aligning objects, the tiny size of inlets and outlets – even when the ojbects themselves may be huge, which is only exaggerated when using a 13″ 1080p screen, and the lack of a toolbar (yes, I am aware of GUI plugins), but these are the two which I felt would’ve helped me most.

Has much else been written about the use of Pure Data for live coding visuals?

NeonPlastic

I’m happy to announce the release of NeonPlastic, a generative Pure Data artware piece by myself (visuals) and Joe Newlin (audio), inspired by Neoplasticism and all things boxy.

The above video acts only as a preview. To experience this piece in all its hdmegaawesomeness grab the code, open Pure Data, get yourself a cup of tea and press the big red button!

NeonPlastic

NeonPlastic

NeonPlastic

NeonPlastic

Pure Data File Killer

On one of my frequent journeys on the information superhighway I stumbled across Little-Scale’s Mass JPG Killer. This handy little patch allows a user to load any binary file and “glitch” it by overwriting some of the original data with a repeating pattern of user-defined data.

Mass JPG Killer by Little-Scale

The only problem (for me and people like me) is that I don’t have Max/MSP and can’t install it on Linux, meaning I’ve never actually used it!

Little-Scale very kindly provided the internet at large with screenshots of the inner workings of the patch. I was able to to use a whole lot of science and maths to rewrite and reinterpret this patch of mass destruction in Pure Data, which is more easily available.

Pure Data File Killer

Click to download

Click to download

Usage

Usage of the patch is very simple and can yield some quite interesting results!

  • Click open to load a binary file. Pure Data may freeze for a moment if you’re loading in a large file. I don’t recommend loading in a file over 100MB
  • Set the byte offset. This number represents the starting point at which the patch will start “corrupting” the file. If you’re a glitchspert (glitch + expert) you’ll remember that you should avoid modifying the header. To avoid modifying the header set the offset to the 1000s.
  • Set the period value. This can be hard to understand, so here’s an example: If the period is set 1378 then at intervals of 1378 bytes from the offset it will modify the data.
  • Set the data value. This works in conjunction with the period value. Using the previous example, if the data is set to 102 then at intervals of 1378 bytes it will replace the current byte value with 102.
  • Press either random period or random byte data to populate these values with random values.
  • Press glitch it!. Guess what that does.
  • Write the files to save them to the same directory as the source file. The original file will not be overwritten.
  • To start again press the reset button. It will load the original byte data.

This patch is very similar to Little-Scale’s with a couple of exceptions:

  • The offset cannot be set for each instance. This is by design as I felt it was a bit redundant.
  • You no longer need to copy the hex data to a new file in order to view the results
  • It’ll work on any platform that can run a full version Pure Data Extended. This should include the Raspberry Pi version as GEM is not required.

Output

Although it was originally inspired by the JPG Killer you can get some very interesting results if you use other file formats and set the period data to a number less than 20.

Pure Data File Killer - Bliss (sgi)

Pure Data File Killer - Bliss (jpg)

Pure Data File Killer - Bliss (pix)

Pure Data File Killer - Bliss (pix)

Multimedia Programming with Pure Data

A new book by Bryan Chung, Multimedia Programming with Pure Data was recently published by Packt Publishing.

Multimedia Programming with Pure Data

Multimedia Programming with Pure Data

Multimedia Programming with Pure Data

Despite it being a big part of Pure Data Extended, GEM – and making visuals in PD – doesn’t get as much attention as audio processing. Whereas sound-makers have resources such as Loadbang and excellent tutorials from Obiwannabe, visual artists have little access to such a comprehensive resource, which can be a bit off-putting for new users. With that in mind I was more than happy to be a reviewer for this book that focuses almost entirely on GEM and making visuals in PD.

Although it is definitely suited to new users this book does get quite complex in later chapters where it begins to detail camera tracking, OpenCV and particle generators. I even learnt a couple of things!

Most of the tutorials are written to work on all operating systems (Linux, Mac and Windows) though some instructions, such as installing libraries, aren’t always covered. That could be another book in itself!

Get yourself a copy now!