Monday, March 03, 2008

Music by the numbers


Having recently declared on this page that Color is math, math color — That is all / Ye know on earth, and all ye need to know, I figured I would outline some of the basic relationships between mathematics and music. If only for purposes of personal enrichment, I will summarize the snippets of music theory that can be extracted from Wikipedia's pages on meantone intervals and musical cents and from Kyle Gann's explanation of just intonation.

The following table summarizes the basic mathematical relationships for the C-major scale, beginning with middle C:

Cents in 12edo temperamentNoteIntervalJust intonation ratioFrequency
0Cunison1/1264
200DM29/8297
400EM35/4330
500FP44/3352
700GP53/2396
900AM65/3440
1100BM715/8495
1200Coctave2/1528

Each cent represents 1200th of the interval within an octave. Since doubling the frequency of a note generates the octave above it, each cent represents 21/1200, or 1/17.3 percent.

If you know the frequencies a and b of two notes, the following formula yields the number of cents measuring the interval between them:
n = 1200 log2 (a/b)
Similarly, if you know the frequency of note b and the number of n cents marking the interval to note a, you can compute the frequency of note a with this formula:
a = b · 2n/1200
The colors in the chart listing notes, lintervals, just intonation ratios, and frequencies represent an effort to unify the mathematic models of music and of color. Hue represents tone; value represents pitch. Though unimplemented here, saturation can represent the intensity or volume of a note. Dividing an octave into 12edo allows us to place the principal notes of the C-major scale — C through F, plus C#, D#, F#, G#, and A# — at evenly spaced 30 degree increments around the 360 degrees of the hue circle. Dividing the HSV colorspace's representation of value between two octaves generates an increase of 128 decimal or 80 hexadecimal units of value for each doubling of frequency.

The two rows representing C illustrate this color model of music most vividly. The first row, depicting middle C, is rendered with a background color of #880000: pure red at 100 percent saturation and 50 percent value. The final row, depicting C one octave higher, is rendered with a background color of #ff0000. It retains a pure red hue and remains at 100 percent saturation, since by stipulation this model did not alter the volume or intensity of the music being represented. But value has now reached 100 percent — 255 in decimal terms or FF in hexadecimal terms.

This model enables the rendering of simple tunes in two-dimensional color maps. It differs in operational detail, if not in spirit, from this effort to harmonize light and sound as harmonic phenomena. In future posts, perhaps, I will illustrate what I mean by plotting familiar melodies onto this synesthetic model of music.

0 Comments:

Post a Comment

<< Home

Google
 
Web Jurisdynamics