The Perceptual Tuning Primer

From - Atari 7800 Development Wiki
Revision as of 23:38, 2 November 2015 by MSaarna (talk | contribs) (Limitations)
Jump to: navigation, search


Perceptual Tuning refers to arranging TIA music in the key of A (specifically A3) with the intent to shift any poorly tuned notes to ones to ones aren't as easily detected as being poorly tuned.

Perceptual Tuning differs from using the Tune2600 utility. Tune2600 will transpose your selected notes to make them as in-tune as possible, with the algorithm considering your selected notes as having equal importance.


This section is rather heavy, while using Perceptual Tuning is rather simple in practice. If you find yourself overwhelmed by the theory, feel free to skip ahead to the Practical Application section.

When a note sounds "off" to a listener, it isn't because the listener hears that the note is 262 Hz rather than 261.626Hz. It's because the frequency relationship of the note sounds off in relation to other notes in the music. If you speed up the playback of a recording of Beethoven's 5th symphony, the pitch of the notes being played are shifted upwards, but overall the recording will still sound in tune because the relationships between those notes are remain the same.

Our brains are better at picking out bad tuning for some note relationships better than others. When 2 or more note frequencies line up with simple and short periodicity, our brains detect that. There's even have a musical name for the effect - it's called consonance[1]. When the frequencies don't line up regularly, we call that dissonance[1].

2 sine waves, a perfect fifth interval apart. Note how one wave beginning quickly lines up with the other, resulting in consonance.
2 sine waves, a minor sixth interval apart. It will be a long while before the waves coincide, resulting in dissonance.

When we play 2 or more notes that are normally consonant on an instrument that is slightly out of tune, our brains easily pick out the loss of consonance; waves that should align with regular periodicity drift in and out of alignment. When we play 2 or more notes together that are normally dissonant on the same out-of-tune instrument, the result is still dissonance; waves that take a long time to line up, still take a long time to line up. Our brains use the relative consonance/dissonance as part of the note identification strategy[2], so this explains why we pick out consonant notes more easily than dissonant ones.

The last bit of theory we need to understand is that almost all music is written in a particular key, which can be thought of as a foundation note. The notes played in the song are interpreted by our brains in relation to the key. As notes are played that are dissonant in relation to the key, tension builds. When the key or notes that are consonant to the key are played, tension is relaxed.

While TIA is incapable of creating music that is in absolutely in tune, we can pick a key for creating TIA music that will ensure that the consonant notes are closer to being in tune, while worrying less about the dissonant notes. This is the idea behind Perceptual Tuning.

To find the key that had the best TIA Perceptual Tuning properties, a program was created that ran through all of the available frequencies and scored them according to how in-tune the following notes were. The score for any given note was weighted according to the relationship of the note to it's key, with much larger weights being assigned to relationships with strong consonance - namely the major third, perfect fourth, perfect fifth, and octave intervals.

The program found that A3@218.3Hz has the best Perceptual Tuning score, with the first 12 semitones having good perceptual tuning, with the next 12 semitones being decent except for an out-of-tune major third at C#5@561.4Hz.

Practical Application

The musical key with the best TIA Perceptual Tuning for any 12 consecutive notes is A3@218.3Hz, and the next higher 12 notes is good as well if you can avoid the major third at C#5@561.4Hz. Write your songs in the key of A3, and you'll take advantage of Perceptual Tuning.

There's a lot of theory behind it, but in practice Perceptual Tuning is very simple to implement.


Listen to the samples below to hear the difference between regular tuning, tune2600 selected tuning, and perceptual tuning. In a lot of respects, the sample represents a worst case example: a familiar song that makes extensive use of sustained chords, and covers more than an octave.

O Tannenbaum, in D4


O Tannenbaum, in C3, as selected by tune2600


O Tannenbaum, in A3 for Perceptual Tuning



Perceptual Tuning, by definition, uses the A3 key for composition, so it isn't possible to use it with music that incorporates key changes.

While playing 2-note chords is possible with TIA and Perceptual Tuning, it should be noted that the chord-note relationships aren't necessarily covered by Perceptual Tuning. The relationship between the notes in the chord will result in consonance/dissonance relative to those notes, in addition to the consonance/dissonance between the key and notes played. Because of this some chords may sound out of tune, even if individual notes sound fine. Care and experimentation is recommended when using chords.


  1. 1.0 1.1
  2. The Journal of Neuroscience, 21 October 2009, 29(42): 13165-13171; doi: 10.1523/JNEUROSCI.3900-09.2009