- Download puredata extended from www.puredata.info
- Start the program and create a new patch from the file menu [PC: CTRL N, Mac: CMD N]
- Now we need to start creating the patch, from the put menu add a toggle
- Again from the put menu add an 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.
- Add another object from the put menu or use the shortcut [PD: CTRL 1, Mac: CMD 1] 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)
- Add a number box, either from the put menu or using the keyboard shortcut [PC: CTRL 3, Mac: CMD 3]. This is not strictly necessary but will display the random number that has been chosen.
- Add another object '+ 48' (don't forget the space. This will add 48 to our random number to lift it into a sensible MIDI range.
- Add a further number, again not strictly necessary but will show the resulting number.
- Add a makenote object as per the screenshot. The other arguments included are velocity and duration.
- Add a noteout object and connect everything up as shown in the screenshot.
- Go to preferences MIDI settings and choose a MIDI output.
- 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.
Here are some things to try:
- Change the value in the metronome box 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
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.
1 comment:
hey mate just wanna say, nice one for doing this. best lot of tutorials i have found on the subject. thanks a lot!
Post a Comment