(maxmsp) Notes on Assignment 2

Given the scarcity of finished assignment 2’s in my possession, I’m assuming you’re having a lot of problems getting started with your first guided Max patchers. My experience leads me to believe that there are a couple of reasons for these troubles:

  1. You need to take notes in class. I don’t see anyone writing anything down, and I don’t know how you expect to remember where to even start if you don’t take notes. Specifically, you’re not sure where to go among my class demo patchers to see examples that work similarly to what the assignment is asking for you to do.
  2. Similar to translating word problems into math equations, you need to work at translating program descriptions into Max code – understanding what objects perform what basic functions.

To help, I’m going to break down the first patcher – the arpeggiator – into some basic Max objects and tasks.

An arpeggiator play an arpeggio based on a given root note at a specified rate of time. The arpeggio does not have to be limited to an octave range. It can span whatever musical interval you would like. So an arpeggiator needs:

  • the intervals of a given arpeggio stored in its memory,
  • a MIDI note input for the root note,
  • to add the intervals to the input MIDI note,
  • to send the arpeggio notes (input + intervals) to an output,
  • and a timing device that triggers the arpeggiated notes.
  • Your assignment also asks that the input MIDI note be sent out to play along with the arpeggio.

So let’s look at each step and figure out what MIDI objects perform the necessary functions. (I’ve left off some of the assignment – starting and stopping the arpeggio – that I’ll come back to later.)

The intervals of a given note stored in memory. Intervals are expressed in integers representing how many half steps in the interval. You can store integers in a table object. The table object can hold as few intervals as you like, but it can also store by default 128 values.

A MIDI note input for the root note. Getting a MIDI note into Max usually involves the notein object.

Adding the intervals to the MIDI input note. Adding should be obvious (+ object). Be sure that you are adding the note number from notein to the output of the table object to get the desired note number for the arpeggio note.

Send the arpeggio notes (input + intervals) to an output. To output MIDI notes based on MIDI note number alone requires two objects: makenote and noteout. The duration of the note argument in makenote should be based on the speed of the object triggering the arpeggio notes.

A timing device that triggers the arpeggiated notes. An object that sends out bangs at specified time intervals is the metro. The metro needs something to start and stop it (generally a toggle, but it could also be linked to the transport for musical duration values). The metro needs a time argument, by default in milliseconds.

Input MIDI note be sent out to play along with the arpeggio. Connections for note number and velocity need to run from notein to noteout. Remember, you can have multiple connections out of and in to objects.

The main functions for what has been described so far exist in the Day02.maxpat. I’ve also posted a Day02more.maxpat that has an additional comment about a random generator being sent to the velocity input of makenote. For example, you need to send an index number (the y value) to table to get the value stored at that index. You can use a counter object or a random object to do this. Both operate based on bang messages from the metro object.

The only things that the Day02 patcher do not do are:

  • echo the input notein to noteout. These messages (note number and velocity) have to bypass (not go through) stripnote. Stripnote is being used to only send noteon MIDI note values to be added to the arpeggio intervals.
  • start and stop the timing device (the metro object) with noteon and noteoff messages.

This last step is fairly easy. In class, and in the Day02 example, the metro turns on manually with a toggle object. Metro starts with a non-zero integer, and stops with 0. A toggle sends a one when clicked on, and a zero when clicked off. MIDI noteon messages have a non-zero velocity, and noteoff messages have a zero velocity. All that is required then is an additional connection from the notein velocity outlet to either a toggle connected to metro, or to the input of metro itself to start and stop with the pressing and releasing of a MIDI key.

A final hint, you don’t have to limit yourself to one notein object, with many long patch cord connections. You can have multiple noteins within a patcher. They will all send the same messages (if they are listening to the same devices). You can even have multiple noteout objects. Adding multiple objects for the same function can produce cleaner-looking patchers.

The second and third parts of the assignment are based on each previous patcher. Consider a “gesture” to be a collection of note numbers, like an arpeggio. Expressing time in musical values requires use of the transport object. Decide if you want the transport to run all the time, or to start and stop when you press a MIDI key. The latter is easier to program. Shutting off the metro after a certain number of events requires a counter object with the proper arguments. The Day05-TableStore.maxpat file has an example of how to do this with metro. You need to connect the select – bang output to the toggle controlling a transport object.

Deciding whether to advance a counter with bang messages, or to simply repeat the last value means you need to switch the route of the bang from the counter directly to the last number at a given count. Graphic switches perform this function.

I’ve laid out a lot of what is needed to complete parts one and two. Part one requires minimal changes to the Day02 patcher. You need to try your hand at connecting the rest.


Comments

Leave a Reply