Evolution of an Algorithm

Adopting and further refining a process is a common activity in software development, but it’s important to remember that humans have been doing this for years without computers. A successful process can be formed using creativity, replication, optimization, compromise, and innovation.

Learning To Tune

I bought an electric guitar back when I was in high school. Some friends wanted to put a band together to play a Mötley Crüe song for a talent contest and needed me to play guitar. Even though I only knew how to play bass, I stepped up with my second-hand axe to learn the songs. But I wasn’t even sure how to tune it.

A Simple Algorithm

Tuning a guitar is not hard. A guitar friend showed me these Seven Steps:

  1. Tune the open (unfretted)‘A’ string to a 440hz ‘A’ reference pitch.
  2. Play the 5th fret on the ‘E’ string and tune it to match the open ‘A’ string.
  3. Play the 5th fret of the ‘A’ string, and tune the open ‘D’ string to match.
  4. Play the 5th fret of the ‘D’ string, and tune the open ‘G’ string to match.
  5. Play the 4th fret of the ‘G’ string, and tune the open ‘B’ string to match.
  6. Play the 5th fret of the ‘B’ string, and tune the open ‘E’ string to match.
  7. Repeat as necessary.

Application

I used the Seven Steps, learned a few guitar chords, and finally learned how to play a song for the performance in less than 8 weeks. We won a prize.

Optimization

We would rush home after school to play, even after our talent show performance had passed. When we got together like this, I made a slight modification to the Seven Steps:

  1. If the bass is not in tune; tune the open the open ‘A’ string to a 440hz ‘A’ reference pitch and skip to step 3.
  2. Tune the open ‘A’ string an octave above the bass player’s ‘A’ string.
  3. Play the 5th fret on the ‘E’ string and tune it to match the open ‘A’ string…

On most days, at least one of us was already in tune, and other days it was close enough to avoid having to tune both instruments. The drummer would start playing immediately. It wasn’t fair.

Intonation

My guitar is a copy which means that it is a cheaply manufactured imitation of a better quality brand. It had a brash sound and would squeal like internet dial-up anytime I stopped playing. When you are sixteen years old you don’t worry about your bandmates going deaf while you repeat the Seven Steps turned up to 11. Surprisingly you can learn how to do this over the sound of a drummer who never stops playing, so it’s all cool.

Describing the quality of guitar sound is as subjective as describing a bottle of wine. But even after following a well-reasoned tuning procedure…

  • The same note played on different strings might not share the same tuning.
  • One chord may sound in-tune, but another sounds out-of-tune.
  • Notes fretted near the headstock are more in-tune than notes fretted near the neck.

Poor intonation is a mechanical deficiency in the guitar itself, and is usually caused by inferior quality components, broken tuners, maladjusted bridges, and warped necks. While it’s advisable to have your guitar “setup” by a qualified technician, or simply buy a better quality instrument, adjusting your tuning procedure can also have a dramatic effect on the sound of a guitar.

Within a year or two, this became the “tuning ritual” that I used for many, many years.

  1. If the bass is not in tune; tune the open ‘A’ string to a 440hz ‘A’ reference pitch and skip to step 3.
  2. Tune the open ‘A’ string an octave above the bass player’s ‘A’ string.
  3. Play the 5th fret on the ‘E’ string and tune it to match the open ‘A’ string.
  4. Play a 5th chord with the open ‘E’ and 2nd fret ‘A’ strings and tweak the tuning of the ‘E’ string until it sounds better.
  5. Play the 5th fret of the ‘A’ string, and tune the open ‘D’ string to match.
  6. Play a 5th chord with the open ‘A’ and 2nd fret ‘D’ strings and tweak the tuning of the ‘D’ string until it sounds better.
  7. Play a “power chord” using the open ‘E’ string and 2nd fret ‘A’ and ‘D’ strings. If this doesn’t sound good return to step 3.
  8. Play the 5th fret of the ‘D’ string, and tune the open ‘G’ string to match.
  9. Play a “power chord” using the open ‘A’ string and the 2nd fret ‘D’ and ‘G’ strings. If this doesn’t sound good return to step 5.
  10. Play the 4th fret of the ‘G’ string, and tune the open ‘B’ string to match.
  11. Play a 5th chord with the open ‘G’ string and 3rd fret ‘B’ strings and tweak the tuning of the ‘B’ string until it sounds better.
  12. Play the 5th fret of the ‘B’ string, and tune the open ‘E’ string to match.
  13. Play the open ‘B’ and ‘E’ strings and tweak the tuning of the ‘E’ string until it sounds better.
  14. Play some open chords like ‘A’, ‘D’, ‘G’, ‘C’, and ‘E’ and tweak notes that sound “off”.
  15. Repeat as necessary.

Honestly, this was a lot of work compared to the Seven Steps. And a number of conditionals, assertions, and feedback-loops have been inserted to ensure it is completed correctly. Although this is ear-intensive, and can take a few minutes to complete, many players maintain a complicated process such as this to accommodate an old or broken instrument. Sometimes the sound they get is worth the trouble.

Compromise

And more often, the sound is not worth the trouble. On a professional stage, neither your bandmates, the sound guy, or your audience are going to tolerate a lengthty tuning procedure. Unless you have a personal guitar tech you may need to make a few compromises if you want to perform regularly:

These are all rational choices:

  1. Tune backstage and fine-tune while you are playing the first song. This happens a lot.
  2. Get your intonation fixed. The Seven Steps may be all you need.
  3. Buy a quality guitar. The Seven Steps will work.
  4. Buy a guitar tuner. You can tune quickly and silently on stage if your guitar is well-intonated.
  5. All of the above.

Shortcuts

There are no shortcuts. As a beginner, we often don’t have the justification for buying expensive professional-quality equipment. My bandmates and I would have benefitted greatly using guitar tuners, but we didn’t have the money for it and it really didn’t matter to us at the time.

Eventually, I completely overhauled my $45 guitar, buying for it new pickups, tuners, and a bridge. With a new setup, the intonation problems almost completely disappeared. For 30 years, I played my new-and-improved Telecaster copy, and kept up with my 15+ step tuning ritual despite the fact that half of it was no longer necessary.

A well-practiced ritual can be nearly impossible to overcome.

Innovation

Only a few years ago some seriously useful technology happened.

tc electronic polytune

Watch this demonstration video.

This guitar tuner is a total game changer. Guitar players and software developers alike were both surprised and happy to discover a technology that could not only tune one guitar string at a time, but ALL OF THEM AT ONCE.

Here’s my new tuning procedure:

  1. Play all strings at once into my digital tuner (no sound output).
  2. Tune up the strings that are too low.
  3. Tune down the strings that are too high.

There’s even an app for it.

Finale

This is a software development blog, and I used this out-of-context example to illustrate how non-programmers rely on the same principles that software developers use to continually create, adapt, evolve, and revolutionize their own processes:

  • Processes begin as a simple sequence of repeatable steps leading to a desirable outcome.
  • After significant repetition, incremental tweaks are added to improve the original algorithm.
  • Better quality platforms yield quicker and better quality results.
  • A compromise can have long-lasting effects. Some become irrelevant over time.
  • Innovation is instantly recognizable as a break in tradition or paradigm shift.