For my statistics students, as we approach the end of the course, to think about the power of statistics and how using them, even with the best intentions, can go wrong.
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.
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:
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:
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.
So we can calculate the length of string for each note (ln) as a fraction of the scale length (Ls).
substituting for fn gives:
but since we know the length for f0 is the scale length (Ls) (that inverse relationship again):
giving:
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:
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.
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).
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?”
For free, easy editing of sound (audio) files, the free, open-source, program, Audacity, is excellent. It’s also a good complement to Switch for generating sound for the web.
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.
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:
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: