Showing posts with label intro. Show all posts
Showing posts with label intro. Show all posts

Saturday, 20 March 2010

Tutorial - PD2: Random Major Scale Pitches

Following on from our last PureData tutorial that played random chromatic pitches, we'll make our patch a little more melodic by choosing our pitches from a major scale.

If you haven't already work through the last PureData algorithmic composition tutorial or download the PureData patch here.

Our last patch looked like this:


  1. Open our last patch from tutorial one. You can see the finished version of the patch at the bottom of this post.
  2. We'll store the pitches of our major scale in a message: create a new message [PD: CTRL 2, Mac: CMD 2] and type this is into the message ; majorScale 0 0 2 3 5 7 9 11 12
  3. This defines the intervals of a major scale. We need to store this in a table, create a new object [PD: CTRL 1, Mac: CMD 1] 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.
  5. We'll set the patch up so the scale is stored automatically when the patch loads. Enter edit mode [PD: CTRL E, Mac: CMD E]. Create a new object [PD: CTRL 1, Mac: CMD 1], type 'loadbang' into the object and connect it to the message.
  6. Break the connection between the 'random' object and the '+' object. Create a new object and type 'tabread majorScale' into this object.
  7. Optional: create two new number boxes [PD: CTRL 3, Mac: CMD 3] 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.
  8. 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.
  9. 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.


Remember to make sure you have set a MIDI output in preferences/Midi settings.

It's definitely worth building the patch yourself to get used to working with the program, but you can also download the patch here.

Monday, 8 March 2010

What Is Algorithmic Composition?

What Is Algorithmic Composition?
An algorithm can be defined as “a set of rules for solving a problem in a finite number of steps”, (David Cope, 2000). Algorithms are instructions that are followed to complete a task. When composing algorithmically we write the instructions that will create the music rather than the musical notes themselves.

If you were to write a song or compose a piece of music, traditionally the composer(s) decide exactly what note is played where, for how long and on what instrument. You may have a plan in mind of what the finished piece of music will sound like, but work through step by step explicitly writing down each note on a piece of paper or recording it in a sequencer or multitrack recorder.

With algorithmic composition, rather than spelling out each note and instrumental part, you create an algorithm or 'set of rules' that will create the musical surface for you. Heinreich Taube describes this as composing at the metalevel.

Here's a simple example. If you were writing a song you might start by writing a chord progression. If you were to write a chord progression algorithmically, you would specify:
  • The list of chords that could be used
  • How often these chords could or would change
  • A way of choosing between these chords
  • How many chords you wish to generate
This could be choosing between the diatonic chords of C major twice a bar, for four bars and choosing the chords completely randomly, or choosing the possible chords that could follow the current chord.

Why Compose Algorithmically?
This brings us to a few of the benefits of being an algorithmic composer:

  1. Using computers, it's just as easy to generate 1000 chords as it is to generate 4.
  2. We can use the system to generate ideas for us, if we want we can discard those we don't like
  3. Once we've created the algorithm, we can tweak it to generate variations e.g. use a different set of chords or rhythm

This is a very simple example and is obviously quite limited. However it introduces us to some ideas that we'll look at in more depth in future posts.

Sunday, 8 November 2009

Algorithmic Composition

I'm an algorithmic composer, I write software that composes music. In this blog I'll be posting sample music together with tutorials, patches and lessons on how you can use computers to compose music algorithmically.

If this is new to you, don't worry. We'll be taking things from the ground up in small steps.

If you've composed music algorithmically before there will be lots of intermediate and advanced tutorials that walk through Markov chains, neural nets, chaos, fuzzy logic, stochastic, data driven approaches and more.

Lots of the concepts and ideas we'll discuss can be implemented on different platforms. I'll be reviewing free and paid-for software that can be used for algorithmic composition and posting lots of free downloadable example patches using Max, PureData, OpenMusic, LISP, Java and more.

You don't have to be a programmer to make algorithmic music, just an interest in creating music in new ways....