Pure Data another integrated environment

Miller S Puckette

Department of Music UCSD La Jolla Ca mspucsdedu

Kunitachi College of Music Reprinted from Pro ceedings Second Intercollege Computer

Music Concerts Tachikawa pp

May

Abstract making systems which were really usable

by noncomputer scientists was addressed by the

A new software system called Pure Data is in the

Max program was an attempt to make

early stages of development Its design attempts to

a screenbased patching language that could imi

remedy some of the deciencies of the Max program

tate the mo dalities of a patchable analog

while preserving its strengths The most imp ortant

Many other graphical patching languages had b een

weakness of Max is the diculty of maintaining com

prop osed that did not suciently address the real

p ound data structures of the type that might arise

time control asp ect and many other researchers had

when analyzing and resynthesizing sounds or when

by then prop osed much more sophisticated realtime

recording and mo difying sequences of events of many

control strategies without presenting a clear and fun

dierent types Also it has proved hard to integrate

touse graphical interface Max was in essence a com

nonaudio signals video for instance and also au

promise that got part way toward b oth goals

dio sp ectra into Maxs rigid tilde ob ject system

Finally the whole issue of maintaining two separate

As so on as Philipp e Manourys Pluton was realized

copies of all data structures one to edit and one to

using Max thus proving Max to b e an interesting

access in real time has caused much confusion and

environment for realtime computer music a stream

diculty Pds working prototype attempts to sim

of criticisms of Max started to app ear Max wasnt

plify the data structures in Max to make them more

originally intended as a programming language yet

readily combined into novel userdened data struc

many users treated it as one As such Max had obvi

tures Also the relationship b etween the graphical

ous shortcomings some of which are rep orted in

pro cess and the realtime one which is handled in

Also the original version of Max b eing written for

one way on the Macintosh and another way on the

a Mac Plus computer didnt address the question of

ISPW is replaced by yet a third solution

computergenerated audio remaining instead in the

realm of MIDI This was addressed in but only

Introduction

for sp ecial hardware

The design of realtime computer music systems has

b een a sub ject of active research since the RTSKED The question of how to use Max to amass and use

program By several authors were prop os data arose in IRCAM during the design phase of the

ing formal or semiformal realtime proto cols some ISPW A new software idea called Animal was pro

times in the guise of complete systems for doing p osed and implemented Many ideas in Pd owe

realtime computer music The question of their origin to the Animal program way to restore saved do cuments as in message passing N=32

−2 for realtime computer music control and synthesis

Blackman

In this example the new canvas ob ject is the

window which names itself X The third command

to X is to create a graph which then receives its

−3

own messages b efore the rst p op message resets

X to p oint to the original canvas Text can b e added either to the graph in the graphs own co ordinates

−4

like N or to the canvas in centimeters like

the string Blackman The data to b e graphed are

from a le in this case but supp ort is also N=2048 taken

−5 included for embedding the data in the Pd le

0 1 2 3 Canvasses which currently can hold only text and

graph ob jects will so on supp ort the style Max

b oxes and interconnections and also a framework

Figure Sample Pdgenerated graph

for collections which will generalize Maxs explode

feature Pd will therefore incorp orate three window

types of Max patch table explo de into a single new

Design

window type

Pds rst application has b een to prepare the gures

for an up coming signal pro cessing pap er by Puck

Templates

ette and Brown Commercially available software for

graphing data proved unsuitable for this application

In Pd the notion of a patch as in Max and the

The same can often b e said of music software The

notion of a dialog for searching for instance or for

rst exercise for Pd has b een to render graphs such

setting the range of a slider are unied There is

as in Figure There is as yet no editor for these

one exception the le selection panels will b e normal

graphs The source for the one shown follows

dialogs not patches If for instance we op en a

Maxstyle number b ox a template window app ears

N canvas noisesimbla

as in Figure

X font helveticamediumr

Another example of a template would corresp ond

X text Blackman

to a p oint of the graph of Figure its two entries

X graph noisesimblaplot

would b e for the x and y values of the p oint In

X xticks

this case it would b e p ermissible to add a eld to the

X xlabel

template which would add the corresp onding eld to

X yticks

all the p oints b elonging to that template This could

X ylabel

either b e the p oints of one of the curves of the graph

X style point

all the p oints of the graph or all the p oints of several

more style lines omitted

graphs

X text N

Templates dier from the abstractions of Max

X text N

in that the template is not reinstantiated for each

X pop

invocation a single template acts as a nonmo dal di

X pop

alog window for all instances of the data structure it

The format is very much like the Max le format controls If an anonymous data structure a oneo

which features embedded descriptions of patchers As member of a heterogenous sequence in eect a Max

with Max the message system is used in the same message as in a Max qlist is op ened a madetoorder tcl numbox Pd Pd−gui Max

type: int Pd implementation show: text Figure

top: 100

Pure Data also will get rid of one ma jor annoyance signal

bottom: 0 in Max which is the necessity of sp ecifying

ob jects to provide constant inputs Pd will allow tilde

ob jects to query their connections if no signals are

connected to a signal input but a oatingp oint outlet

Figure The template for a number b ox

is connected a scalarinput version of the tilde ob ject

will b e called if available otherwise a signal ob ject

template is created to show it

will b e provided automatically

To supp ort templates a new eld ob ject is in

tro duced Fields dier from numbers in having eld

names as in Figure Maxstyle patchable ob jects

Implementation

can query a template patch for the onset of a eld of a

given name so patches can traverse data structures

Pd is in two parts as shown in Figure The real

through their templates Also any data structure

Pd shown at left do es realtime computations using

which could b e called a Pure Datum can b ecome

a MaxFTSlike message interpreter and scheduler

a Max message handled in the usual way

All Pd do cuments reside in the address space of Pd

The other pro cess named Pdgui talks to the com

puters window system through the tk to olkit

DSP

This should allow p ortability to the X MS and Mac

intosh window systems although the current proto

MaxFTS which was the predecessor of Pd had a

type runs only on SGI hardware

severely limited notion of audio signals which has

proven to o restrictive for working with frequency The realtimenonrealtime divide works very dif

domain or nonaudio signals In Pd users may create ferently from that of MaxFTS the editor resides

DSP blo cks in which sample rate and vector size in the realtime Pd layer not in Pdgui in MaxFTS

vary This is done using two new tilde ob jects the four dierent editors all reside in the GUI layer

clock and reclock The rst of these allows the Max This choice reects an imp ortant change that

user to attach a symbolic name to a sp ecic combi has o ccurred in computer hardware in the last ten

nation of sample rate and vector size This notion years multiprocessors like the X and ISPW are now

replaces the switch mechanism of MaxFTS any giving way to unipro cessors at least in computer mu

clock can b e turned on and o The reclock ob sic applications This year we can exp ect to see a

ject simply converts a signal to any desired clo ck For unipro cessing computer announced which will equal

example preparing a signal for overlap FFT analy the sixpro cessor ISPW in sp eed at less than half the

sis is simply reclo cking to a clo ck with the necessary cost For the ISPW it was necessary to make the do c

prop erties the overlapadd step for converting back ument the patch reside in the graphical layer b e

into the time domain is accomplished by reclo cking cause otherwise there would b e six do cuments This

to the usual clo ck caused nightmarish problems in keeping the two data

sets Maxs and FTSs coherent In Pd we sidestep ference San Francisco Computer Music Asso

this problem by putting all calculations b oth editing ciation p

moves and realtime audio rendering in a single pro

Anderson D and R Kuivila A Mo del

gram Pd is therefore badly suited to multiprocessing

of RealTime Computation for Computer Mu

but more in line with current hardware developments

sic Pro ceedings of the International Com

than MaxFTS

puter Music Conference San Francisco Com

Pd should provide near patchlevel compatibility

puter Music Asso ciation pp

with Max from IRCAM and near source com

patibility with externs Most of the dierences

Boynton L et al MIDILISP A LISP

will b e minor design changes argument types of li

Based Music Programming Environment for the

brary functions for example which can easily b e

MacIntosh Pro ceedings of the Interna

aliased in an include le At the patch level cer

tional Computer Music Conference San Fran

tain ob jects such as FFT will b e replaced and the

cisco Computer Music Asso ciation pp

nefarious downsampling argument to line and sig

will probably b e replaced with the symbolic name of

Puckette M The Patcher Pro ceedings

a clock ob ject Pd will probably read Max patches

of the International Computer Music Con

but only save les in the Pd format The C source

ference San Francisco Computer Music Asso

co de will b e made freely available to the public

ciation pp

Lewis G reflewis A Max Forum Ar

Conclusion

ray pp

Puckette M FTS A Realtime Monitor

It is to o early to say whether or not Pd will re

for Multipro cessor Music Synthesis Computer

place Max as a realtime computer music environ

Music Journal

ment The success of Max reects a lucky conuence

of many events the rise of the Macintosh the arrival

Lindemann E ANIMAL a Rapid Pro

at IRCAM of di Giugnos X machine which pro

totyping Environment for Computer Music Sys

vided the problem that Max had to solve David Zi

tems Computer Music Journal pp

carellis brilliant work in getting Max published not

to mention his almost rewriting the entire program

much to its improvement and the contributions of

Osterhout J K Tcl and the Tk toolkit

Zack Settel Cort Lipp e Philipp e Manoury Chris

Reading Massachusetts AddisonWesley

Dobrian David Wessel and literally dozens of others

to the design do cumentation and creative abuse of

the program The success or failure of Pd will ride

as much on its nding a similar community as on its

design sp ecics

References

Mathews M and J Pasquale RTSKED

a Scheduled Performance Language for the Cru

mar General Development System Pro ceedings

of the International Computer Music Con