Learning to program requires:

- Learning how to describe a problem or task as a series of discrete steps.
- Learning how a particular programming language handles data, user interaction, input/output, and program flow.

Describing a Task

I can supply a formula for converting temperature in Farenheit to temperature in Celsius.

(TempF° – 32°) * 5/9 = TempC°

Computer programs will usually break down the formula into discrete mathematical operations, the same way you would solve the program yourself. The above formula in computer terms would look like:

- TempF° – 32°
- Result of 1. multiplied by 5
- Result of 2. divided by 9 equals TempC°

Or take the case of a synth arpeggiator. Described in regular language:

Given a MIDI note for input, auto-generate a series of notes in a rhythmic pattern.

Converted to steps:

- Receive MIDI note input
- Define one or more series of
*intervals*for arpeggios. - Using some type of timing device, add intervals to input note (to create arp notes).
- Generate output notes. (from 3.)

You can look at how I implemented the temperature conversion in Max/MSP by downloading the example patch from class. (http://kkothman.iweb.bsu.edu/mumet242-s08/examplePatches/day1.pat)

## Leave a Reply