Meet the Cat: A Quick Introduction to Purr Data

Albert Gräf <aggraef@gmail.com>
Computer Music Dept., Institute of Art History and Musicology
Johannes Gutenberg University (JGU) Mainz, Germany
February 2023

This document is licensed under CC BY-SA 4.0. Other formats: Markdown source, PDF
Permanent link: https://agraef.github.io/purr-data-intro/

Purr Data is an improved version of Miller Puckette’s interactive computer music and multimedia software Pd. This document provides new or prospective Purr Data users with a gentle introduction to the program and some helpful information to get started.

What is Purr Data?

Purr Data is the latest (2.x) branch of Ivica Ico Bukvic’s Pd-l2ork. Pd-l2ork in turn was a fork of Hans-Christoph Steiner’s Pd-extended, which has been the longest-running (and arguably the most popular) variant of Miller Puckette’s Pd. Pd a.k.a. Pure Data, the common basis of all these variants, is Miller Puckette’s interactive and graphical computer music and multimedia environment. Pd is also the premier open-source alternative to Cycling74’s well-known commercial Max program (whose original version was also developed by Miller Puckette when he was at IRCAM in the 1980s). There are a few other popular and very capable applications in the realm of computer music and media art, most notably Csound and SuperCollider. But Max and Pd’s special appeal is that you work in an intuitive graphical “patching” environment which allows you to put together advanced real-time signal processing applications without having to learn a “real” programming language.

Puckette’s version of the program is sometimes jokingly referred to as “vanilla” Pd, because it comes without any extras and thus provides the purest taste of Pd, you might say. In keeping with this metaphor, the other Pd variants are often called flavors.

While vanilla Pd, being the reference implementation, remains critically important for the development of Pd’s real-time engine, its Tcl/Tk-based graphical user interface has never been very pretty or convenient. Consequently there have been several attempts by the community to improve Pd’s user interface in various ways. Pd-extended is the earliest and the longest-running of these, which also includes a fairly complete selection of 3rd party add-ons. However, its development has stopped in 2013, and thus it is considered obsolete now.

Ico Bukvic introduced Pd-l2ork in 2010 as a fork of Pd-extended to be used by the “Linux Laptop Orchestra” (L2Ork) he founded at the School of Performing Arts at Virginia Tech. Although the original motivation was to create an improved version of Pd-extended to be used by the L2Ork (hence the name) as well as in education, on Linux it quickly became a more up-to-date alternative to Pd-extended offering a fair number of additional bug fixes and GUI improvements. This was mainly due to its more nimble development model which allowed bugfixes and improvements to be deployed quickly even if this may have had an impact on backwards compatibility. Vanilla Pd, on the other hand, necessarily has a much firmer outlook on backwards compatibility, so that it is still able to run very old patches created with ancient Pd versions.

Despite the many and substantial improvements it offered, Pd-l2ork’s GUI was still based on Tcl/Tk. This was both good and bad. The major advantage was compatibility with vanilla Pd. On the other hand, Tcl/Tk looks and feels outdated in this day and age, even when going to some lengths with theming, as Pd-l2ork did. Tcl is a rather basic programming language, and its libraries have been falling behind, making it hard to integrate the latest advancements in GUI, multimedia and web technologies. Also, Pd-l2ork’s adoption was hampered by the fact that it was essentially tied to Linux, and thus a cross-platform solution was needed.

In 2015 Jonathan Wilkes stepped in and started creating Purr Data to address these problems. In a nutshell, Purr Data is Pd-l2ork with the Tcl/Tk GUI part ripped out and replaced with modern web technology. To these ends, it uses an open-source framework called nw.js a.k.a. “node-webkit”, which is essentially a stand-alone web browser engine (Chromium) combined with a JavaScript runtime (Node.js). While the latter was originally invented for developing server-side web applications, frameworks like nw.js allow the two to be used in concert to create fully-fledged and portable desktop applications. Using nw.js ensures that Purr Data runs on Linux, Mac and Windows, looking the same on all supported platforms, and it paves the way to leverage standard web technologies such as JavaScript, HTML5, CSS3 and SVG.

Purr Data’s GUI is written entirely in JavaScript, which is a much more advanced programming language than Tcl with an abundance of libraries and support materials. This makes the further development of Purr Data’s graphical user interface a lot easier now that the initial GUI port is done. Patches are implemented as HTML5 SVG documents which offer better responsiveness and graphical capabilities than Tk windows. They can also be themed using CSS and zoomed like any browser window, improving usability. Purr Data also looks better and is easier on the eyes than classic Pd-l2ork, let alone vanilla Pd, especially on high-dpi displays (cf. fig. 1).