Exercise: Pure Data Melody

Objective

Use Pure Data to play a simple melody.

The melody is represented as a sequence of notes, stored in a table as integers between 0-127 (this range happens to be the standard representation of "pitch" in the MIDI protocol.

The procedure for exploring this exercise applies to all exercises in 1.c.iii. Each exercise has an associated Pure Data patch, in which you will find step by step instructions. Follow the steps; get the patch working; and begin making changes, variations, additions.

Consider the following important concepts, implications and questions of this example:

  1. A very simplistic representation of a "melody" is a series of notes played in a particular order. What sonic and/or musical considerations are left out if we only consider pitches in a melody?
  2. A metro object is a fundamental timing object in Pure Data. It can generate a regular beat which can in turn trigger other events; in this patch, the triggered event are changes in the frequency of an oscillator (the osc~ object). The metro object can also be used to trigger events in the real world (motors, servos, lights, etc.) when a microcontroller is connected to Pure Data.
  3. Building simple counters in Pure Data is easy and extremely useful. Look in the intro-to-counters abstraction to see more examples.

Steps and observations

  1. Open the music-pitch.pd patch in Pd-extended.
  2. Follow the instructions in the patch.

Comments

For a challenge, try creating a more exciting rhythmic pattern.

Other Files

  1. music-pitch.pd
  2. intro-to-counters.pd