Pd Lab #2A Travis' Patch

 

Until now, we have been using Pd as a sound generator itself. Now, we are going to use Pd with external sounds like recordings (.wav files) or our own instruments ("plugin"). First of all, we will need to know how to modify some connections.

Connections

 

Start JACK and Pd in the usual way.

Next, click Connect in your JACK Audio Connection Kit.


You can see how Pd inputs and outputs are connected to the audio sound card.


In the terminal, enter:
snd /usr/ccrma/web/html/courses/220a-fall-2007/jukebox/hw1-src-mono.wav jack &


We have opened a soundfile in the powerful snd sound editor tool. If you click the "play" checkbock (lower right), the file will start to play.

You can go to JACK Connections to see where snd shows up:


Now it's time to change the connections, in order to play the soundfile from snd (output), and send it into a Pd patch (input) for audio processing.

1) In the JACK Connections window, click the Disconnect All button and then Yes.


Now it's time to route audio between applications:

2) Under "Readable/Output" click and hold the mouse on "sndlib0";
a patchcord will appear, make a new connection by dragging and dropping on "pure_data" under "Writeable/Input"


3) Under "Readable/Output" click and hold the mouse on "pure_data_0";
a patchcord will appear, make a new connection by dragging and dropping on "alsa_pcm" (output sound card) under "Writeable/Input"


4) Click the Refresh button and close the window

If you listen your sound file again you will realize that now there is not sound coming from your speakers, because the audio player outputs are connected to Pd.

NOW, THE CRUCIAL STEP: Run Pd patch straightWire.

straightWire.pd


The adc~ dac~ objects used in straightWire provide real-time audio input and ouput for Pd (by default they are stereo). Now, if you click on Pd Compute audio you should be listening to the soundfile (remember that your soundfile should be playing in snd).

NOTE: for the assignment, you will do this process but instead of using straightWire, you will use your own sound processing Pd patch based on the "Travis" patches discussed in the next section.

 

The Patch

Now we are going to enjoy the patch that Travis Skare (an undergraduate student) created for one of the homeworks of 220a class at CCRMA some years ago. A general description of the patch by himself:

"This is a pd patch for a 4-track loop-based recording system. There are four tracks of audio, each 16 seconds (8 measures of 4/4 at 120bpm). Each track can be independently armed and recorded to, and these tracks can be set to play every 16 seconds, thereby enabling the performer to provide his/her own backing tracks. In addition, there is an effects / signal processing chain consisting of the following effects: Tremolo, Ring Modulator, Delay, Pitch Shifter and Reverb."

Step by step we are going to see how the different parts of the patch work. The patch is divided in two main parts A) Effects and B) 4-track loop-based recording system.

A) Effects

1. Tremolo

The first effect is the tremolo or vibrato. As you saw in the previous Complex Waves chapter, if one oscillator is tuned under 20Hz the carrier continues being a sine wave with vibrato. In patch#4-1b there is an oscillator at 440Hz. By clicking on Slow vibrato -5 Hz- or Fast vibrato -10 Hz-, the 440 frequency is enriched by slower or faster vibrato. To return to listen the sine wave without vibrato click on the Bang No vibrato -0 Hz-.

travis/patch4-1b.pd


To see how works the effect-tremolo, click on it and a new window -called abstraction- will appear.

travis/effect-trem.pd


Now, instead of a sine wave we can add vibrato to any sound file or instrument we are playing using the adc~ object.

travis/patch4-1c.pd


2. Ring Modulator

Using the same effect but with increased values, instead of vibrato we will obtain a Ring Modulator. Click on Slight, Low, and Crazy Bangs to listen all the different possibilities.

travis/patch4-1d.pd


3. Delay

Using the patch#4-2 you can listen different types of delays. In your left channel the sound is going direct without effect delay and in your right channel the sound can have four different kinds of delay. To return to listen the original sound file without delay click on the first Bang.

travis/patch4-2.pd


For more information click on effect-delay object (remember you can have always help clicking on an object with right click mouse)

travis/effect-delay.pd


4. Pitch shifter called "Harmonizer"

The harmonizer allows to transport your music any interval you want. If you would like to transport to another interval you can just change the values of the messages. An octave is divided in 12 semitones or half tones...so, why don't you try to transport a descending (negative values) perfect fourth?

travis/patch4-3.pd


5. Reverb

You can control the reverb value, the room size, the reverb time...

travis/patch4-4.pd