I have got the pitch detection fully working (I think), though I may
still try to implement autocorrelation later as I've heard that it does
a better job at estimating the pitch, but we shall see.