Computer Audio: Musical Applications of Digital Signal Processing
Music 147 / ICS 180 / ECE 195 / ACE 277

University of California, Irvine
Winter Quarter 2004

Assignments for upcoming class sessions are posted on this page.

For Wednesday, January 14:

Note: This class session and all future sessions will meet in Music and Media Building, Room 216.

Purchase the textbook for the class.

Read the article "Digital Audio" by Christopher Dobrian.

Establish your web page for the course, and send the URL to the professor.

For Wednesday, January 21:

Read the Tutorial for PortAudio if you are programming in C. (If you are programming in Java you should read about the Java Sound API.)

Look at the examples on the professor's page to be sure you understand the ideas demonstrated in class (programming a digital waveform and using a callback function).

Taking the examples shown in class as a starting point, program some improvements or variations. Examples of things you might want to try include:

On your web page, post a paragraph describing what you have programmed, and post a link to the source code. If you are able to post an MP3 file of the sound the program produces, that's great, but it's not required.

For Monday, January 26:

Read chapters 2 and 3 of the textbook.

Download the Pd software for your own computer system, or use the computers in 3151 Engineering Gateway, and try out Pd. To begin learning and experimenting with Pd, you may need to use a combination of sources of information. The HTML documentation found in the folder "doc/1.manual" is a prose overview of the program. This might be helpful to some people, but it's more likely that you'll benefit more from reading this after you've been using Pd for a few days. It's probably best to begin with the folders "doc/2.control.examples" and "doc/". Just open each of the files, read the text in each one and try it out.

Note: Pd is very much like the commercial program Max/MSP. Therefore, in addition to reading the documentation for Pd, you could also learn a bit from the Tutorials that are available for Max and MSP. The Tutorials for Max (the basic control language) are in a file called "Max43TutorialsAndTopics.pdf", and the Tutorials for MSP (the audio processing language) are in a file called "MSP43.pdf". You can download those documents in a .zip archive file. The Max objects look slightly different, and the basic audio oscillator object in MSP is called "cycle~", instead of "osc~" in Pd, etc., but other than this sort of minor differences, the programs are quite similar.

Read chapter 4 and the first half of chapter 5 (thru page 139) of the textbook, focusing particularly on the basic principles of synthesis, addititive synthesis, and simple FM synthesis.

If you have any questions regarding any of the reading, or regarding Pd, post your questions to the class discussion board. (If you don't post any questions, it will be assumed that you've understood it all.)

For Wednesday, January 28:

Build a small program in Pd, including at least an oscillator (osc~ or similar object) going to an amplifier (*~) going to the DAC (dac~), and experiment with using messages (discrete events) and/or signals (continuous audio rate stream) to modify the amplitude and frequency of the sound. For example:

For a list of all the objects you can use in Pd, see the text file, "0.INTRO.txt" in the directory, "../5.reference". You can also take a look at the example patch from the 01/26/04 class, to get you started.

You are not required to post your program on the web or hand it in, but be sure to do it! The point is to become accustomed to working in Pd, thinking in Pd's event-based way of working, strategizing how to organize a Pd patch, and learning the names and workings of the most useful objects. If you don't get started familiarizing yourself with Pd now, you'll feel behind in future assignments. Use the help files and tutorials to learn how objects work, and to learn about more objects.

If questions arise for which you cannot find the answer, post your questions to the class discussion board, and/or bring your questions to class.

For Monday, February 2:

Using Pd, construct two programs that synthesize tones, using one or more of the synthesis techniques discussed in the textbook (and in class).

The first program should attempt to emulate a real acoustic instrument such as a trumpet, a bell, etc. as realistically as possible, and should play a short melody on it. For example, you might choose to emulate a trumpet and play the introduction to Mussorgsky's/Ravel's "Pictures at an Exhibition". The textbook gives some information by Risset about synthesis of bell-like tones using addition of sine tones, and it gives some suggestions by Chowning regarding FM synthesis of various instrumental tones. That information might prove useful in developing a realistic instrument sound.

The second program should be some other kind of sound (it doesn't need to sound "realistic") that does something normal instruments can't usually do (for example, extreme modulation of frequency or amplitude, extremely wide or fast pitch changes, etc.).

Thus, the first program should be quite specific in attempting to play a recognizable melody with a realistic timbre. The second program is more open to your imagination and creativity; just try to make a sound you find interesting and/or pleasing, and strive to understand how it is working (what the effect is of each object in your patch).

On your web page, post a prose description of what you have done, and post links to the actual .pd (plain text) files. If you can post links to .jpg screenshots of your Pd patch(es), that is also helpful, since it's usually possible to see how the patch works (and find problems) even before downloading and running it.

For Wednesday, February 4:

Extension of deadline for the February 2 assignment.

For Monday, February 9:

Read section 10.2 of the textbook, on localization of sound.

Using the examples given in class (which can be found on the professor's research page), experiment with moving a sound to different "virtual" (i.e., simulated) locations in the stereo field, using changes in over-all intensity, speaker balance, and/or delay. For example, you might use line segments (line~ or vline~) to make changes, or you might use a cyclical waveform (such as a sinusoid) as a control function, or you might use a stored "path" in an array. You are not required to post your results on your web site, but you're welcome to do so for "extra credit". That is, you will not be graded down for not posting anything, but you can gain extra credit (equivalent to raising past grades) if you post an example that demonstrates imaginative exploration of the topic or just sheer diligent effort. Post a prose description of what you have done, and the .pd file(s). If it's practical, also post a .jpg of your program and an MP3 file of the sound it produces.

Read the following other sections in the textbook: 10.1, 6.11, and 6.12 (probably best done in that order).

For Wednesday, February 18:

Prepare to discuss your proposed final research project. The final project should be an article of roughly 2000-3000 words (similar to an article that would be published in Computer Music Journal or similar journal) focusing on one (small and specific) topic in computer audio processing that is of personal interest to you, such as a particular synthesis technique, an audio effects processing technique, spatialization technique, filter design, reverberation, etc. Your project will ideally also include some programming example that demonstrates your research findings, but depending on your topic this may not be essential. Do some preliminary research on your topic, try to narrow it down to a manageable scope, and write up one or two brief proposals. If you post your proposal(s) on your web site by the end of the day on Monday, Feb. 16, I will be able to read them before Wednesday's class, to be prepared for the discussion.

Read all of chapter 6 (subtractive synthesis and digital filters), and sections 12.1 to 12.3 (interactive performance and MIDI). (N.B. the information about ZIPI at the end of section 12.3 is pretty much obsolete, I think.)

Experiment with digital filtering in one of the following ways (these suggestions are of increasing level of difficulty). Write a Pd program that uses one of the filtering objects such as lop~, hip~, or biquad~ to filter a sound source such as noise~, phasor~, or a sound file; use a control function such as an envelope or a low-frequency oscillator to vary the filter's parameters over time to create an interesting sound. Implement one of the filters described in chapter 6 of the textbook, probably using fexpr~, and use it to filter a sound source. Implement a filter in C with PortAudio or the Java Sound API that modifies a sound file, or that modifies input and sends it to the output. (If you write a program that goes input->filter->output, you'll probably want to test it by playing a CD or other sound source into your computer and listening to the output. If you use a microphone as input, it will be hard to hear your results objectively.) Implement a filter as a Pd object or Max/MSP object that you write in C. (This requires studying the software development documentation that can be found online.) The point of this assignment is to a) experience the sonic effect of one or more filters firsthand and b) test your understanding of the digital filter equation by trying to implement an equation yourself. You need not post this on your web site by Wednesday, but you're welcome to do so for extra credit if you would like.

For Monday, February 23:

Download the demo of the program and the documentation for Max/MSP from (for Windows) or (for Macintosh). Read as much as possible of the MSP Manual (MSP43.pdf).

The beginning of that manual is the "Digital Audio" article that you've already read as the first reading assignment for this class. After that is a chapter on Audio I/O that is mostly about how to set up Max/MSP properly on your computer. (Just read as much of that as you need to.) The tutorial chapters are ordered in such a way as to introduce concepts and objects in a progressive manner, so it's best to start at the beginning of the tutorial, but you're also welcome to skip around to topics that interest you the most. Read (and try out the accompanying programs for) as many of the MSP Tutorial chapters as you can. If you have questions about other Max objects, you will find information in Max43Reference.pdf and Max43TutorialsAndTopics.pdf.

For Monday, March 1:

Read section 5.2 of the textbook. Review the example of waveshaping that I showed in class. Read MSP Tutorial 12 in MSP43.pdf, and try out the accompanying tutorial patch. That combination of study should help you understand transfer functions and waveshaping.

In Max/MSP, program an effective gate for suppressing a signal entirely when it is below a given amplitude threshold and, conversely, letting it through unaltered when it is above a certain threshold. Note that you will need to specify a "fade time" during which the signal is turned up and down, because instantaneously turning it on and off would cause clicks.

For testing your program, use a soundfile that contains some not-so-silent silence (low-level noise only) as well as some coherent sound with a quite variable amplitude. For example, you might use a recording of someone talking in a crowded room, or a similar sound source. Play this soundfile with sfplay~ and run it through your gate to see how well your gate works. If your gate seems unsatisfactory, analyze its shortcomings and try to devise and implement solutions.

One reason for this assignment is to help you gain familiarity with Max/MSP and its objects. Use the Max Reference and MSP manuals a lot. One helpful section of each of those manuals is the Max Object Thesaurus and the MSP Object Thesaurus. These sections are alphabetized by keyword, and direct you to the object names that are most likely relevant. You can then look up those object names in the object reference section. Also, remember that you can just use the index, and/or use the "Find..." command in your PDF reader application.

Possible extensions of the assignment:

a) Encapsulate your object with inlets and outlets (Max/MSP has specific graphic objects for these), for use as a subpatch that could be applied in any signal-gating situation.

b) Allow a user to specify threshold level and fade time. What is the best way to give the user that ability?

c) You might find that in some cases it's appropriate to have separate fade times and/or thresholds for attack and release (i.e., for when you turn up and when you turn down). Try implementing such a feature.

d) Make your gate more general, so that instead of a signal gating itself, you could also gate one signal with the amplitude envelope of another signal.

e) In addition to a gating threshold, you could have a compression threshold above which you let the signal through with only moderate attenuation.

f) Set a maximum limit for the signal's amplitude, and turn it down commensurately as it approaches that limit.

(Suggestions e and f are not trivial to implement, so don't be frustrated if the search for a solution confounds you.)

g) etc.

Post a link to your program, along with a descriptive paragraph of what you tried to do and how you did it, on your web page.

For Wednesday, March 3:

Read sections 7.2 and 7.3 of the textbook, regarding the Fourier transform.

For Monday, March 8:

Study MSP Tutorials 25 and 26, regarding implementation of Fourier analysis and resynthesis in MSP.

Read sections 8 to 8.4 of the textbook, regarding granular synthesis.

For Wednesday, March 10:

Post a draft of your project on your web site. If your paper requires graphic examples, you will need to post your article in HTML or post a link to a document in .doc or .pdf format. It is also acceptable to turn in hard copy of your paper.

For Monday, March 15:

Prepare a very brief (5-8 minutes) overview and explanation of your final project. Rehearse it, to be sure that you can really do it effectively in the allotted time. Class presentations will be given Monday and Wednesday of this week, but you must be ready to present by Monday.

For Wednesday, March 17:

Review all the readings, lecture notes, and software examples from the quarter. Prepare questions you want to ask about concepts in class and/or in the textbook that you do not fully understand.

This page was last modified on March 3, 2004.
Christopher Dobrian