Pure data (Mike Blow)

Pd (aka Pure Data) is a real-time graphical programming environment for audio, video, and graphical processing. It is the third major branch of the family of patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax, etc). Use pd-extended.

“Pd was created to explore ideas of how to further refine the Max paradigm with the core ideas of allowing data to be treated in a more open-ended way and opening it up to applications outside of audio and MIDI, such as graphics and video.”

Wav sample files emailed to self.

  • Open pd, create new file, save in same place as the wav files. This file is where you create your patch.
  • Go to Put menu, scroll to Object (or use shortcut). Click, place in your white box and type dac~ 1 2 (classic stereo, two channels) in the little dotted box that appears. Command E – box should then go solid (turns edit mode on/off). Dac means digital to analogue converter. This turns the digital signal of your mac into an analogue signal that you can hear. ~ denotes an audio stream. Numbers are the number of channels. For surround sound, you would write dac~ 1 2 3 4 (or more).
  • New object, type readsf~. Command-E turns box solid.
  • Right-click on this object (or Control-click), to open a context-sensitive help file.
  • There are two modes, edit mode and run mode – you switch between them using Command-E.
  • Go to edit mode within the help file (Command-E). Now you can copy things. Select what you want by click and drag (turns blue), and use Command-C to copy.
  • Go back to your patch, paste what you copied from the help file (using Command-V) into the patch file you are creating.
  • Delete the little box that says print. Change the text in the readsf box to readsf~ 2. Delete the second Open box. Select the other one (turns blue) and change the text within it to open card0.wav. If you want to, you can delete the boxes that say start and stop, as they are synonymous with the boxes that say 1 and 0.
  • Select and move the 1 and 0 boxes up to the right to make space.
  • When you hover over an output box (like readsf~ 2), cursor changes to a black circle. If you drag this, you get a line. Drag this line to another box, and you get another black circle. This is how you can connect the objects. Draw two lines from readsf~ 2 to dac~ 1 2 – one from the left and the middle connection point on readsf~ 2, to each corner of dac~ 1 2 (i.e. to each of the two stereo channels).
  • New object; type delay 2000. This means a delay of 2 seconds.
  • Connect delay 2000 with 1 by drawing a line.
  • New object, a Bang. This is a start button.
  • Connect the Bang to open card0.wav and to delay 2000 by drawing two lines, one to each.
  • Go to Run mode
  • Pd-extended > Preferences: Go to Audio Settings. Check you have Built-in Output selected > Apply > OK.
  • Media > Audio ON
  • Now the audio file should play, after a slight delay, when you click the Bang button.
  • Select everything except dac~ 1 2 by dragging a box over it, duplicate by using Command-D, drag to right of page.
  • Change the name of the sound file in this duplicate to card1.wav (open card1.wav.
  • Connect this second readsf~ 2 box with dac~ 1 2 by drawing two lines from two of the connecting points to each of the corners of the dac~ 1 2.
  • Now, connect open card0.wav to a connection point on the readsf~ 2 box in that first section, and then continue that line up to the 1 box in the same section.
  • Repeat in the second section; draw a line from open card1.wav to readsf~ 2 in that section, continue line from that point up to 1 in that section.
  • This action makes the sound files loop, without the initial 2 second delay.
  • Now delete the second Bang, and draw lines from the first one to the second section: open card1.wav, and delay 2000.
  • Delete the lines going to dac~ 1 2.
  • Put a new object on the patch, type *~. * means multiply, ~ denotes an audio stream as before.
  • Select the *~ object and duplicate (Command-D) 3 times = 4 objects in total.
  • Draw two lines from first readsf~ 2 to two of the *~ objects. Do the same on the other side, two lines from the second readsf~ 2 to the remaining two *~ objects.
  • Draw two lines from one of the *~ objects on each side to the same point on one of the corners on the dac~ 1 2 object. Connect the other two (one on each side) *~ objects to the same point on the other corner of the dac~ 1 2 object.
  • Put > Vslider. Right-click on slider > Properties, change top value from 127 to 1. Apply > OK. Draw connections from the bottom of the slider to the two *~ objects on the first side.
  • Now delete the Vslider. Put > Hslider. Right-click on slider > Properties, change left value to 1, right value to 2. Apply > OK. Add new object, type – 2. Duplicate object, change value to – 1. Put another object, type * -1. Put > Number, put this object under the * -1 object, then duplicate it. This gives you two number boxes (see below).
  • Connect the Hslider with two lines to – 2 and – 1. Then connect the – 2 object to the * -1, and the * -1 object to the first number object. Connect the – 1 object to the second number object.
  • Connect the first number object to the two *~ objects on the left side, and the second number object to the two *~ objects on the right side.
  • Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: