Re: Understanding FFT as A Coder and Synth Nut, Freq Tracking

  • From: Veli-Pekka Tätilä <vtatila@xxxxxxxxxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 13 Oct 2007 12:18:32 +0300

Hi dusty,
I'm not certain if the strongest harmonic from FFT is in fact quite
sufficient for frequency tracking, at least out of the box. I'd have to
test that first. One would think that merely counting zero crossings
would give you a rough idea of the fundamental, too, but I'm not sure.
Certainly there are tuners, octalizers and sub-oscillators out there but
I am not sure how they are actually created. There might be one for the
shareware Reaktor clone SynthEdit, whose sources are available. Or for
the real-time, Java-like programmable audio processing environment
called ChucK. LInks:

SynthEdit and user submited modules:

http://www.synthedit.com/

ChucK:

http://chuck.cs.princeton.edu/

Tech talk beyond me on implementing a frequency tracker:

http://music.columbia.edu/pipermail/music-dsp/2006-May/065375.html

Music DSP source archive:

http://www.musicdsp.org/archive.php?classid=0

Certainlyh, as far as simple tracking goes, it is totally thrown off by
chords and noise. On a guitar, taking a chord results in it trying to
track the strongest amplitude which varies over time. The same is true
of a decaying note, though the human ear can easily interpolate even
lower frequencies that are not there any more but are part of a harmonic
series, FFT cannot see that, of course.

I did some further thinking about FFT and in addition to sampling rate
telling me the maximum frequency, the size of my array to be analysed
must tell the minimum or lowest frequency, too. That is if there was a
pulse wave it would have to cross the zero twice, in that array, to get
its fundamental frequency. The same is true more generally, too, I
guess. Also,  if one wants to see how the frequencies change over time,
does that mean I need several passes on slightly overlapping arrays?
Would caching help performance since the same samples may be analysed
repeatedly? Again, I don't understand the mathematical underpinnings,
I'm just looking at what free source code can give me, as a coder.

-- 
With kind regards Veli-Pekka Tätilä (vtatila@xxxxxxxxxxxxxxxxxxxx)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila

PS: I think FFT is short for Fast Fourier Transform. Which is some math
shortcuts for the generic case discrete Fourier Transform.

--
With kind regards Veli-Pekka Tätilä (vtatila@xxxxxxxxxxxxxxxxxxxx)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila

dusty bray wrote:
>Is FFT sufficient for creating a guitar tuner?
>A while back, i came up with a cool game concept that used singing for input.  
>i tried using FFT to find the >fundamental frequency of human voice, but 
>quickly became frustrated and eventually just gave up.  i thought that i 
>>could just use the frequency that had the highest amplitude, but this didn't 
>work consistently (especially not in real->time).  i hate to admit it, but i 
>don't really understand the FFT algorithm either.
>i do know that a free FFT library exists.  i think it's called Fastest Fourier 
>Transform in the West (FFTW).
>Let me know if you find a way to do this in real-time.  i would like to finish 
>my game <smile>.
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts:

  • » Re: Understanding FFT as A Coder and Synth Nut, Freq Tracking