title: Algorithms for determining the key of an audio sample
body: <p>I am interested in determining the musical key of an audio sample. How would (or could) an algorithm go about trying to approximate the key of a musical audio sample?</p>
  
  <p>Antares Autotune and Melodyne are two pieces of software that do this sort of thing.</p>
  
  <p>Can anyone give a bit of a layman's explanation about how this would work? To mathematically deduce the key of a song by analysing the frequency spectrum for chord progressions etc.</p>
  
  <p>This topic interests me a lot!</p>
  
  <p><strong>Edit - brilliant sources and a wealth of information to be found from everyone who contributed to this question</strong>.</p>
  
  <p>Especially from: the_mandrill and Daniel Brückner.</p>