From: Jim Peters (jim_at_uazu.net)
Date: 2002-06-16 07:04:11
Michal Wallace wrote:
> 2. Since Nyquist's rule says we need to sample at least
> twice as fast as the highest frequency we want to detect,
> the hardware folks have chosen a sample rate of 128Hz
> or 256Hz. (I'm not sure about this, I thought I'd read
> it somewhere... Can anyone tell me the actual rates?)
It would be better to make it flexible -- it might be 128Hz, 200Hz, or
256Hz -- who knows ?
> 3. The FFT returns an array of the same length as the
> input, but we discard half of it because it deals with
> imaginary numbers. Each slot in the array (or "bin", I've
> seen it called) represents a set of frequencies
> max-detectible-frequency/window-length wide.
> Is that true?
>
> So, if I want each bar to represent 0hz, 1hz, ... 32hz, and
> we have 256 samples per second, then then I need to have all
> 256 samples, which gives me 128 bins, each 1Hz wide. Then I
> can just show the first 32. Is that right?
Yes, this all sounds correct to me so far.
Remember that you are always trading frequency resolution against
speed of response. You could have very narrow bins, but you would
need a huge long window; or alternatively, you could have a very fast
response, but you would end up with big fat bins.
> If so... Do I just update the screen once a second? Or
> should I show the last second's worth of data every 1/4th of
> a second, even though 75% of the data is the same each time?
It sounds like quite a good idea to show a second's worth of data 4
times a second (or more), as you suggest.
Jim
-- Jim Peters (_)/=\~/_(_) jim_at_uazu.net (_) /=\ ~/_ (_) Uazú (_) /=\ ~/_ (_) http:// B'ham, UK (_) ____ /=\ ____ ~/_ ____ (_) uazu.net
This archive was generated by hypermail 2.1.4 : 2002-07-27 12:28:43 BST