This page contains links to programming examples for: Music 152: Interactive Arts Programming and Music 215: Seminar in Music Technology — Winter 2015 at the University of California, Irvine. The examples focus on techniques of interactive arts programming using Max. The examples were written to be used by students of 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. The page of Max examples from the 2013 class also includes links to the examples from prior years’ classes, totaling hundreds of examples in all. All previous years’ class examples, as well as many more examples I’ve posted on the Cycling ’74 Max forum, are slowly being collected into a single WordPress website (in progress, completion date unknown).

Max Examples

Examples are added after each class session.

[Each link below will lead to a blog post containing a Max patch and explanatory text. The Max patch image is linked to a file of JSON code containing the actual Max patch. Click on the image to get the .maxpat file, which you can download directly to disk and then open in Max.]

Example 1: Open a soundfile and play it
Example 2: Preload and play sound cues
Example 3: Using Presentation Mode
Example 4: Trigger sound cues from the computer keyboard
Example 5: Trigger sound cues with the mouse or from the computer keyboard
Example 6: Int and float
Example 7: Flashing picture as a button
Example 8: The ‘alpha’ attribute of a picture
Example 9: Hide or show an object
Example 10: Scale and offset
Example 11: Vibrato
Example 12: Counting and stopping
Example 13: Ways to turn MSP on and off
Example 14: Arpeggiate the harmonic series
Example 15: Very low frequency modulation for gradual change
Example 16: Stack overflow
Example 17: Interference between sound waves
Example 18: The patcher object encapsulates a subpatch
Example 19: Using the metro object controlled by the transport
Example 20: Timepoints
Example 21: Conditional timepoint
Example 22: Sample and hold
Example 23: Snapshot of a signal
Example 24: Conversion between pitch and frequency
Example 25: Pseudo-random numbers appear random
Example 26: Detect when a movie has been read successfully
Example 27: Some useful Jitter attributes
Example 28: Mixing and crossfading
Example 29: Video crossfade
Example 30: RGB color
Example 31: Draw shapes and text
Example 32: Animating 2D graphics
Example 33: Write subtitles onto a video
Example 34: Audio in RAM — buffer~ and related objects
Example 35: Playing a sample from RAM
Example 36: Linear vs. exponential audio fade
Example 37: Exponential video fade
Example 38: Half speed and double speed
Example 39: Curve in a transfer function
Example 40: Easing function for animation
Example 41: sigmund~ for pitch tracking
Example 42: Basics of 3D animation in Jitter
Example 43: Add text to video in GL
Example 44: Choose one of several sounds
Example 45: Using JavaScript in Max
Example 46: Harmonizer written in JavaScript
Example 47: Delaying sound—an overview
Example 48: Phase cancellation due to delay
Example 49: Short delay creates a timbre change
Example 50: Comb filtering
Example 51: Delay with tapin~ and tapout~
Example 52: Delay with feedback
Example …