Necks, Fretboards, and Scale Length

Pluck a string on a guitar and the sound you hear depends on how fast it vibrates. The frequency is how many times it vibrates back and forth in each second. An A4 note has a frequency of 440 vibrations per second (one vibration per second is one Hertz).

The vibration frequency of a guitar string depends on three things:

  • the mass of the string
  • the tension on the string (how tight it’s pulled)
  • and, the length of the string.

Guitar string sets come with wires of different masses. The guitar has little knobs on the end for adjusting the tension. For building the guitar, you have the most control over the last last parameter, the length of the string, which is called the scale length. Since the guitar string masses are pretty much set, and the strings can only hold so much tension, there are limits to the scale length you can choose for your guitar.

In a guitar, the scale length only refers to the length of the string that’s actually vibrating when you pluck the string, so it’s the distance between the nut and the bridge. For many guitars this turns out to be about 24.75 inches.

For a guitar, the scale length is the length of the strings that are free to vibrate.
For a guitar, the scale length is the length of the strings that are free to vibrate.

Frets

To play different notes, you shorten the vibrating length of the string by using your finger to hold down the string somewhere along the neck of the instrument. The fret board (which is attached to the neck) has a set of marks to help locate the fingering for the different notes. How do you determine where the fret marks are located?

Well, the music of math post showed how the frequency of different notes are related by a common ratio (r). With:

 r = \sqrt[12]{2}

So given the notes:

Note Number (n) Note
0 C
1 C#
2 D
3 D#
4 E
5 F
6 F#
7 G
8 G#
9 A
10 A#
11 B
12 C

Since the equation for the frequency of a note is:

 f_n = f_0 \; r^n

we can find the length the string needs to be to play each note if we know the relationship between the frequency of the string (f) and the length of the string (l).

It turns out that the length is inversely proportional to the frequency.

 l = \frac{1}{f}

So we can calculate the length of string for each note (ln) as a fraction of the scale length (Ls).

 l_n = \frac{1}{f_n}

substituting for fn gives:

 l_n = \frac{1}{f_0 \; r^n}

but since we know the length for f0 is the scale length (Ls) (that inverse relationship again):

 l_n = \frac{1}{\frac{1}{L_s} \; r^n}

giving:

 l_n = \frac{L_s}{r^n}

When we play the different notes on the guitar, we move our fingers along the neck to shorten the vibrating parts of the string, so the base of the string stays at the same place–at the bridge. So, to mark where we need to place our fingers for each note, we put in marks at the right distance from the bridge. These marks are called frets, and we’ll call the distance from the bridge to each mark the fret distance (D_n). So we reformulate our formula to subtract the length of the vibrating string from the scale length of the guitar:

 D_n = L_s - \frac{L_s}{r^n}

Showing the fret distance.
Showing the fret distance.

The fret marks are cut into a fret board that was supplied by the guitarbuilding team, which we glued onto the necks of our guitars. We did, however, have to add our own fret wire.

Placing the fret wire into the fret cuts. The wire still needs to be fully pressed in.
Placing the fret wire into the fret cuts. The wire still needs to be fully pressed in.

The team also has an activity for students to use a formula (a different one that’s recursive) to calculate the fret distance, but the Excel spreadsheet fret-spacing.xls can be used for reference (though it’s a good exercise for students to make their own).

DNA Hard Drives

Adam Cole has an excellent NPR article on some fascinating researchers who are storing data — text files, web pages, sonnets — on DNA.

This should be a interesting introduction for middle-schoolers to the idea of DNA as a means of storing and transferring information. The question I hope to get is, “How did they do that?”

Converting text into a DNA sequence. From Goldman et al. (2013).

Switch: Converting Audio Files for Sound Effects

Adding sound to webpages is pretty easy with HTML5’s Audio tag (as Jean-Baptiste Jung demonstrates), but since different browsers can only handle certain, different types of sound files, you’ll often need to convert your sound into .wav, .ogg, and .mp3 formats so they can work for everyone.

Switch Sound File Converter does just what it says, and is free for non-commercial use.

Generating (and Saving) Tones with SoX

I’ve been using the command line program SoX to generate tones for my physics demonstrations on sound waves.

Single frequency tones can be used for talking about frequency and wavelength, as well as discussing octaves.

Combine two tones allows you to talk about interference and beats.

SoX can do a lot more than this, so I though I’d compile what I’m using it for in a single, reference post. For the record: I’m using SoX in Terminal on a Mac.

Using SoX

To play a single note (frequency 173.5 Hz) for 5 seconds, use:

> play -n  synth 5 sin 347

To save the note to a mp3 file (called note.mp3) use:

> sox -n note.mp3 synth 5 sin 347

The SoX command to play two notes with frequencies of 347 and 357 Hz is:

> play -n synth 15 sin 347 sin 357

and to make an mp3 file use:

> sox -n beat_10.mp3 synth 15 sin 347 sin 357

Listen for the Beat

Two sound waves with slightly different frequencies sometimes cancel each other out (destructive interference) and sometimes add together (constructive interference) to create a sound that gets loud and quiter with a beat. The two lower sound waves (green and blue) are out of phase, and their combination (superposition) creates the third (red) wave.

Play two sound tones that are close together in frequency and the sound waves will overlap to create a kind of oscillating sound called a beat.

When you hear the beat (see below), you're hearing the alternating of the high amplitude region and the low amplitude region.

Below are two tones: separated and then mixed — listen for the beat.

Frequency Sound File (mp3)
Tone 1 347 Hz 1m.mpg
Tone 2 357 Hz 1m-357.mp3
Mixed Tones (with beat) 347 Hz + 357 Hz beat_10.mp3

Interestingly, you can sometimes hear the beat as a third tone if the frequency difference is just right. The frequency of the beat is the difference between the frequency of the two tones.

Notes

The SoX command to play two notes with frequencies of 347 and 357 Hz is:

> play -n synth 15 sin 347 sin 357

to make an mp3 file use:

> sox -n beat_10.mp3 synth 15 sin 347 sin 357