Exercise G

Exercise G: 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 G Max Tips. This folder of Max patches introduces you to the ideas necessary to implement cues. Open the “Part 2: 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 “ExG-MaxTips” folder, to give you ideas for working on Project 1. The material on encapsulation is critical for constructing patches that are large enough to work for a complete piece.

  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 most of your time working on Project 1. 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.

Be sure you understand what each of these Max objects does:

  • 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.