Introduction to Pure Data

Disclaimer:
This section was copied from the english Floss Manuals, and adapted to this wiki format, note that the original floss manuals were more intended to be a manual for Pd-Extended, which is already outdated, but many parts of the tutorial are still beginner friendly and will be updated in this wiki.

if you want to contribute, feel free to edit this page or suggest changes in discord group #ideasAboutPdBook.

What is Pure Data?
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. Because all of these various media are handled as digital data within the program, many fascinating opportunities for cross-synthesis between them exist. Sound can be used to manipulate video, which could then be streamed over the internet to another computer which might analyse that video and use it to control a motor-driven installation.

Quick intuition about Objects and Visual Programming
Programming with Pure Data is a unique interaction that is much closer to the experience of manipulating things in the physical world. The most basic unit of functionality is a box (which we call formally as an object), and the program is formed by connecting these boxes together into diagrams that both represent the flow of data while actually performing the operations mapped out in the diagram. The program itself is always running, there is no separation between writing the program and running the program, and each action takes effect the moment it is completed.

About Externals
The community of users and programmers around Pure Data have created additional functions (called "externals" or "external libraries") which are used for a wide variety of other purposes, such as video processing, the playback and streaming of MP3s or video, the manipulation and display of 3-dimensional objects and the modelling of virtual physical objects. There is a wide range of external libraries available which give Pure Data additional features. Just about any kind of programming is feasible using Pure Data as long as there are externals libraries which provide the most basic units of functionality required.

The current way of installing externals on Pd-Vanilla is using Deken, other flavours of Pure Data may already come with some set of externals installed.

About developers
The core of Pure Data written and maintained by Miller S. Puckette (http://crca.ucsd.edu/~msp/) and includes the work of many developers (http://puredata.info/), making the whole package very much a community effort. Pd runs on GNU/Linux, Windows, and Mac OS X, as well as mobile platforms like iOS, and Android. The official distribution of Pd is also known as 'Pd-Vanilla'. Other forks/distributions of Pd are also known as different 'flavours'.

Real Time Visual Programming
Traditionally, computer programmers used text-based programming languages to write applications. The programmer would write lines of code into a file, and then run it afterwards to see the results. Many sound or visual artists, as well as other non-programmers, find this a difficult and non-intuitive method of creating things however.

( { // example by James McCartney var signal, delay, reverb;

// 10 voices of a random sine percussion sound: signal = Mix.fill(10, {Resonz.ar(Dust.ar(0.2, 50), rrand(200.0, 3200.0), 0.003)});

// reverb predelay time: delay = DelayN.ar(signal, 0.048);

// 7 length modulated comb delays in parallel: reverb = Mix.fill(7,{CombL.ar(delay, 0.1, LFNoise1.ar(0.1.rand,0.04,0.05), 15)});

// two parallel chains of 4 allpass delays (8 total): 4.do{ reverb = AllpassN.ar(reverb, 0.050, [ 0.050.rand, 0.050.rand ], 1) };

// add original sound to reverb and play it: signal + (reverb * 0.2) }.play ) SuperCollider: an example of text-based programming for audio.

Visual Programming
Pure Data, on the other hand, is a visual programming environment. What this means is that the lines of code, which describe the functions of a program and how they interact, have been replaced with visual objects which can be manipulated on-screen. Users of Pure Data can create new programs (patches) by placing functions (objects) on the screen. They can change the way these objects behave by sending them messages and by connecting them together in different ways by drawing lines between them.

This visual metaphor borrows much from the history of 20th Century electronic music, where sounds were created and transformed by small electronic devices which were connected together via patch cables.

The sounds that were heard were the result of the types of devices the composer used and the way in which she or he connected them together. Nowadays, much of this electronic hardware has been replaced by computer software capable of making the same sounds, and many more.

Real Time
The real advantage of Pure Data is that it works in "real time". That means that changes can be made in the program even as it is running, and the user can see or hear the results immediately. This makes it a powerful tool for artists who would like to make sound or video in a live performance situation.

Next
What is Digital Audio?