POV-Ray : Newsgroups : povray.off-topic : Spectrum : Re: Spectrum Server Time
4 Sep 2024 15:18:16 EDT (-0400)
  Re: Spectrum  
From: Invisible
Date: 30 Apr 2010 08:44:17
Message: <4bdad0a1@news.povray.org>
scott wrote:
>> (You might think, for example, that you could just snip your 5-minute 
>> song into, say, 50 ms chunks and take the Fourier transform of each 
>> chunk. Alas, snipping it up introduces phantom frequencies that aren't 
>> really there.)
> 
> Use something other than a rectangular window function then, that helps 
> with the phantom frequencies.

The [discrete] Fourier transform reduces a signal to a finite number of 
frequencies by assuming that the signal is periodic - i.e., the samples 
you've fed it repeat forever. If the endpoints don't match up, that 
introduces a discontinuity, which causes phantom frequencies to appear. 
(They represent the discontinuity.)

You can reduce this by using another window function - but then, 
strictly speaking, you're multiplying your signal by a window, which 
convolves its spectrum with the spectrum of the window. In other words, 
by windowing the signal you're blurring its spectrum.

>> I've spent a significant amount of time trying to come up with some 
>> mathematics for analysing sound the way that the human auditry system 
>> does... So far, nothing works.
> 
> If you don't need it in realtime then just run a band-pass filter over 
> the whole song at varying frequencies, you can then read off the 
> amplitude at any frequency at any time during the song.

This, of course, is effectively what the human ear does. (As in, the 
physical organ, not the elaborate post-processing that undoubtably 
happens when the data reaches the brain.) Each hair in the cochlea is 
essentially a crude band-pass filter. (I don't imagine they actually 
have a great frequency response; much like the human eye isn't actually 
a very good camera.)

So far, everything I've ever learned about DSP seems to hinge on one 
single equation:

   sin X + sin Y = 2 cos (X-Y)/2 sin (X+Y)/2

This says many things. But most obviously, it says that the sum of any 
two waves is also the product of two *other* words, and vice versa. So 
the question is, at what frequency does a wave become "sound" rather 
than "variation in sound"?

The *other* question, of course, is "how many frequency bands do I need?"


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.