# Musical tuning

In music, there are two common meanings for tuning:
* Tuning practice, the act of tuning an instrument or voice.
* Tuning systems, the various systems of pitches used to tune an instrument, and their theoretical bases.

## Tuning practice

Tuning is the process of adjusting the pitch of one or many tones from musical instruments to establish typical intervals between these tones. Tuning is usually based on a fixed reference, such as A = 440 Hz. The term "out of tune" refers to a pitch/tone that is either too high (sharp) or too low (flat) in relation to a given reference pitch. While an instrument might be in tune relative to its own range of notes, it may not be considered 'in tune' if it does not match the chosen reference pitch. Some instruments become 'out of tune' with temperature, humidity, damage, or simply time, and must be readjusted or repaired.
Different methods of sound production require different methods of adjustment:
* Tuning to a pitch with one's voice is called matching pitch and is the most basic skill learned in ear training.
* Turning pegs to increase or decrease the tension on strings so as to control the pitch. Instruments such as the harp, piano, and harpsichord require a wrench to turn the tuning pegs, while others such as the violin can be tuned manually.
* Modifying the length or width of the tube of a wind instrument, brass instrument, pipe, bell, or similar instrument to adjust the pitch. In woodwind instruments, this is usually done by adjusting the instrument's mouthpiece or neck to change the pitch. In brass instruments, this is usually done by moving a tuning slide.
The sounds of some instruments, notably unpitched percussion instrument such as cymbals, are of indeterminate pitch, and have irregular overtones not conforming to the harmonic series. See § Tuning of unpitched percussion instruments.
Tuning may be done aurally by sounding two pitches and adjusting one of them to match or relate to the other. A tuning fork or electronic tuning device may be used as a reference pitch, though in ensemble rehearsals often a piano is used (as its pitch cannot be adjusted for each performance). Symphony orchestras and concert bands usually tune to an A440 or a B♭, respectively, provided by the principal oboist or clarinetist, who tune to the keyboard if part of the performance. When only strings are used, then the principal string (violinist) typically has sounded the tuning pitch, but some orchestras have used an electronic tone machine for tuning. Tuning can also be done through a prior recording; this method uses simultaneous audio.
Interference beats are used to objectively measure the accuracy of tuning. As the two pitches approach a harmonic relationship, the frequency of beating decreases. When tuning a unison or octave it is desired to reduce the beating frequency until it cannot be detected. For other intervals, this is dependent on the tuning system being used.
Harmonics may be used to facilitate tuning of strings that are not themselves tuned to the unison. For example, lightly touching the highest string of a cello at the middle (at a node) while bowing produces the same pitch as doing the same a third of the way down its second-highest string. The resulting unison is more easily and quickly judged than the quality of the perfect fifth between the fundamentals of the two strings.

### Open strings

In music, the term open string refers to the fundamental note of the unstopped, full string.
The strings of a guitar are normally tuned to fourths (excepting the G and B strings in standard tuning, which are tuned to a third), as are the strings of the bass guitar and double bass. Violin, viola, and cello strings are tuned to fifths. However, non-standard tunings (called scordatura) exist to change the sound of the instrument or create other playing options.
To tune an instrument, often only one reference pitch is given. This reference is used to tune one string, to which the other strings are tuned in the desired intervals. On a guitar, often the lowest string is tuned to an E. From this, each successive string can be tuned by fingering the fifth fret of an already tuned string and comparing it with the next higher string played open. This works with the exception of the G string, which must be stopped at the fourth fret to sound B against the open B string above. Alternatively, each string can be tuned to its own reference tone.
Note that while the guitar and other modern stringed instruments with fixed frets are tuned in equal temperament, string instruments without frets, such as those of the violin family, are not. The violin, viola, and cello are tuned to beatless just perfect fifths and ensembles such as string quartets and orchestras tend to play in fifths based Pythagorean tuning or to compensate and play in equal temperament, such as when playing with other instruments such as the piano. For example, the cello, which is tuned down from A220, has three more strings (four total) and the just perfect fifth is about two cents off from the equal tempered perfect fifth, making its lowest string, C−, about six cents more flat than the equal tempered C.
This table lists open strings on some common string instruments and their standard tunings from low to high unless otherwise noted.
| Instrument | Tuning |
| violin, mandolin, Irish tenor banjo | G, D, A, E |
| viola, cello, tenor banjo, mandola, mandocello, tenor guitar | C, G, D, A |
| double bass, mando-bass, bass guitar* | (B*,) E, A, D, G, (C*) |
| guitar | E, A, D, G, B, E |
| concert harp | C♭, D♭, E♭, F♭, G♭, A♭, B♭ (repeating) |
| ukulele | G, C, E, A (the G string is higher than the C and E, and two half steps below the A string, known as reentrant tuning) |
| 5-string banjo | G, D, G, B, D (another reentrant tuning, with the short 5th string tuned an octave above the 3rd string) |
| cavaquinho | D, G, B, D (standard Brazilian tuning) |

### Altered tunings

Violin scordatura was employed in the 17th and 18th centuries by Italian and German composers, namely, Biagio Marini, Antonio Vivaldi, Heinrich Ignaz Franz Biber (who in the Rosary Sonatas prescribes a great variety of scordaturas, including crossing the middle strings), Johann Pachelbel and Johann Sebastian Bach, whose Fifth Suite For Unaccompanied Cello calls for the lowering of the A string to G. In Mozart's Sinfonia Concertante in E-flat major (K. 364), all the strings of the solo viola are raised one half-step, ostensibly to give the instrument a brighter tone so the solo violin does not overshadow it.
Scordatura for the violin was also used in the 19th and 20th centuries in works by Niccolò Paganini, Robert Schumann, Camille Saint-Saëns, Gustav Mahler, and Béla Bartók. In Saint-Saëns' "Danse Macabre", the high string of the violin is lower half a tone to the E♭ so as to have the most accented note of the main theme sound on an open string. In Mahler's Symphony No. 4, the solo violin is tuned one whole step high to produce a harsh sound evoking Death as the Fiddler. In Bartók's Contrasts, the violin is tuned G♯-D-A-E♭ to facilitate the playing of tritones on open strings.
American folk violinists of the Appalachians and Ozarks often employ alternate tunings for dance songs and ballads. The most commonly used tuning is A-E-A-E. Likewise banjo players in this tradition use many tunings to play melody in different keys. A common alternative banjo tuning for playing in D is A-D-A-D-E. Many Folk guitar players also used different tunings from standard, such as D-A-D-G-A-D, which is very popular for Irish music.
A musical instrument that has had its pitch deliberately lowered during tuning is said to be down-tuned or tuned down. Common examples include the electric guitar and electric bass in contemporary heavy metal music, whereby one or more strings are often tuned lower than concert pitch. This is not to be confused with electronically changing the fundamental frequency, which is referred to as pitch shifting.

### Tuning of unpitched percussion instruments

Many percussion instruments are tuned by the player, including pitched percussion instruments such as timpani and tabla, and unpitched percussion instruments such as the snare drum.
Tuning pitched percussion follows the same patterns as tuning any other instrument, but tuning unpitched percussion does not produce a specific pitch. For this reason and others, the traditional terms tuned percussion and untuned percussion are avoided in recent organology.

## Tuning systems

A tuning system is the system used to define which tones, or pitches, to use when playing music. In other words, it is the choice of number and spacing of frequency values used.
Due to the psychoacoustic interaction of tones and timbres, various tone combinations sound more or less "natural" in combination with various timbres. For example, using harmonic timbres:
* A tone caused by a vibration twice the frequency of another (the ratio of 1:2) forms the natural sounding octave.
* A tone caused by a vibration three times the frequency of another (the ratio of 1:3) forms the natural sounding perfect twelfth, or perfect fifth (ratio of 2:3) when octave-reduced.
More complex musical effects can be created through other relationships.
The creation of a tuning system is complicated because musicians want to make music with more than just a few differing tones. As the number of tones is increased, conflicts arise in how each tone combines with every other. Finding a successful combination of tunings has been the cause of debate, and has led to the creation of many different tuning systems across the world. Each tuning system has its own characteristics, strengths and weaknesses.

### Systems for the twelve-note chromatic scale

It is impossible to tune the twelve-note chromatic scale so that all intervals are pure. For instance, three pure major thirds stack up to ⁠ 125 / 64 ⁠, which at 1159 cents is nearly a quarter tone away from the octave (1200 cents). So there is no way to have both the octave and the major third in just intonation for all the intervals in the same twelve-tone system. Similar issues arise with the fifth ⁠3/2⁠, and the minor third ⁠ 6 / 5 ⁠, or any other choice of harmonic-series based pure intervals.
Many different compromise methods are used to deal with this, each with its own characteristics, and advantages and disadvantages.
The main ones are:

#### Just intonation

    Prelude No. 1, C major, BWV 846, from the Well-Tempered Clavier by Johann Sebastian Bach. Played in just intonation.
    In just intonation, the frequencies of the scale notes are related to one another by simple numeric ratios, a common example of this being ⁠ 1 / 1 ⁠, ⁠ 9 / 8 ⁠, ⁠ 5 / 4 ⁠, ⁠ 4 / 3 ⁠, ⁠ 3 / 2 ⁠, ⁠ 5 / 3 ⁠, ⁠ 15 / 8 ⁠, ⁠ 2 / 1 ⁠ to define the ratios for the seven notes in a C major scale, plus the return to the tonic an octave up on the 8th ("perfect 8th" or octave). In this example, though many intervals are pure, the interval from D to A (⁠ 5 / 3 ⁠ to ⁠ 9 / 8 ⁠) is ⁠ 40 / 27 ⁠ instead of the expected ⁠ 3 / 2 ⁠. The same issue occurs with most just intonation tunings. This can be dealt with to some extent using alternative pitches for the notes. Even that, however, is only a partial solution, as an example makes clear: If one plays the sequence C G D A E C in just intonation, using the intervals ⁠ 3 / 2 ⁠, ⁠ 3 / 4 ⁠, and ⁠ 4 / 5 ⁠, then the second C in the sequence is higher than the first by a syntonic comma of ⁠ 81 / 80 ⁠. This is the infamous "comma pump". Each time around the comma pump, the pitch continues to spiral upwards. This shows that it is impossible to keep to any small fixed system of pitches if one wants to stack musical intervals this way. So, even with adaptive tuning, the musical context may sometimes require playing musical intervals that are not pure. Instrumentalists with the ability to vary the pitch of their instrument may micro-adjust some of the intervals naturally; there are also systems for adaptive tuning in software (microtuners). Harmonic fragment scales form a rare exception to this issue. In tunings such as 1:1, 9:8, 5:4, 3:2, 7:4, 2:1, all the pitches are chosen from the harmonic series (divided by powers of 2 to reduce them to the same octave), so all the intervals are related to each other by simple numeric ratios.

#### Pythagorean tuning

    Prelude No. 1, C major, BWV 846, from the Well-Tempered Clavier by Johann Sebastian Bach. Played in Pythagorean tuning.
    A Pythagorean tuning is technically both a type of just intonation and a zero-comma meantone tuning, in which the frequency ratios of the notes are all derived from the number ratio 3:2. Using this approach for example, the 12 notes of the Western chromatic scale would be tuned to the following ratios: 1:1, 256:243, 9:8, 32:27, 81:64, 4:3, 729:512, 3:2, 128:81, 27:16, 16:9, 243:128, 2:1 . Also called "3-limit" because it uses no prime factors other than 2 and 3, this Pythagorean system was of primary importance in Western musical development in the Medieval and Renaissance periods. As with nearly all just intonation systems, it has a wolf interval. In the example given, it is the interval between the 729:512 and the 256:243 (F$^♯$ to D$^♭$, if one tunes the ⁠ 1 / 1 ⁠ to C). The major and minor thirds are also impure, but at the time when this system was at its zenith, the third was considered a dissonance, so this was of no concern. See also: Shí-èr-lǜ.

#### Meantone temperament

    Prelude No. 1, C major, BWV 846, from the Well-Tempered Clavier by Johann Sebastian Bach. Played in meantone temperament.
    A system of tuning that averages out pairs of ratios used for the same interval (such as 9:8 and 10:9). The best known form of this temperament is quarter-comma meantone, which tunes major thirds justly in the ratio of 5:4 and divides them into two whole tones of equal size – this is achieved by flattening the fifths of the Pythagorean system slightly (by a quarter of a syntonic comma). However, the fifth may be flattened to a greater or lesser degree than this and the tuning system retains the essential qualities of meantone temperament. Historical examples include ⁠ 1 / 3 ⁠ comma and ⁠ 2 / 7 ⁠ comma meantone.

#### Well temperament

    Prelude No. 1, C major, BWV 846, from the Well-Tempered Clavier by Johann Sebastian Bach. Played in well temperament.
    Any one of a number of systems where the ratios between intervals are unequal, but approximate to ratios used in just intonation. Unlike meantone temperament, the amount of divergence from just ratios varies according to the exact notes being tuned, so that C–E is probably tuned closer to a 5:4 ratio than, say, D$^♭$–F. Because of this, well temperaments have no wolf intervals.

#### Equal temperament

    Prelude No. 1, C major, BWV 846, from the Well-Tempered Clavier by Johann Sebastian Bach. Played in equal temperament.
    The standard twelve-tone equal temperament is a special case of meantone temperament (extended eleventh-comma), in which the twelve notes are separated by logarithmically equal distances (100 cents): A harmonized C major scale in equal temperament (.ogg format, 96.9 KB). This is the most common tuning system used in Western music, and is the standard system used as a basis for tuning a piano. Since this scale divides an octave into twelve equal-ratio steps and an octave has a frequency ratio of two, the frequency ratio between adjacent notes is then the twelfth root of two, 2$^{1/12}$ ≋ 1.05946309 ... . However, the octave can be divided into other than 12 equal divisions, some of which may be more harmonically pleasing, as far as thirds, sixths, and harmonic sevenths (via augmented sixths) are concerned, such as 19 equal temperament (extended ⁠ 1 / 3 ⁠ comma meantone), 31 equal temperament (extended quarter-comma meantone) and 53 equal temperament (extended Pythagorean tuning).
Tuning systems that are not produced with exclusively just intervals are usually referred to as temperaments.

### Other scale systems

* Natural overtone scale, a scale derived from the harmonic series
* Slendro, a pentatonic scale used in Indonesian gamelan music
* Pelog, the other main gamelan scale
* Harry Partch's 43-tone scale
* Bohlen–Pierce scale
* Alpha, beta, delta, and gamma scales of Wendy Carlos
* Quarter tone scale
* Thirteenth Sound
* 19 equal temperament
* 22 equal temperament
* 31 equal temperament
* 53 equal temperament
* Schismatic temperament
* Miracle temperament
* Hexany
* Music portal