2
$\begingroup$

I have an ADC that will have a guitar track as an input. I want to find which notes are hitting via the frequency domain. Given that guitar frequency range is from 82Hz to 1046Hz which sample rate (window) should I choose? I had read on an article about some kind of rule but I can't find it..

$\endgroup$
3
$\begingroup$

Strictly speaking, according to the sampling theorem, you would need to sample at a rate that is at least twice the bandwidth of your signal (which is around 960 Hz in your example). The low end of your band is close to zero, so you'd probably want to sample at 2092 Hz at least. In practice, you'll want to give some additional headroom to allow rolloff of your analog antialiasing filter, so that might put you in the 2500-3000 Hz range. Depending upon what hardware you're using for analog-to-digital conversion, there may be some restrictions as to what rates it supports; you'll need to take this into account as well.

$\endgroup$
5
$\begingroup$

Depends on your specific application. First of all the guitar has a lot bigger frequency range than you indicate. While the fundamentals are in this range, the guitar has a lot of harmonics and in fact the bulk of the energy is in the harmonics, not the fundamental. So when you plug the low E string at 80 Hz, there is actually not that much energy at 80 Hz but way more at 160Hz, 240Hz, 320 Hz, etc. Same for the higher strings.

In the case it may be simplest to take an off the shelf audio ADC that operates at some standard rate (8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000). The exact choice depends on the requirements for your application. For ,say, a tuner, I'd do at least 16k.

$\endgroup$
2
$\begingroup$

A guitar's actual spectral frequency range is not what you stated. Guitar strings often put out sounds consisting of a lot of higher harmonics of the note pitch that are sometimes more useful in determining the pitch than trying to estimate pitch from a weak or even missing fundamental in the spectrum. Thus a sample rate significantly higher than 2X the highest pitch may prove to greatly increase the reliability of your pitch detection/estimation algorithm. You will also need to sample at above 2X the cutoff frequency of the required anti-aliasing low pass filter.

For guitar sound, using just the magnitude peak from a windowed FFT (for any window length) is unlikely to be a reliable estimator.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.