Exercise 8

Exercise 8: Patch State Changes by Cue

Most pieces you make with Max will have several states, or configurations of object data, such as volume levels, synth parameters, etc. We already learned how you can store data in presets. In a piece, you might want to change presets or play sound files at specific times. You do this by arranging a set of cues, each of which performs actions in response to a trigger, such as pressing a key on a keyboard or pressing a footswitch.

This exercise gives you a simple introduction to implementing cued state changes in a piece. You can use this approach for data-driven instrument pieces or pieces for acoustic instrument and electronics.

Goals

We’re learning how to...

  • use the spacebar on the computer keyboard to advance cues with a counter object, and
  • play sound files in response to cues.

How to Do This Exercise

Working on the assignment is a two-stage process.

  1. Download Exercise 8 Max Tips. This folder of Max patches introduces you to the ideas necessary to implement cues. Open the “Part 1: Cues” patch, and focus on the material in section 4.

    This will give you enough information to construct the patch for this exercise. But you should work through the rest of the patches in the “Ex8-MaxTips” folder, to give you ideas for working on Project 2. The material on patch organization — encapsulation, message and signal routing — is critical for constructing patches that are large enough to work for a complete piece, and yet still reliable and easy to debug. To understand the material in “Part 2: Patch Organization,” you may need to review “Project 1 Max Tips Part 7 - Send-Receive.”

  2. Make a patch that implements a list of four cues, each of which plays a sound file, using playlist~.

    The key to making this work is to convert the bang returned from sel into a numerical message that tells playlist~ to start playing a sound file.

This exercise is intentionally short, because you should be spending some time thinking about what you would like to do for Project 2. For that project, you should also learn how to

  • trigger cues by pressing a footswitch (MIDI or USB);
  • encapsulate the data for each cue into its own subpatcher;
  • use Presentation Mode to remove clutter from the user interface of your patch;
  • send data through send/receive object pairs, and send audio through send~/receive~ object pairs; and
  • create cue-triggered parameter automation.

All of these ideas are demonstrated in “Part 2 - Patch Organization.” “Part 3 - Encapsulation 2 - Bpatchers” tells you what you need to know to make a mixer or other user interface that can be embedded in your main patcher window.

Be sure you understand what each of the following Max objects does. Most of these were introduced in previous assignments.

  • patcher (abbreviated 'p')
  • bpatcher
  • send, receive
  • send~, receive~
  • line
  • inlet, outlet

Also know the terms encapsulation, abstraction, and Presentation Mode.

Submission and Grading Criteria

This exercise is graded pass/fail. You must submit the exercise in Canvas by Thursday midnight to be eligible for a pass.

Your patch must

  • operate correctly and
  • implement the functionality described above.