Programming examples for the class
Music 215A: Computer Music Composition and Production - Fall 2016
University of California, Irvine
This page contains examples and explanations of techniques of computer music programming using Max.
The examples were written for use by students in the Computer Music Composition and Production course at UCI, and are made available on the WWW for all interested Max/MSP/Jitter users and instructors. If you use the text or examples provided here, please give due credit to the author, Christopher Dobrian.
Examples from previous classes are also available on the Web:
Examples from Music 147, spring 2016
Examples from Music 215B, winter 2016
Examples from Music 152/215, winter 2015
Examples from Music 152/215, spring 2014
Examples from Music 147, spring 2014
Examples from Music 152/215, spring 2013
Examples from Music 215, spring 2012
Examples from Music 152/215, winter 2012
Examples from Music 152/215, winter 2011
Examples from Music 152/215, spring 2010
Examples from Music 152/215, spring 2009
Examples from Music 152/215, spring 2007
Examples from Music 147, winter 2007
Examples from Music 152/215, spring 2006
Examples from COSMOS, summer 2005
Examples from Music 152/215, spring 2005
MSP examples from Music 152, spring 2004
Jitter examples from Music 152, spring 2004
While not specifically intended to teach Max programming, each chapter of Christopher Dobrian's algorithmic composition blog contains a Max program demonstrating the chapter's topic, many of which address fundamental concepts in programming algorithmic music and media composition.
Please note that all the examples from the years prior to 2009 are designed for versions of Max prior to Max 5. Therefore, when opened in Max 5 or 6 they may not appear quite as they were originally designed (and as they are depicted), and they may employ some techniques that seem antiquated or obsolete due to new features introduced in Max 5 or Max 6. However, they should all still work correctly.
[Each image below is linked to a file of JSON code containing the actual Max patch.
Right-click on an image to download the .maxpat file directly to disk, which you can then open in Max.]
Examples will be added after each class session.
Example 1: Open a sound file and play it
This simple program for playing a sound file is explained on a previous class example page.
Example 2: Trigger notes with metro
This program triggers a sound repeatedly, and changes its rate with each repetition. The sound file is so short that there's really no need to turn it off with a 0, so we just start it with a 1. The rate is calculated so as to cause a random transposition from -12 to +12 equal-tempered semitones, using the twelfth root of 2; the number of semitones (x) of transposition is determined by setting the rate to "2 to the x/12 power".
This page was last modified October 8, 2016.
Christopher Dobrian, email@example.com