PureData first sound patch, Music 2421

PD INSTALLATION INSTRUCTIONS –>

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
(LOWER DOWN YOUR SPEAKERS!!)
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.

pd_window

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.

put

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:

twoosc

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.

connect

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!

Comments are closed.

Post Navigation

Skip to toolbar