Computer Audio and Music Programming
Music 147 / ICS 180 / ECE 195 / Music 215 / ACE 277

University of California, Irvine
Winter Quarter 2006

Assignments for upcoming class sessions are posted on this page.

For Monday, March 13:

Post on your website an "interim report" on your term project. This will include: your original proposal, a progress report as of the end of the ninth week of classes including what you have done and what you still intend/need to do, and any example files you want to post that show your work in progress. You will be graded on the existence of your report (i.e., how well you actually fulfilled this interim report assignment), but you will not be graded on how fully developed your actual project is at this time. This interim report is primarily intended to a) oblige you to assess your own progress and b) give the professor and TA an idea of how we can best help you get a good project done. If you are working in a collaborative team, the report need be posted on only one website; other members of the team can just create a link to the page where the report can be found.

Read the "OctiMax Compression Tutorial" by Peter Elsea. You can find it in the Documentation folder of Max 4.5 (OctiMaxCompressionTutorial.pdf) or download it directly from the web. The goal of this reading is not so much to learn to use the OctiMax compression objects in MSP, but rather to get a better understanding of dynamic processing such as compression, gating, and limiting.

Read Programming New Realtime DSP Possibilities with MSP (1999) by Dobrian.

Read Strategies for Continuous Pitch and Amplitude Tracking in Realtime Interactive Improvisation Software (.pdf format) (2004) by Dobrian.

Listen to the two pieces by Dobrian that will be the primary topic of Monday's lecture: Insta-pene-playtion for computer-processed flute, and Mannam (Encounter) for daegeum (Korean bamboo flute) and computer.

Study all of the material presented up to this point in the quarter, and come to class with questions you have about anything you do not understand well.

A summmary of final exam topics is posted online. Note that this is representative of some of the topics that might be covered on the exam, but it is not intended as a comprehensive listing of final exam topics. The final exam might include topics from the first half of the quarter (i.e., midterm exam topics), as well as any other topics covered in the lectures and readings.

For Wednesday, March 8:

Reading for the lecture: Read pages 390-397 of the textbook, on "Basic Concepts of Signal Processing: Dynamic Range Processing".

To whatever extent you have C programming skills, try to implement a C program that either generates a sound or modifies a sound. The sophistication of what different students do could vary enormously based on your skills. Here are some examples of things you might try, going from easiest to more difficult:

To do actual input and/or output of audio on your computer, you will need to familiarize yourself with the PortAudio libraries for C programming of audio I/O. These libraries work for audio input/output on almost all major operating systems, with most major compilers (e.g., Visual Studio on Windows, Xcode on OS X, CodeWarrior on either platform, etc.). You can download these libraries to your own computer from the PortAudio download page. Included with the PortAudio package are documentation, tutorials, and examples that will help you understand how to use PortAudio.

PortAudio is already installed in the ITC Lab which is located in SST120 (Social Science Tower), for use with the Visual Studio programming environment. The PortAudio libraries on those computers are located at "c:\apps\portaudio".

If you have a Macintosh, you probably have the Xcode programming environment on the Developer disk that came with your computer (although you likely never installed that stuff). If you are using Windows, and don't have Visual Studio, you can download a free copy of Microsoft Visual C++ 2005 Express (then install PortAudio with that).

If you can't program in C, and can program in Java, you should familiarize yourself with the Java Sound API, which you can read about at the sound API page of Sun's Java web site. The Java Sound API has not been (and will not be) covered specifically in class, but it addresses the same general issues of file and stream I/O for audio, and there are many examples on the web that can help you.

It is also possible to use Java to program your own Max or MSP object. What you actually do is write a Java program (according to some conventions that are described in the document "WritingMaxExternalsInJava.pdf", located in the "java-doc" folder inside the Max application folder) and compile that as a .class file, then load that into Max using the mxj (or mxj~) object.

To program a Max or MSP object in C, you will need to download and read the Max Software Developer Kit, located on the Cycling '74 product documentation page.

On your website, post your source code (.c file), the executable file (.exe, .app, etc.), and a brief description of what you were trying to do and how you did it.

For Monday, March 6:

Read "Fourier Analysis", Appendix of the textbook, pp. 1073-1112.

Read the first part of "Spectrum Analysis" Part IV, chapter 13 in the textbook, pp. 533-577.

Read the online document (in PDF format) "Fourier Notes (.pdf)" by Peter Elsea.

Study MSP Tutorials 25 (Using the FFT) and 26 (Frequency Domain Signal Processing with pfft~).

For Wednesday, March 1:

Experiment with the sonic effect of one or more types of filter by feeding a sound (such as a pre-recorded sound file) into a filter object (such as lores~ or reson~ or comb~ or biquad~ or filtercoeff~ or onepole~ or svf~ or fffb~ or buffir~), and using a control signal (such as line~ or cycle~ or phasor~, or any other source) to vary some parameter of the filter (such as center frequency, Q, etc.). You can also consider using the delay objects (delay~, or tapin~ and tapout~) to construct your own delay/filter (such as flanging, chorusing, or a filter of your own design).

The goal of the assignment is a) to learn more about how different filters sound, and what are effective center frequency and Q settings, and b) to make an intriguing sound with a dynamically controlled filter.

If you want to read more about the filter objects that are available in Max/MSP, I suggest Max and Filters (.pdf) by Peter Elsea of UC Santa Cruz.

Post a plain text version of your patch on your web site, accompanied by a written description of what you were trying to achieve and how it works. If your patch requires a specific .aiff or .wav file in order to produce the sound you want, post that (small) soundfile as well, and include a link to it.

On the professor's page there are now a few examples to get you started. (Your patch should not be too closely identical to these, or at least should include some substantial improvement or elaboration.)

For Monday, February 27:

The topic of the lecture will be filters and subtractive synthesis.

Read the section on Digital Filters in the textbook, pages 397-419.

Study MSP Tutorials 27 through 31 (delay, delay with feedback, flange, chorus, and comb filtering).

For Wednesday, February 22:

Hand in a brief description, written in conjunction with your design team partner(s), of your intended design/implementation programming project. This initial description should be just a few paragraphs explaining what you want the program to do, what you think you will need to learn or research to write it, a general plan for designing and implementing it, and how duties will be allocated among the team members. (The project can be an application written in Max/MSP, or an application written in C or Java, or an MSP external object written in C or Java. The finished project should perform at least one useful audio and/or music function, have a sensible interface, and be well documented with a brief manual-like explanatory article.)

The topic of the lecture will be spatialization and reverberation.

Read "What is Ampitude?" by Jeffrey Hass.

Read "Sound Spatialization and Reverberation" by Curtis Roads in the textbook, part III, chapter 11, pp. 449-484.

Read "MIDI Panning", MSP Tutorial 22, in MSP Tutorials and Topics, pp. 178-184, and study the accompanying Max/MSP program in the Tutorial Patches folder.

Read "Psychoacoustics in Computer Music" by John W. Gordon in the textbook, part VII, chapter 23, pp. 1053-1069.

Monday, February 20:

Holiday. No class meeting.

Wednesday, February 15:

If possible, attend the lecture on computer music by David Kim-Boyle, 10:30-11:50 in Room 216 of the Music and Media Building.

Attend the lecture on new music for clarinet and computer, 1:30-2:50 pm, in Winifred Smith Hall.

Attend the concert of new music for clarinet and computer, 8:00 pm, in Winifred Smith Hall. (Free)

Tuesday, February 14:

If possible, attend the lecture on computer music by William Kleinsasser, 12:00-1:15 in Room 216 of the Music and Media Building.

For Monday, February 13:

Study all of the material presented up to this point, in preparation for the midterm exam.

For Wednesday, February 8:

In the textbook, read pages 252-258 on waveshaping. Study MSP tutorial 12, "Waveshaping".

Review all of the material discussed up to this point, and come to class with questions about things you feel you don't completely understand. Some of the topics include:

For Monday, February 6:

Read about MIDI in UCSC electronic music instructor Peter Elsea's article on MIDI, and on the "Exploring MIDI" website at Northwestern University, and in the textbook (part 6, chapter 10). These three articles discuss the same topic, at three different levels of technicality, so it is suggested that you read them in the order they are listed here.

Make a Max/MSP program that synthesizes a sound using one of the techniques described in class: additive synthesis, amplitude modulation, or frequency modulation. Try to make a sound that resembles some known acoustic instrument. (You can make another version that makes a more bizarre sound if you'd like, but the assignment here is to try to emulate some real instrument sound.) Write a part of your program that automatically plays a short tune on the instrument. There are many ways to automatically play a tune in Max: you can play a MIDI file with the seq object, you can look up pitches (and velocities and durations) in table object(s) or a coll object, triggered by a metro -> counter combination, or you can try some other way of generating pitch numbers with counter, or some mathematical formula, or tempo, or line, or ... . (You can do this most easily by sending pitch numbers to the mtof object to translate the pitch into a frequency value.) This is not an easy assignment, so don't leave it till the night before it's due.

For Wednesday, February 1:

Read about modulation synthesis (part II, chapter 6) in the textbook, specifically pages 215-239. (Read on further if you'd like, of course.)

To supplement that reading and to see how it is implemented in Max/MSP, study MSP tutorials 8, 9, 10, and 11. Read the relevant chapters in the "MSP Tutorials and Topics" PDF file, and at the same time try out the Max/MSP patches in the "MSP Tutorials file".

To learn more about the MSP objects for doing sampling synthesis, study MSP tutorials 13, 14, and 15.

For Monday, January 30:

In the textbook, read pages 84-85 "Overview to Part II" (sound synthesis), one paragraph on page 89 "The Unit Generator Concept" (a conceptual description of MSP objects), pages 90-98 on waveform synthesis (the graphic notation for synthesis instruments looks a bit different than the way a network of objects looks in MSP, but it is conceptually identical), pages 117-128 on sampling synthesis (use of digitally recorded sounds to construct a computer instrument), and pages 134-144 on additive synthesis (combining simple tones to make a complex tone).

To supplement that reading and to see how it is implemented in Max/MSP, study MSP tutorials 3, 7, 8, 9, and 10. Read the relevant chapters in the "MSP Tutorials and Topics" PDF file, and at the same time try out the Max/MSP patches in the "MSP Tutorials file". (All that stuff is in the Documentation folder within the MaxMSP application folder.)

If you want to look ahead to more stuff, in preparation for the following week, you can also do MSP tutorials 13, 14, and 15.

For Wednesday, January 25:

Read about musical tuning and musical scales, beginning with the Wikipedia article on "Mathematics of musical scales". Follow the available links to any words of which you are unsure of the meaning (such as "octave", "just intonation", etc.). Another Wikipedia article that might be helpful to you is the one on "musical tuning".

The web is full of information on musical tuning and musical scales, written at lots of different levels of technicality and focusing on different aspects. Since everyone in the class has a different level of prior knowledge of music terminology, scales, and tuning, you should try to find reading that is written at a level and focus most useful to you. The objective is to understand the relationship between frequency and pitch, and such terms as octave, pythagorean tuning, just intonation, temperament, equal temperament, and some of the names given to different intervals (perfect fifth, major third, minor second, etc.). (If you have no training in music, the names of intervals will seem pretty mysterious to you. In that case, just do your best to at least understand the octave and perfect fifth, and if you can memorize more than that by rote, so much the better.)

There is no specific assignment in Max/MSP for this date, but if you want to try making a Max/MSP program that allows you to define different musical intervals, scales, or tunings, just as a way of exploring and learning, that's great!

For Monday, January 23:

Make an MSP program that generates a sound (plays a sound from a file, plays sound from a RAM buffer, or synthesizes a sound from a tone-generating object), and that uses a control signal to modify that sound continuously (and automatically). Your program should also include some user interface that allows you to change the control signal, to change its effect.

Post your completed program as a plain text file (.txt) on your web site, and put a link to that file on your web page, along with a brief description of what you intend the program to do, how it works, and any other considerations you took into account when making it.

In doing this assignment it will be particularly useful for you to do MSP Tutorials 2, 3, and 6, and to take a look at the example file speedchange.txt on the page of examples from the COSMOS 2005 summer class.

For Wednesday, January 18:

Begin working with the Max/MSP programming environment. You can download Max/MSP to your own computer, or work in the Arts Media Center (Mac) or NACS Lab B (Windows).

Taking the professor's class examples as a starting point, build a small Max/MSP program that either generates sound or plays back recorded sound, and has some onscreen control(s) that allow you to alter the sound. Some examples might be: mixing sounds together with control over the balance of the sound, dynamically altering the speed/pitch of the sound and/or the loudness of the sound, playing a sound repeatedly at a controllable rate, etc. Use your imagination and try to implement your ideas.

The result should be a single Max/MSP program that allows the user to perform a task for playing/altering some type of sound. (But if you have a more complicated idea and are able to accomplish it, go right ahead!) Save the file as plain text (choose Save As... from the File menu, specify Text as the file format, and end the file name with ".txt"), upload that text file to your web site, and put an obvious link to that file on your web page, accompanied by a description of the program, a description of what it does, and any other information you want to include. If you want to put a graphic picture ("screenshot") of your program on your site as a JPG file, in addition to the text file, go right ahead. (Experienced Max/MSP programmers can often tell what a program will do just by looking at it.)

The most accessible source of instruction in Max/MSP is the set of Tutorials ("Max Tutorials and Topics" and "MSP Tutorials and Topics") included in the product Documentation as PDF files with example programs (or downloadable separately). You are encouraged to work through these tutorials - as many as possible - on your own. Tutorials that are specific to this assignment are MSP Tutorials 1, 2, 7, and 16. For basic instruction in how Max works, look at Max Tutorials 1, 2, 4, 7, 10, and 15.

Remember that you can get quick help on any Max/MSP object by option clicking (alt-clicking) on the object. You can also find out which object might be appropriate to any given task by looking up a relevant key word in the Max Object Thesaurus or MSP Object Thesaurus at the back of the Max Reference Manual or the MSP Reference Manual.

You can also post questions and ideas on the class NoteBoard.

Monday, January 16:

Holiday. No class meeting.

For Wednesday, January 11:

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

Read the article "Digital Audio" by Christopher Dobrian.

Establish your web page for the course, and send the URL to the professor. UCI provides Web space for you to establish your own website at, or you can use any other Web space that is available to you. Wherever your site is hosted, you should create a page that is specifically devoted to this course.

This page was last modified on March 8, 2006.
Christopher Dobrian