220a, Fall 2008 | Homework Assignment #2
PD effects-loops-layers

First, check out PD lab #1
Continue with Lab#2A and Lab#2B

IMPORTANT: Pd patch files which you'll need to access for the above labs and the homework are grouped in a new Pd sources directory: (below the first one)

(from outside via web) ccrma.stanford.edu/courses/220a-fall-2008/pd/travis

(from inside via file system)/usr/ccrma/web/html/courses/220a-fall-2008/pd/travis

Follow the instructions for turning in homework online. There's a specific format so that files can be seen by the world via the homework factory.

Every time that the factory is viewed by a web browser it will check for the existence of for example, the first assignment, by looking for a file under each student's home directory (where ~ is Unix shorthand for user's home e.g., ~cc equals my CCRMA home directory, /user/c/cc).



Assignment #2

The assignment is to create a demo based on the Travis patches using prescribed source material.

In a nutshell, what we're doing is playing a source soundfile using snd, sending it into a Pd patch (the "Travis" a.pd patch) for audio processing, then sending the Pd output to be recorded into Audacity to make a .wav soundfile.

Part of this process is routing data from one application to another using JACK as the connection hub, and checking settings to make sure the applications know where to send and receive data.

The demo file you make should have a duration between 90 to 120 secs in its final form.


Like all future work, the soundfile linked to the above file pathname should be

file format: .wav

sample rate: 48kHz

resolution: 16-bit

channels (unless otherwise specified): 2 (stereo)


The sound source for the demo is:


NOTE: this is a mono (one-channel) audio file, sampled at 48 kHz.


Play the source soundfile using snd, process it in your Pd patch, and record the result into Audacity, where you can edit different takes into the form required by the assignment.

Here's how:

Since the source soundfile is sampled at 48k, to prevent sampling rate conflicts among all the applications, we'll make sure the soundcard is also set to 48k.

In a terminal, navigate to your usual Pd directory, then type:

envy24control &

The Envy24 Control Utility opens.

1) click on the "Hardware Settings" tab
2) under "Master Clock", select "Int 48000"
3) close the window

Back in the terminal, start JACK in the usual way.

Next, start snd and load the soundfile:

snd /usr/ccrma/web/html/courses/220a-fall-2008/jukebox/hw1-src-mono.wav &

Start Pd and test it with your noise~ to dac~ patch.

Go to the JACK control panel and click on the Connect button.

The JACK Connections window opens.

1) click the Disconnect All button and Yes.

Back in the terminal, start Audacity:

audacity &

1) go to Edit menu - Preferences, then select "Audio I/O" in the left menu
2) under "Playback", select "JACK . . . alsa pcm" device
3) under "Recording", select "JACK . . . pure_data" device
4) select "Quality" in the left menu
5) under "Sample Rate" select "48000"
6) select "File Formats" in the left menu
7) under " Uncompressed Export Format" select "WAV (Microsoft 16 bit PCM)" (leave the other fields alone)
8) click the OK button

Go back to the JACK Connections; it's time to route audio between applications:

1) 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"
2) 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" (into Audacity) under "Writeable/Input"
3) click the Refresh button 4) close the window

Go back to Pd, load your sound processing patch (IMPORTANT: this the Travis a.pd patch introduced in Lab#2A and Lab#2B), and run it (compute audio).

Go back to Audacity and click on the RECORD button (red circle at the end of the graphical transport section, top left).

Go back to snd and click on the PLAY checkbox (lower right).

Go back to Audacity and monitor the progress of the recording using the input meters (center top) and also watch the waveform display.

Stop recording, REWIND, test the playback and then export the recording with the menu command: File: Export As WAV; save the file.

Quit Audacity without saving the project, relaunch it and see that all the presets above have been kept (they should have been).

Bring in the just-created .wav file with File: Open

There are two forms for your Audacity work: tracks saved as .wav and entire projects saved as .aup files. Source clips and final products are in the former format and edit sessions that are in progress are in the latter.

Use the usual mouse and cut/copy/paste commands to select, trim and position clips. Multiple layers are automatically mixed to 2 channels for previewing and export. Practice with it to get a feel for editing and mixing. See the Help menu for questions, overall it's rather intuitive and a pretty useful kitchen knife.

Now, about that 90-120 sec demo:

We're calling the expected form Melody / Rhythm / Polyphony (with apologies to Luigi Nono and his 1951 composition for woodwinds, percussion and piano Polifonica / Monodia / Ritmica). Accordingly, work your demo in three sections using transformations explored in Travis's patches.

1: Single-voice melody in the first section, create some kind of tune or melodic effect

2: Rhythm in the second section means getting the source material to loop, recur, in a beat-oriented, or metrical way

3: Polyphony is multiple musical layers i.e., simultaneous voices or tracks, which can be more or less coordinated or independent of each other and can be doing anything you invent

Decide whether the transitions between sections will be smooth or surprising, as you wish. Please restrict yourself to the source material in:


. . . and let's see what we get. Think about filling out the spectrum, bass to treble over the course of the demo. Pitches from the basement to the top, and timbres that are deep or strident. Also, keep an eye on the final amplitude range. It should average in the middle of the range and never get so strong that it clips (distorts) the waveform.