Adam H. answered 10/07/20
Collegiate-Level Musicologist with 5 Years of Teaching Experience
You ask a very compelling question about the origins of accidentals, or the flat (), natural (
), and sharp (
) signs in music notation!
First of all, note that while music notation in Western European contexts started showing up by the 9th century, the symbols that were written on the pages existed largely as a tool for memorization, and therefore had slightly different implications compared to what musicians are used to today. It took many centuries to codify notation practices.
That said, the earliest usage of accidentals dates back to the 11th century, when the Italian-born Guido of Arezzo published Micrologus, a book for singing instruction. Guido promoted two versions of the note B, as each would fit within different six-note scales known as hexachords. These two different B's, b rotundum or "round b" () and b quadratum or "square b" (
), would later relate to our modern concepts of B-flat and B-natural. Over the next two centuries, the quadratum developed two iterations (
and
), each representing the raising of semitones, but even then those symbols were not completely codified as to their purpose. Barlines were introduced more and more in the 17th century, and by the 18th century, the sharp (
) had grown in prevalence and the "natural" sign (
) became designated as a symbol to cancel out other alterations of the semitone.
Now with regard to German practices: 16th-century German printers decided to use the letter "h" in place of the quadratum or square b, and this practice eventually grew into writing B-flat as "B" and B-natural as "H".
As far as I understand, the "hash", octothorpe or number sign (#) has a different history when compared to the musical sharp ().
Adam