Wind Chimes and the ZX/TS Computer

See all articles from SYNC v3 n6
Author(s): Carter Scholz
Publication: SYNC
Pub Details: SYNC v3 n6 (Volume 3, Issue 6)
Date: November/December 1983
Pages: 32-36

Recently I wanted to build a set of tuned wind chimes. I knew that the calculations involved could become tedious, so I wrote a short program to do them. This program saved me a good deal of time and trial-and-error labor, and it prevented waste of material.

My problem was this: I knew what pitches I wanted, and from those I had to calculate the proper length of each chime. I used cylindrical tubing for lightness, but many other materials would do as well.

A Little Physics

The wave equations for vibrating objects were first put forth by Lord Rayleigh in the nineteenth century, and they are quite complex. Lejaren Hiller, a composer and computer scientist, has programmed them on a large mainframe machine to simulate the sound of “fanciful” or “imaginary” instruments, such as a rubber violin or a piano with glass strings. The ZX81 is not nearly fast enough to do this (no, not even in machine code), but by limiting our options we can simplify Rayleigh’s equations and use them to provide parameters for building real instruments.

The behavior of a vibrating object is described mainly by its “boundary conditions.” For chimes, we will restrict ourselves to the simple case of free-at-both-ends.

Now, how does the length of the chime relate to its pitch? The simplified expression, in Basic notation, is:

F = 1.133*PI/L**2*SQR(Q*K**2/D)

where F is the frequency in Hertz, L is the length in centimeters, D is the density of the material, Q is Young’s modulus for the material, and K is the radius of gyration.

Don’t panic. Q and D are easily found (see Table 1), and there is a simple expression for K, which depends on the shape of the vibrating object. For a circular cross-section, e.g., a rod,

K = OR/2

where OR is the radius. For a rectangular cross-section, e.g., a bar,

K = OR/SQR 12

where OR is the thickness in the direction of vibration. For a cylinder, like our wind chimes,

K = SQR(OR**2 + IR**2)/2

where OR is the outer radius and IR is the inner radius of the cylinder.

Solving for L:

L = 1.133*PI*K*SQR(Q/D)

The Program

The complete program is in Listing 1.

The quantity SQR(Q/D) is given a simpler name: S(M). It is dimensioned and assigned in lines 10-30. These lines, and the print lines 50-60, may be expanded to include whatever materials you wish (an assortment is given in Table 1). The display format leaves room for up to eight separate material lines.

After the inputs, the radius of gyration K is calculated for the given shape, and the required length L is calculated and printed. A conversion from centimeters to inches is made (this may be eliminated by deleting all occurrences of the number 2.54 in the program). After the length, the appropriate drill point is printed, and, for tubes, the air resonance. (I will discuss these two factors under “Practical Matters,” below.)

Then the program leaps back to line 270 and awaits the next frequency input. It does this so that you do not have to reenter the material and dimensions for every pitch. To exit the program, input STOP; to change materials or dimensions, simply RUN again.

Table 1.

Material    Q (Young's modulus)   D (Density)   S(M)=(Q/D)
Aluminum    6.9E11                 2.7          5.06E5
Brass       9E11                   8.4          3.27E5
Copper      9.7E11                 8.9          3.3E5
Glass       6E11                   2.5          4.9E5
Lead        1.7E11                11.3          1.2E5
Oak         *                      *            5E5*
Redwood     *                      *            2.3E5*
Silver      8E11                  10.5          2.8E5
Steel       2E12                   7.8          5.06E5

*These values were determined empirically.

You will see that the quantities assigned to S(M) in the program vary somewhat from the values in Table 1. This is to save space, and because the values for real materials will always differ from the ideal. However, no variation here will affect the relative tunings of chimes all cut from the same stock, and this is the important thing.

A Little Music Theory

What frequencies to choose? Most commercial wind chimes are cut at random, hence they give random pitches. But you do not need a program to do that. So here is some short, painless music theory to help you choose your pitches.

Ptolemy observed that when two pitches sound at once, they are pleasing in proportion to their frequency ratios. A unison (ratio of 1/1) is the most pleasing, or consonant, interval. An octave (ratio 2/1) is also quite consonant. A perfect fifth (3/2), a perfect fourth (4/3), and a major third (5/4), are all revered as “pleasing” intervals. They sound “in tune” with one another. And most small-number ratios have this property. So as long as you select small-number ratios (e.g., 5/3, 6/5, 7/4, 9/8), your chimes will sound “tuned.”

First, pick a base frequency as your 1/1—say, between 400 and 800 Hertz—and then pick some simple ratios above it. I built a set of six chimes, using a common denominator: 6/6, 7/6, 8/6, 9/6, 10/6, 12/6. You will see that 12/6 = 2/1, an octave; the use of the octave is especially pleasing.

A “pentatonic scale” is also lovely: 1/1, 9/8, 5/4, 3/2, 5/3, 2/1. But, by all means, experiment!

Cartoon: "Well... I guess that program wasn't compatible with my computer!"
Cartoon: "Well… I guess that program wasn't compatible with my computer!"

Frequencies for the piano octave above middle C are given in Table 2; for other octaves, divide or multiply these frequencies by powers of two. The third column of Table 2 gives the approximate small-number ratios for intervals above middle C; they are not exact because contemporary tunings are not mathematically rational. The last column gives interval names.

Table 2.

C     262   (1/1)     unison
C#    277   (16/15)   minor 2nd
D     294   (9/8)     major 2nd
D#    311   (6/5)     minor 3rd
E     330   (5/4)     major 3rd
F     349   (4/3)     perfect 4th
F#    370   (10/7)    tritone
G     392   (3/2)     perfect 5th
G#    415   (8/5)     minor 6th
A     440   (5/3)     major 6th
A#    466   (7/4)     minor 7th
B     494   (15/8)    major 7th
C     523   (2/1)     octave

Practical Matters

All the chimes should probably be between about eight and about twenty inches in length. I used 1″ aluminum tubing with a wall thickness of .055″. If the tubes are too long or too short, the sound of inharmonic overtones from the metal begins to spoil the pure tuned sound. And each chime must be hung from a point 22.42% down its length, so to reduce those inharmonic overtones. Just cut one tube and try striking it while holding it at various points, and you will hear what I mean.

The “air resonance” is less important, but it will to some extent emphasize or dampen the frequency you want, so it is given in program lines 350-360. If the air resonance has an integral multiple within about 10% of the desired frequency, the tone will be somewhat enhanced. The ease of calculating with the program enables you to try many variations of dimension effortlessly.

After the tubes are cut, you can sharpen (increase) their pitch by filing one end. Aluminum will take a gorgeous shine if you buff it with fine steel wool around the tube (not up and down). The framework and striker are up to you; but keep the tubes far enough apart so they do not clang against each other in a strong wind.

Further . . .

The same equations can be used to design a marimaphone, xylophone, or vibraphone, using bars or tubes. Again, mount the bars or tubes at holes drilled 22.42% from each end. Some of these instruments use resonators mounted beneath the sounding element to amplify the sound. (2″ ABS pipe is a good cheap material for the resonators.) The length, in inches, of an appropriate resonator is:

L = 3390/F - .29*D

where F is the desired frequency in Hertz, and D is the inner diameter of the resonator in inches.

However, if you get seriously interested in instrument design, there are many, many refinements. I suggest Banek and Scoville’s Sound Designs (Ten Speed Press) as a primer, and Harry Partch’s Genesis of a Music (Da Capo Press) as a graduate course in the design and construction of instruments. Have fun!

List of Variables:

  • N: Number of materials; if you expand the list, change this variable accordingly.
  • M: Index of material in array S(M).
  • D: Diameter of rod or cylinder, or thickness of bar, in inches.
  • T: Thickness of cylinder, in inches.
  • K: Radius of gyration.
  • F: Frequency, in Hertz.
  • L: Length, in inches.
  • S(M): Array containing values for various materials.

Line Notes:

10-70: Sets up material constants (see Table 1). Up to eight separate material lines may be accommodated by the screen format.
80: Graphics >
140: Graphics >

Screen display of a sample run: aluminum cylinder, diameter 1, thickness .055, frequency 660 gives LENGTH=19.109317 INCHES, DRILL AT 4.2843088 INCHES, AIR RESONANCE AT MULTIPLES OF 174.74842 HZ
Screen display of a sample run: aluminum cylinder, diameter 1, thickness .055, frequency 660 gives LENGTH=19.109317 INCHES, DRILL AT 4.2843088 INCHES, AIR RESONANCE AT MULTIPLES OF 174.74842 HZ

Listing 1.

   5 LET N=4
10 DIM S(2)
20 LET S(1)=5E5
30 LET S(2)=3.3E5
40 PRINT "MATERIAL?"
50 PRINT "1. ALUMINUM/STEEL/GL
ASS"
60 PRINT "2. BRASS/COPPER"
70 INPUT M
80 PRINT AT M,0;"[inv >]";AT N,0;
90 PRINT "SHAPE?"
100 PRINT "1. CIRCULAR (ROD)"
110 PRINT "2. RECTANGULAR (BAR)
"
120 PRINT "3. CYLINDRICAL"
130 INPUT S
140 PRINT AT S+N,0;"[inv >]";AT 9,0;
150 IF S<>2 THEN PRINT "DIAMETE
R? ";
160 IF S=2 THEN PRINT "THICKNES
S OF BAR? ";
170 INPUT D
180 PRINT D
190 LET K=D/4*2.54
200 IF S=1 THEN GOTO 270
210 LET K=D/SQR 12*2.54
220 IF S=2 THEN GOTO 270
230 PRINT "THICKNESS OF CYLINDE
R? ";
240 INPUT T
250 PRINT T
260 LET K=SQR (D*D+(D-T)*(D-T))
/4*2.54
270 PRINT AT 12,0;"FREQUENCY? "
;
280 INPUT F
290 PRINT F
300 LET L=SQR (1.133*PI*K*S(M)/
F)/2.54
310 PRINT
320 PRINT "LENGTH=";L;" INCHES"
330 PRINT "DRILL AT ";L*.2242;"
INCHES "
340 IF S<>3 THEN GOTO 270
350 PRINT "AIR RESONANCE AT MUL
TIPLES OF"
360 PRINT 3390/(L+.29*D);" HZ"
370 GOTO 270

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.