MIDImorphosis 2 - Spectral Eye and Tone Scope

The vibration of a guitar string is complex; there are multiple wave forms going on all at once. There's a simple wave that is at the "root" frequency; this is typically called the fundamental or first harmonic. There are also more complex waves with two, three, four, and more peaks.

All of these waves combine, in different magnitudes, to give the final motion of the string as it vibrates. The energy that the string contains at one frequency can transfer into other frequencies, so the tone of a note changes over time.

The strongest frequencies are usually the lower order ones -- but where you pluck the string, and how you pluck it, can impact this. Tone is very much in your fingers (and much less so in the wood!).

In the graph below, you can see the first, second, third, and fourth harmonic. How these waves combine into the motion of the string is shown in red, while the signal detected by the pickup is shown in green.

The tone that a pickup "hears" depends on where it is relative to the fret and bridge of the string. You can adust the scale length and pickup position in the simulation.

See the video below for a full explanation of this page. And grab a guitar and a tape measure (and the MIDImorphosis app too, if you're curious.)


String Simulation


Simulation
Fundamental (First) Second Third Fourth
Show Harmonics
Show Combined Harmonics
Show Audio Signal

Scale Length
Pickup position

Fretting the Strings

If you're wondering what happens when you fret a note.... the scale length effectively changes to get shorter, while the tension stays the same. The string will vibrate faster, resulting in a higher pitch -- and where the pickup is relative to the harmonic wave peaks also changes!

In the table below, you can see the fret positions, and also the relative strengths of the first sixteen harmonic frequencies, for each of twentytwo frets.

Stronger frequencies are highlighted in yellow, fading towards a deep purple. You can adjust the scale length and pickup position above, to see how things change.

Tape Measure Experiments

Grab your guitar and a tape measure. The scale length of the guitar is twice the distance between the nut and twelth fret (and it's easier to measure this than from the nut to the bridge).

Next, check out the distance between the bridge and one of the pickups. You can plug the numbers into the spots above to see what the relative strengths of the harmonic frequencies are for your guitar.

Why does a bridge pickup sound different than a neck pickup? It's where the pickup is, not so much on how the pickup is wound!

Why does a Tele sound different from a Les Paul? The pickups have a little bit of an impact, but the bigger factor is that they're in different locations.

The Fourier Transform and Pitch Detection

Now here's where things get interesting. The guitar pickup produces the wave form shown in green on the graph above -- that's the wave form that will go into effects pedals, and then to an amplifier, and then to the speakers.

Thanks to some clever math by Fourier, it's possible to work backwards to determine which harmonic frequencies make up an incoming wave, and their relative strengths.

MIDImorphosis uses this for pitch detection -- the incoming audio is analyzed, the harmonics are extracted, and then the spacing between the harmonic peaks can determine the pitch. When a string vibrates, it will vibrate at 1X, 2X, 3X, 4X, and so on, of the fundamental frequency.

By looking at all of the detected harmonics, the pitch of a note can be determined accurately, and quickly. MIDImorphosis uses this to trigger a MIDI synthesizer, or to add a note to the tab transcription functions.

But maybe you don't care about synthesizers. This stuff is still interesting, if you do care about the tone of your guitar. Two displays are built in to MIDImorphosis, to let you see what's going on with your guitar.

The Tone Scope

The Tone Scope in MIDImorphosis has a number of features you might find on an oscilloscope. Along the top of the display, the incoming audio signal is shown with a white line; this is comparable to the green line produced by the string simulation above (but an actual guitar string produces a large number of harmonic frequencies).

The audio input is converted using the Fourier method (and actually, a Fast Fourier Transform, or FFT) to determine the strength of each harmonic. In the screenshot, the note being played is an A, with an estimated frequency of 110.36Hz. The FFT is displayed at the bottom, with the fundamental being at the first peak, then other peaks around 220, 330, 440, and so on. The first harmonic is the strongest, then things decrease, until an increase at the 5th harmonic.

The top part of the display shows the relative strength of each frequency, as as a note plays. Higher harmonics are generally weaker, and drop below detection first. Some of the energy in one harmonic frequency will shift to another harmonic, and you can sometimes see increases and decreases.

The Tone Scope display automatically adjusts to match the peak of the FFT to the height of the display -- this lets you see what's happening on both loud and soft notes. The horizontal range of the display can be adjusted by tapping the right side (there are three different magnification levels). Tapping the center will adjust the lower bound of the FFT display, while tapping on the left side of the screen freezes the display.

Spectral Eye

The FFT display in the Tone Scope can be hard to read -- most musicians are more interested in the name of the note than the actual frequency. The Spectral Eye display shows the same information, but in a form that's a bit easier to understand.

The frequency spectrum is wrapped in a spiral, so that each rotation around the spiral corresponds to an octave of the normal musical scale.

The detected frequencies are shown as green circles; the stronger the frequency, the larger the circle. An "A" note might generate a frequency of 110, and the second harmonic is 220 -- this is also an "A" note.

The third harmonic at 330, though? This is where it gets weird. The note "E" is at 330 (329.6 actually). Have you ever noticed that an A and an E sound good together? It's because their frequencies mesh nicely.

The next harmonic for an A is at 440, which is a second octave up. Still an A. But then the fifth harmonic... At 550. That's close to a C#, which is 554.3.

And now something to really bake your noodle? The notes in a typical A major chord are A, E, and C#. Wild, right?

The Spectral Eye display makes chords easier to see, and can give a hint as to which notes will sound good together. We've made a free app that does this -- you can pick up Spectral Eye in the app store. Everyone likes the app, so we added the functions to MIDImorphosis.