We owe our concept of scale and temperament to the ancient Greeks. The ancient Greek music theoretician, Aristoxenus of Tarantum (4th century B.C.), wrote about the origin of the diatonic scale: "We can establish that the diatonic is the first (proton) and the oldest (presbyteron); this is the type that the human voice naturally finds" (Harmonic Elements I, cited by Haik-Vantoura in her Les 150 Psaumes dans leurs melodies antiques, p. T-51).
The chromatic scale, which may be derived from the diatonic scale, was also ancient. Aristoxenus' view is that its origins "go back into the night of time". He also cited "mixed" scales of the "diatonic-chromatic" genre (a modern example being our "harmonic minor"), as did Plutarch (De musica)
The Greeks studied the relationship between string length and pitch with an instrument called the mono chord. Its base was a resonating box, over which a single string was stretched. With one end secured by a hitch pin, the string passed over a fixed bar or nut, across a movable bridge, over a second fixed bar, finally secured at its other end by an adjustable tuning peg. Using the movable bridge to divide the string into two lengths set to different ratios, they could study the relationship between string lengths and interval.
We believe that Pythagoras (born on Samos in 582 BC) first demonstrated that two strings, the ratio of their lengths being 2:1, produced an interval of an octave and that the shorter string produced the higher note. He also discovered that the interval of a perfect fifth was associated with the ratio 3:2, and that the octave could be completed with a second interval, a perfect fourth, associated with the ratio 4:3. He demonstrated this by multiplying 3:2 by 4:3 giving 2:1, the ratio for an octave.
This system was extended by introducing a tone, the difference between a perfect fifth and a perfect fourth, with the ratio 9:8. Using the fact that a perfect fourth is made up of two tones plus one semitone, the ratio for the semitone was calculated to be 256:243. Unfortunately, already we have a problem. Two semitones, each set to the ratio 256:243 do not quite make a tone with ratio 9:8.
The association of musical harmony with ratios of small integers would have commended itself to early Greek philosopher-mathematicians who believed that all numbers were either integer or rational (i.e. a rational number can be written as the ratio of two integers) until it was proved that the square root of two is irrational. The shock was all the greater because one can construct a line of irrational length. The square root of two is the length of the hypotenuse of a right-angled triangle whose other sides are each of unit length.
What we know of Greek music indicates that the lyre was one of their most important instruments. There is little evidence that it performed a harmonic role; rather, it seems to have been used to play melody. The early lyre had three strings but, by the seventh century BC, a fourth string had been added. The four strings were most probably tuned to the notes of a Dorian tetrachord (intervals: tone, tone, semitone), the four notes encompassing a perfect fourth.
Relying on vague, even contradictory evidence, we believe that Pythagoras, or Lichaon of Samos, increased the number of strings to eight, joining two Dorian tetrachords with a tone between them to produce what today we call the major scale (intervals: [tone, tone, semitone], tone, [tone, tone, semitone]), the top and bottom strings being one octave apart. This eight-stringed instrument was called the kithara, from which we get the words 'cittern' and 'guitar'.