Pd Repertory Project

Version 0.11: 2007.07.24

This is the HTML documentation for the Pd Repertory Project, which aims to provide patches that can run selected pieces of the live electronic music repertory using the Pd program. You can obtain Pd from https://www.msp.ucsd.edu/software.htm. This package itself currently lives in https://man104nfs.ucsd.edu/~mpuckett/271.02f/homepage.htm and works on Windows and Linux (and should run on Mac OSX too, but that hasn't been tested.) The patches here require Pd 0.41 or later.

The Pd Repertory Project is developed by Miller Puckette, with Kerry Hagan and Arshia Cont. Parts of this documentation are adapted from this paper which was presented at ICMC 2001, Havana.

Contents:

Introduction
Installing the patches on your machine
Running the patches
Performance Instructions
Score following:

Introduction
Score following
Example: Risset, Sketches
STUDY PATCHES:
Test: a patch for making sure sound and MIDI are working.
Risset MIDI transformations inspired by Risset's Duet for One Pianist.
Reich Sampling and montage, with a nod at Steve Reich's Piano Phase .
Chowning FM synthesis and non-twelve-tone musical scales, inspired by Stria.
Harvey sinusoidal analysis and reconstruction of timbers, inspired by Mortuos Plango, Vivos Voco.
Vocal synthesis, inspired by Charles Dodge, Speech Songs.
PATCHES INTENDED FOR PERFORMANCE:
Pierre Boulez, Dialogue de l'Ombre Double, for clarinet, clarinet, and live electronics. (Documentation only; the patch is not yet published.)
Philippe Manoury, Pluton, for piano and live electronics.
Philippe Manoury, Jupiter, for flute and live electronics.
Rand Steiger, 13 Loops, for solo flute, viola, cello, bass clarinet, and marimba.
Karlheinz Stockhausen, Mantra, for two pianos and electronics.

Introduction

back to table of contents

The last 35 years have seen the development of a significant repertory of music involving concert instruments whose sound is enhanced or transformed using live electronics. The realizations of many of these pieces have depended on specific items of hardware or software which, while chosen for their expediency at the times of the premieres of the pieces, will eventually become impossible to find, and in some cases are already becoming scarce.

The Pd repertory project provides realizations of four important pieces from this repertory. It is hoped that this collection will expand to include at least a dozen pieces for solo instrument or small ensemble and electronics.

In addition to making it much easier to perform these specific pieces, the project aims to to fill three other useful functions. First, the realizations will serve to document the pieces in a way that will be useful to musicologists. Second, they will serve as a model showing how one might realize pieces involving real-time electronics in a less ephemeral way than is now often the practice. Finally, these realizations should be able to attain a higher level of audio quality than previous ones.

The new realizations are based on generic hardware running Linux. The choice of Linux was made on the basis of the great stability of the ``*nix'' operating systems in time (many programs from the early 80s still compile and run today), and also because we have found Linux particularly well adapted to real-time interactive audio synthesis and processing.

The pieces are realized using the Pd program, because it is available with source so that people should be able to recompile it at will in the future, and for its platform independence.

Installation instructions

back to table of contents

This section tells you how to install the Pd Repertory materiels on your machine. The same "install" should work for teaching studios and home machines (for study purposes) or for actually playing the pieces in concert. If someone has already installed the materials on the machine you're using then you don't need to read this.

System Requirements

The stablest platform for running the repertory patches is a PC running linux, but they should also be possible to run under Windows, Mac OSX, and perhaps other operating systems. Each specific piece has its own requirements in memory, CPU speed, and I/O. The very maximum you might need is the equivalent of a 2.4 GHZ Pentium 4 machine with 256M RAM, one MIDI channel in and out, five audio channels in and eight out. (Most of the patches require much less than this.) All the patches may at least be tested with only two channels in and out.

Many systems don't offer low-latency audio throughput. Ideally, you should install Pd in such a way as not to exceed 10 milliseconds of latency, although in practice, 20 is usually acceptable if you can't do any better than that. More on this issue can be found in Pd's reference documentation. In general, Linux offers the lowest latencies. Under Windows, the latency you can attain depends not only on your audio hardware, but also on the specific driver used (MMIO vs. ASIO.) First install Pd on your windows machine as described in the Pd documentation, https://msp.ucsd.edu/Pd_documentation/ . Version 0.11 of PDRP requires Pd 0.41 or later.

Then follow the instructions for linux or Microsoft Windows below:

Installing in Linux or Mac OSX

Get the file, "pdrp-xx.tgz", from https://msp.ucsd.edu/pdrp/ . Unarchive this ("tar xzf pdrp-01.tgz" for example) to make a directory, "pdrp-01". Inside find "lib" and "bin" directories. If you have Pd version 0.41 or later, you can open the patches directly. To do so, browse to lib/pdrp/patch, then to the desired piece such as "manoury-pluton", and then open the main patch. (Unfortunately, the main patches have a variety of names, like "main.pd", "pluton.pd", "song.pd", etc., but you should be able to figure out which one to open without much trouble.)

Alternatively, there is a "pdrp" shell command that opens the various patches from a menu. This runs in a shell window (in Mac OSX it's called a "terminal window".) If you want to install this in a public place on your machine, copy the contents of the "bin" directory to /usr/local/bin (there should just be one file, "pdrp") and copy the contents of "lib" (just one subdirectory, also called "pdrp") into /usr/local/lib. You should then have an executable /usr/local/bin/pdrp and a bunch of stuff, including this documentation, in /usr/local/lib/pdrp. This is appropriate, for example, if you want to install on a machine used by more than one users, for instance at a teaching studio.

If you just want to install the "pdrp" shell command into your home directory instead of /usr/local, just make an alias to ~/pdrp-01/bin/pdrp (for instance); you can put this in your .bashrc or .tcshrc.

If you are using the shell command, you must localize the contents of pdrp-01/lib/local-settings.sh to point to the library directory, and to invoke Pd in a way appropriate to your machine. Then you should just be able to run "pdrp" to get the menu of examples and run them.

Installing in Microsoft Windows

Download and unzip the file, "pdrp-01.zip", from https://msp.ucsd.edu/pdrp/ . Then you must place the directories "pd" (from the Pd distribution) and "pdrp" (from here) in a space-free directory path, such as "C:\files". This would give you the two directories:


c:\files\pdrp
c:\files\pd

Then to start one of the files, browse into a directory such as c:\files\pdrp\lib\pdrp\patch\manoury-pluton and open the appropriate patch such as "pluton.pd", using the Pd executable such as "c:\files\pd\bin\pd.exe".

Missing Soundfiles One repertory piece, Saariaho's Noanoa , requires about 60 megabytes of soundfiles to play. In addition, many of the pieces should come with soundfiles that you could use to test the patch, although you would't need them for a performance; and the "Tenny Collage" example, which is only a study patch, should have accompanying soundfiles. These are not included in this distribution both for copyright and space reasons. You can get the files for Noanoa from the publisher (see the documentation for that specific piece) and you can "rip" materiels for "Collage". Unfortunately, so far there's no way you can get the test files for the various other pieces except by recording them yourself.

Running the patches

back to table of contents

You can run Pd directly and open the patches from the Pd Repertory Project, but if they are installed it might be easier to use the built-in scripts which take care of starting Pd up with the correct audio and MIDI settings and so on. (The patches are set up to inform Pd of any path settings they might need.)

Using the shell command (Linux or Mac OSX only)

If it's onstalled on your machine, you can use the "pdrp" shell script which gives you a menu of patches to select from. On the other hand, if you want to perform one of the pieces, you may prefer to prepare your own shell script to run the patch with the most optimal settings for your setup.

The pdrp command. Get a "shell" window, and type "pdrp" to the prompt. You should see a list followed by a prompt, like this:

    1) TEST-TONE             6) reich-phase         11) tenny-collage
    2) boulez-dialogue       7) risset-duet         12) yuasa-midnight
    3) chowning-stria        8) saariaho-noanoa     13) quit
    4) harvey-mortuos        9) steiger-loops
    5) manoury-pluton       10) stockhausen-mantra
    #? 

Now type a number from 1 to 13. Start with "1", the test tone. When you're done with the test tone, quit Pd and you get the "271" menu back. "13" quits and you get back to the shell prompt.

Making your own script. If you are performing any of these pieces you will probably want to make a copy of the relevant directory. For Jupiter , for example, the necessary files are contained in these directories:

    ./patch/manouy-jupiter
    ./lib
You can just put copies of "lib" and "manoury-jupiter" together. You might even want to include a local copy of Pd. The whole bundle would look like this:
    ./manouy-jupiter
    ./lib
    ./pd
The manouy-jupiter directory contains a shell script named "doit" which is automatically run by the pdrp command. It should look something like this:
#!/bin/bash

${PD:-pd} ${PDSETTINGS:-} \
    -path ${BASEDIR:-.} \
    -path ${BASEDIR:-.}/abstractions -path ${BASEDIR:-.}/snd \
    -path ${BASEDIR:-.}/score -path ${BASEDIR:-.}/interpol \
    -path ${BASEDIR:-.}/tables -path ${BASEDIR:-.}/ispw-compat \
    -path ${BASEDIR:-.}/../../sound/jupiter \
    -path ${BASEDIR:-.}/lib -path ${BASEDIR:-.}/../lib \
    -path ${BASEDIR:-.}/../../lib \
    $* jupiter.pd
Make your own copy, using an auspicious name such as "perform", and alter things as needed. You can define the variables PD (to specify where the PD executable lives) and PDSETTINGS to hold any flags you want to start Pd with. It might end up looking like this:
    set PD usr/local/bin/pd
    set PDSETTINGS "-rt -audiodev 2 -channels 8"
    ${PD:-pd} [...]
Now just type "./perform" to the shell and you're running.

Windows Previous versions of PDRP also supplied batch files for running the patches, but these never worked well and are no longer provided; you can just open the patches directly, perhaps adjusting audio settings as needed. On Windows, beware of accidentally running two copies of Pd at once; only one of them can open the audio and MIDI ports and the other won't be able to do much.

Performance instructions

back to table of contents

The following instructions are generally valid for all the pieces, but in addition each should have instructions specific to itself, describing the hardware setup, how to check and run the piece, and whether and how to customize the patch for various contingencies.

None of the patches are exactly as they were in the latest performance, and it is necessary to check them carefully before attempting to use any of them on stage. Some have only been touched up and kept current, whereas others have been extensively revised.

Where possible, the patches have been tested with soundfiles to verify that they at least do approximately the right thing. Thees soundfiles are usually not available to the public for copyright reasons, but it is well worth it to make your own recordings to verify that the patch works, plus to check speaker placement and audio levels, without having to keep the musicians on call. Some of the patches have built-in recording and playback facilities for this.

Pieces with more than two channels of output have a "stereo" toggle which mixes the output down to two channels so you can test things without needing a multichannel setup.

Customization.

Pieces may be started from a shell by cd-ing to their directory and running "./doit" (under linux or OSX) or by running the appropriate batch file in MSWindows. It's a good idea to make a separate copy of the patch and all support files to perform from. In this copy, you will want to customize the batch or shell ("doit") file to start Pd up at the specific latency and with other I/O hardware settings you want. In the best of all possible situations this would be the only file you have to modify; but see below for various reasons you may have to customize the patch itself.

Some of the pieces have stringently defined speaker arrangements, whereas others offer more freedom to customize things to individual performance spaces. Customizing speaker arrangements usually will require customizing the patch; search for "dac~" to find all the outputs, and reassign or re-mix outputs as needed.

One piece, Noanoa, calls for a foot pedal, which may be either a joystick switch or a MIDI controller. You'll have to edit the patch according to your setup.