Author Archives: Kevinernste

Ambisonics in PureData (PD)

Music 6421 students might wish to be aware of the “ambilib~” tools for PureData including my own implementation of a 3D panner, available in the “Spatialization” folder on the Desktop in Studio A , in the folder “PD_ambipanner”. This includes a simple audio looper/player and a grid-based ambisonic panner. The panner is an abstraction and contains the ambisonic panning and audio output for B27 internally. See the patch itself for more details.

Screen Shot 2015-03-26 at 4.50.10 PM

Additionally, you might look at the HoaLibrary (High Order Ambisonics Library), available for both PD and Max/MSP here. HOA includes a snazzy interface for both platforms. I have installed the HOA libraries on both platforms so they will work fine in the studios (in PD go to “Help–>PD Browser->hoa.library” to see a tutorial). Note the patch “hoa.2d.decoder~” which uses an ambisonic decoder (see patch below)!

Screen Shot 2015-03-26 at 5.32.55 PM


I thought you might be interested in seeing this implementation of a “PD2Live” interface.

…with tutorial videos at the bottom.

This week, Music 2421

This week we will hold our Tuesday meeting session in Lincoln B21, following through on one further thread in the use and capabilities of PD. On Thursday we will break into your small collaborative groups and I will visit each group individually to get an update on progress as well as making myself available for any questions you might have. See you this week! – KE

Basic OSC routing

Here are two quick and simple OSC routing patches using “localhost” (your own computer) as the IP address. Click “connect” and then you can “send” the message. From there, the received data can be sent [s somename] within PD like any other message.

I have included here two methods for doing the same thing:

1. Using [dumpOSC] with [sendOSC], as we have done in class. This includes using [OSCroute] to parse the incoming streams.

OSC simple example using [dumpOSC]

2. Using [udpreceive] and [udpsend], which can be used to share raw UDP data (Note: this method could be used to receive other kinds of UDP data as well, such as that coming from other network devices or software). The caveat with OSC data streams is they must be packaged as OSC data on the way out with [packOSC] and then unpackaged on the receiving end with [unpack OSC]. This allows the use of more standard PD objects to parse the resulting steam since you don’t need an OSC-specific interpreter. In this example, the object “route” is used, which is a generic PD object for routing data. See its help file (right-click on the object and choose “Help”) for more information.

OSC simple example using [udpreceive]

Patch for class



Class patches and examples

Students of Music 2421, here are some patches from our session the other day:

– Wavetable Synthesis (arrays as storage for “sinesum” functions)

Auto-clave (3 to 2 rhythmic ratio…arrays as storage for audio)

Playing Audio Files (tabplay~, phasor~ as array reader, lineplayer~, etc)

A Gig in Tokyo (Hardoff’s fancy, multi-track auto-DJ application…with performance docs)

More “practical data” examples can be found here … and elsewhere on the web …

UPDATE: One more, the “beat slicing” example a played for you. In class I used the Amen break but here there are some other audio files.

Saariaho patches, download

For students of Music 6421, here is the link to download the Saariaho patches for live performance:

– Saariaho Electronics

Note that this link changed very recently and now does contain the audio itself in the Max patches.

Here are the individual pages (including instructions and program notes) for NoaNoa and Pres:

– NoaNoa Electronics

– Près Electronics

These patches can also be found on the Desktop in B27 inside the folder, “Saariaho”.

The patches themselves are modular and will open in several windows, each a subpatch from the main patch shown in the upper left (labeled “NoaNoa” and “Près”, respectively). To start a patch, look to this main window, setting the MIDI input (if you plan to explore the MIDI device controls and the pedal), hit “init” (to reset everything and raise levels for performance), choose a stereo or quad mix (quad seems to lack the reverb, something I need to diagnose), and set pedal polarity (a pedal can be used in conjunction with the blue fader control (Berhringer BCF2000) on the main desk. There is already a pedal installed under the desk for this purpose.




Max at Seventeen: Miller S. Puckette

Here, for your reading enjoyment, is a history of Max (Max/MSP, PD, JMax, etc) by its original author, Miller S. Puckette.

Max at Seventeen

PureData first sound patch, Music 2421


As a first introduction to PD and as a head-start to Tuesday’s Music 2421 meeting, I would like you to create a simple PD “patch”: two oscillators offset by 3 hertz, creating an interference/beating effect.

Steps for the impatient (TL;DR):

1. Create a new patch (File–>New)
2. Create two oscillator objects: [osc~ 440] and [osc~ 443] (Put–>Object)
3. Create a [dac~] audio output object (Put–>Object)
4. Connect the oscillators to the outputs, one to each of [dac~]’s two inlets
5. Turn on PD’s “DSP” in the PD main window, enabling sound processing

You should now hear two oscillators beating 3 hertz apart.

Detailed instructions:

Open PD and create a new patch (File–>New). You will get a completely blank slate, PD’s default state….ready for us to make anything we can imagine.


Onto this blank canvas, we will place “objects” (things that perform actions, receive data or audio, make calculations, etc), numbers, messages, comments, and graphical objects. By combining the functionality of lower-level objects (such as those that add numbers, generate a signal, or take in audio), we will construct our own musical instruments/tools.

IMPORTANT: When working in PD there are two modes: “Edit Mode” (when you are editing/building the patch) and “Performance Mode” (when you are operating the patch). While working, you will frequently toggle back and forth between these two modes. It is therefore worth, memorizing the keystroke, Command-E (or Ctl-E on Windows).

In Edit Mode, go to the “Put” menu and choose an “object” (note the keystroke as well, Command-1). In the dotted box that appears, type “osc~ 440″(that’s “osc tilde, SPACE, 440) and click anywhere on the patch to “instantiate” the object.


Note: the “~” (tilde) which, looking like a sine tone, designates this as an audio objects. In a minute we’ll see objects without the tilde, those that send/relay/create messages.

Objects like [osc~] have inlets (to receive messages) and outlets (to output their data) or values can be supplied as “arguments”. Here with [osc~ 440], the argument “440” tells the oscillator its frequency.

Even though we don’t hear anything yet, let’s create a second oscillator with a frequency 3 hertz higher than our first, so [osc~ 443].

To hear these sound generating objects, we need an audio output object called [dac~]. By default, [dac~]’s two inlets are speaker outputs 1 and 2 or the LEFT and RIGHT channels.

Your patch should now look like this:


Before the patch can make sound, we have to connect the oscillators to the “dac”. Mouse-over the outlet (black dash at the bottom-left of the object) and connect [osc~440] to the [dac~]’s left-most input (to channel 1, LEFT). Connect [osc~443] to the [dac~]’s right-most input (to channel 2, RIGHT).

Finally (after turning DOWN the volume on your speakers!!), go to PD’s main window and turn on the “DSP”, PD’s way of enabling sound processing.


You should now hear two oscillators beating together at a separation of 3 hertz.

For more fun: here’s a more advanced version (you may need to right-click and choose “Save As…”) that uses the text keyboard to play notes/frequencies. Hit the number keys 0 – 5 to change the interval between the two oscillators and hit any letter key to play a “solo” over this “drone”. I recommend, for once, turning on your CAPS LOCK as the notes will be lower that way. See if you can figure out why!

Skip to toolbar