Sunday 28 March 2010

Tutorial Max 2: Random Major Scale Pitches In Max

Our second PureData example looked at playing random major scale pitches. This post looks at creating the same patch in Max. Our last algorithmic composition example in Max played random chromatic pitches if you haven't already follow the tutorial to create or download this last Max patch,
it looked like this:
  1. Open our last patch from tutorial one.
  2. We'll be storing the pitches of our major scale in a message: create a new message by pressing 'm' and type this is into the message ; majorScale 0 0, 1 2, 2 3, 3 5, 4 7, 5 9, 6 11, 7 12. If you've built the PureData of this patch you'll notice that Max and Puredata store data in slightly different ways. In Max we're storing the numbers in pairs separated by a comma: the first number is the index and the second number the scale interval.
  3. Our table stores the intervals of a major scale. We need a table to store this data in, create a new object by pressing 'n' and type 'table majorScale' into this object box
  4. Come out of edit mode [PD: CTRL E, Mac: CMD E] and click on the message to store the scale to the table. In the example below we've added a loadbang object to automatically store this message when the patch loads.
  5. Break the connection between the 'random' object and the '+' object and connect the table object here (another difference between Max and PureData, PureData uses a separate tabread object).
  6. Optional: create two new integer number boxes by pressing 'i' and connect everything up as shown in the screenshot below. The numbers aren't strictly necessary as they don't actually do anything, they just display the current number.
  7. Previously we were choosing from 12 random pitches. Now we only have 8 notes to choose from in our scale, so we now need to change the number in our random object to 8.
  8. Come out of edit mode [PD: CTRL E, Mac: CMD E], click on the toggle and you should hear random notes from the C Major Scale.
It's worth building the patch yourself but you can also download the patch here.

No comments:

Post a Comment