it looked like this:
- Open our last patch from tutorial one.
- 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.
- 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
- 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.
- 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).
- 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.
- 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.
- 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.