pre Bach (the chap who devised our 'tempered scale' system notes were worked out mathematically (based on Pythagoras - the triangle guy), so that (for example) C# and Db were slightly different in pitch from each other which meant that changing key could be a bit of a bugger, as the keyboard instrument (spinnet, virginal, harpsicord etc...) had to be tuned to the new key. What Bach did was to work out a pitch that sat equally in between the two, and just use that for both pitches.
Bach then went on to publish the 'Well Tempered Clavier' to demonstrate his system. The books featured keyboard pieces across all of the keys that could be played without retuning the instrument.
Bingo!
Do you know Bach's organ works?
of course it does - he had 23 children!