title: Identifying common periodic waveforms (square, sine, sawtooth, ...)
body: <p>Without any user interaction, how would a program identify what type of waveform is present in a recording from an ADC?  </p>
  
  <p>For the sake of this question: triangle, square, sine, half-sine, or sawtooth waves of constant frequency.  Level and frequency are arbitrary, and they will have noise, small amounts of distortion, and other imperfections.</p>
  
  <p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Waveforms.svg/350px-Waveforms.svg.png" alt="Various waveforms"></p>
  
  <p>I'll propose a few (naive) ideas, too, and you can vote them up or down.</p>