On 8/18/12 10:50 PM, rickman wrote:
> On 8/17/2012 10:09 PM, robert bristow-johnson wrote:
>> On 8/16/12 7:52 PM, rickman wrote:
...
>>> Thanks, I did that and found a few dozen myself. I learned a lot from a
>>> wikipedia page on commercial products including some that are high end
>>> and strobe based. That might be a useful way to go. I just have to find
>>> something that isn't too much work.
>>
>> do you think auto-correlation is too much work?
>
> I didn't get the question until now. By auto-correlation you mean a
> sliding correlation so that each result is with a different delta in
> time.
yup. i call that "delta" the "lag".
> No, I think that has comparable computation to a DFT and the
> advantage of the DFT is that it can be done over a subset of the full
> frequency range rather than always having to calculate the full range
> like an FFT.
you can compute the autocorrelation with a subset of lags. you don't
need to do it for every possible integer lag, but only the lags of interest.
> However, to find the frequency of interest a broader auto-corr or xFT
> would need to be performed initially. Then a detailed analysis could be
> done to hone in on the exact frequency.
yah.
> I'm also intrigued by some of the "stroboscopic" methods, but I haven't
> looked at how to implement them yet.
>
> My current thinking is that no matter what method I go with, it needs to
> be very high "performance", meaning highly accurate and reasonably fast.
> I believe the market is not large for this particular device. So better
> to go Cadillac and charge a price premium than to try to find a spot in
> a crowded, high volume market.
then i'm pretty sure that autocorrelation or AMDF or ASDF is what you'll
want to do.
> So that means, will an auto-corr approach do a good job of resolving a
> fraction of a cent for a tuner in less than say the two or three seconds
> a note will sustain? I would have to consider just how accurate the
> auto-corr might be.
pretty accurate, but *any* pitch detector *can* possibly have octave
errors (it's what can happen if you have inaudible sub-harmonics). then
you need to program the thing to have a little bit of common sense to
avoid some of the dumber octave errors. i think that looking for energy
at the frequency of the fundamental is a dumb octave error because there
could be more energy at the 2nd harmonic or the 3rd harmonic and your
alg might think that either of those is the fundamental frequency.
does your DSP or whatever processor have conditional branch
instructions? you don't need to compute the whole autocorrelation (all
of the lags) for each and every sample. in fact, you might just compute
*one* lag per sample and have a couple of special states where you set
up the autocorrelation and where you process or scan the results of the
autocorrelation to come up with a period length. and you can do some
interpolation-like stuff to get the period to a precision of a fraction
of a sample period. i.e. look for the peak where it falls between two
integer lags. it's not hard.
that's all you get for free.