Re: Sonograms in IDL? [message #41808] |
Fri, 26 November 2004 04:34 |
Ben Panter
Messages: 102 Registered: July 2003
|
Senior Member |
|
|
Christopher Lee wrote:
>
> As for cautions, be wary of memory usage, if you want
> high time and frequency resolution, you'll need a big chunk of memory.
>
> (wavelet analysis would do the same as a sonogram, but wavelets use
> even more memory, combining this with even a small audio sample does
> wonders for stress testing your machine :)
Yeup - the first thing I tried was a straight FFT of the datavector. I
hadn't realised a little wave file could contain so many numbers!
I'll see what I can do with the windowing functions - cheers.
Ben
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Ben Panter, Garching, Germany
email via www.benpanter.co.uk
|
|
|
Re: Sonograms in IDL? [message #41811 is a reply to message #41808] |
Thu, 25 November 2004 11:20  |
Chris Lee
Messages: 101 Registered: August 2003
|
Senior Member |
|
|
In article <30mgq3F30n975U1@uni-berlin.de>, "Ben Panter" <me@privacy.net>
wrote:
> Hi Guys,
>
> A friend who works with birds has asked me to have a look at some
> recordings (wav format). The recordings are mimics of a model sound (I
> have this too). She wants to try to think of some sort of statistical
> measure of their similarity - basically how well the bird is doing at
> copying. At the moment I've happily read in the wav files with read_wav,
> and have started playing around with signal processing bits. From
> various websites it appears that I can get lots of interesting
> information by creating something called a sonogram - pitch v. time,
> with amplitude represented by a heavier colour.
> Before I go through the process of writing my own sonogram program,
> does anyone have one that they are willing to share? Or any advice on
> potential pitfalls?
>
> Thanks,
>
> Ben
>
Hi,
A sonogram is really just a fourier transform of the signal with a
sliding `window'. My suggestion would be to write the function in a way
which allows you to define the window function.
Simple windowing functions (well... all windowing functions) will create
distortions(ringing) in your data, a square window being the worst, a Gaussian
being one of the better functions. You then have to decide how big your
window will be. If it's too big, your time resolution drops, too
small and the frequency range/resolution drops.
As for cautions, be wary of memory usage, if you want
high time and frequency resolution, you'll need a big chunk of memory.
(wavelet analysis would do the same as a sonogram, but wavelets use
even more memory, combining this with even a small audio sample does
wonders for stress testing your machine :)
Chris.
|
|
|