European musical notation started with neumes, which were squiggly lines above the words, and which were intended to sort of sketch out the shape of the melody on single syllables (which might have a lot of notes if sustained a long time). The neumes apparently developed from accent symbols that would be written over Greek/Byzantine text. They spread into Europe during the 800s-900s -- the Carolingian era when the Franks were the greatest European power.
But the ancient Greeks also had a musical notation, two different ones in fact, one called "vocal" and one called "instrumental". The "vocal" notation used letters of the Greek alphabet to indicate notes. The "instrumental" notation used rotations of symbols, some of which are Greek letters but the others of which seem to me to be derived from the earlier Phoenician alphabet, which is where the Greeks got the idea for their alphabet anyway.
(The Greek name for those people, "Phonike", refers to the sounds of speech -- cf. the modern English word "phonics". The Akkadian/Babylonian name for these people was "Kaininu", which is a Semitic word related to the Hebrew word which means "Canaanites". So they were apparently the people who invented the modern type of alphabet where each letter symbol represents approximately one phoneme. Older "alphabets" were really syllabaries, where one sound represented an entire syllable -- a more modern example is the Indian languages derived from Sanskrit, or the scripts of the Dravidian languages of southern India.)
The treatise musica enchiriadis, which has been dated variously from c 860 - 950 AD, but which Monzo believes is an earlier work, has examples of "diastematic" notation, that is, a system of parallel horizontal lines which represent specific pitches, with T (for "tone") and S ("semitone") written in the margins next to the lines, and with the text written in the spaces.
The musica enchiriadis also presents, as its first main topic, the so-called
The gamut of pitches was basically simply a holdover from the ancient Greek theory. the Greek version had an ascending interval structure which we'd represent today by A, B ... a, b-flat, b ... a', and which was tone-semitone-tone.
Because of the nature of the chant, and the fact that D was viewed as the most important starting pitch, the Franks realigned the tetrachords and added a new note ("gamma" γ) at the bottom, so that the whole system was shifted a "tone" downward, G ... g', so that the intervallic structure between degreees of the tetrachords was different from the Greek: tone-tone-semitone. this additional lower note "gamma" γ is where the word "gamut" originated.
Hucbald (840-930 AD) was the theorist primarily responsible for this reorientation of the tetrachords.
The neumes up to this time are called "campo aperto", which means "open field", because the squiggly lines were written on otherwise blank paper (i.e., with no lines), and showed a relative movement of melody but without any reference pitch. One simply had to learn a chant by rote, and the neumes were just there to help.
The type of vertical graphic thinking in the musica enchiriadis eventually resulted in a reference line being drawn across the "campo aperto" to represent a reference pitch. it could be any note, but was generally C, F, or G.
Eventually this practice proved very useful, and scribes began to use a line for all three notes, with letters at the beginning to indicate which was which. This is the origin of our modern clefs: G became the treble clef, C became the C-clefs which are still moveable today (alto and tenor clefs), and F became the bass clef.
These lines were also often given different colors. So a score would have three lines on it with a lot of space in between each line, since the intervals are:
treble G "5th" < middle C "5th" < bass F
It was Guido d'Arezzo, around 1050 or so, who hit on the idea of using the diastematic notation of the musica enchiriadis for notating all the chants he needed to teach to his students, and he also developed the solfege syllables "ut - re - mi - fa - so - la" to represent the pitches in each hexachord, which was his new system of pitch organization.
Guido used a 4-line staff, which became the standard (and still is) for notating Greogorian chant. Composers began adding other lines (up to 12), but eventually settled on the 5-line staff as a standard.
Even tho musicians thought in terms of hexachords (as explained here), the basic gamut of pitches used at that time was 2 octaves of the heptatonic (7-tone) diatonic scale plus the Bb below middle-C.
The hexachord system was based on those 3 reference pitches (which is exactly why they became reference pitches), and thus hexachords came in 3 versions which all had the same symmetrical intervallic structure:
hard G - A - B - C - D - E natural C - D - E - F - G - A soft F - G - A - Bb - C - D "steps" 1 1 1/2 1 1 t t s t t
The process of moving between different types of hexachords by employing common-tones was called "mutation".
There came to be two written symbols for the two different types of "B": round-b (or "soft-b") and square-b (or "hard-b"). The German words "mol/molle" (soft) and "dur" (hard) are still used today in many European languages to describe the difference between "major" and "minor".
Musicians began to modulate more widely and thus employed the idea of mutation to travel to different tonal centers in addition to these 3.
Essentially, mutation employed the "soft-b" to indicate in a relative way a modulation into the "soft" hexachord, whatever its actual pitch might be. So the "soft-b" at this time always indicated a relative and not an absolute pitch.
The "soft-b" gradually evolved into our modern "flat" symbol , and the "hard-b" evolved into both the "sharp" and, later, the "natural .
During the 1300s -- the "manneristic" era when music was composed with a rhythmic complexity that would not be seen again until the 1900s -- modulation became very popular, and by the end of the century the full chromatic scale had evolved, as the flat and sharp symbols were used more and more often to indicate absolute pitches.
Around 1400, there was a sharp decline in chromaticism, and over the next couple of centuries the notation pretty much settled down into the system in general use today.
We have only addressed the notation of pitch here. Of course, there's a whole other aspect of musical notation which is an entire study in itself: the notation of rhythm.