Saturday, 27 March 2010

Tutorial Max 1: Random Pitches In Max5

A few days ago we posted an introductory algorithmic composition example that generated random pitches in PureData. Today we're creating the same example in Max 5.

Max is a commercial application available from Cycling 74. Max is very similar to the opensource programme PureData, in today's example the patches are very similar, as we start to implement more advanced algorithmic compositions we'll discover some of the differences between the two programes.

Max is a commercial application, however there is also a limited time demo version available here.

  1. Start MaxMSP and create a new patch from the file menu [PC: CTRL N, Mac: CMD N]
  2. Now we need to start creating the patch, press 't' to create a toggle.
  3. Press 'n' to create a new object and type 'metro 1000' into this. This object is a metronome and sends out regular pulses. We have used 1000 as the argument, so our metronome will send out a pulse every 1000ms.
  4. Press 'n' to create another object and type random 12 into this object. This object is a random number generator. As we used 12 as its argument it will choose a random number from 12 possibilities (from 0 to 11)
  5. Add an integer number box by pressing 'i'. This is not strictly necessary but will display the random number that has been chosen.
  6. Add another object (by pressing 'n') '+ 48' (don't forget the space. This will add 48 to our random number to lift it into a sensible MIDI range.
  7. Add a further integer box, again not strictly necessary but will show the resulting number.
  8. Add a makenote object as per the screenshot. The other arguments included are velocity and duration.
  9. Add a noteout object and connect everything up as shown in the screenshot.
  10. Go to Options MIDI setup and choose a MIDI output.
  11. Exit edit mode [PC: CTRL E, Mac: CMD E] and click in the toggle box, you should see the number boxes changing values and hear random MIDI notes being generated.
Your patch should look something like this - click on the image to see a larger version.
Here are some things to try:
  • Change the value in the metronome box or connect a slider to the metronome's right inlet to generate notes at a faster or slower speed
  • Change the value in the random box to generate a larger or smaller range of pitches
You can also download the Max patch here.

Algorithmic composition can get a lot more interesting and involved than this, we'll look at some more advanced examples and other software in future posts.

No comments:

Post a comment