naturerecordists
[Top] [All Lists]

Re: More on scrolling spectrograms

Subject: Re: More on scrolling spectrograms
From: "Peter Shute" pshute2
Date: Sun Jan 13, 2013 2:49 pm ((PST))
By coincidence, the sox teams just released a new release candidate version of 
sox, available at 
http://sourceforge.net/projects/sox/files/release_candidates/sox/14.4.1rc2/, 
which will generate a spectrogram up to 200,000 pixels wide.

I haven't tested that fully yet, but just created one 50,000 pixels wide for a 
30 minute wav file, and it looks ok. That means I'd still have to do the 
spectrogram for my 3 hour test in two parts, but I won't be doing that too 
often.

Sox doesn't give you much control over the spectrogram parameter, you can't 
specify the FFT window size or overlap. You just tell it how many pixels high 
and how wide (or pixels per second), and it decides how it's going to do it. I 
was suprised to find that they were satisfactory for my purpose.

It generates it for 0Hz up to half the rampling rate, whether you want it or 
not, so I had to resample to 16kHz to get it to stop at 8kHz. I don't know if 
this will have any noticeable affect on the spectrogram, but I haven't seen 
anything odd.

Oddly, if you specify a height that's a power of 2, plus one, it runs much 
faster. The 30 minute spectrogram took about 9 minutes to generate, which I'd 
call slow. I think it was much quicker to do it in 5000 pixel segments, so 
maybe it's got memory problems handling more at once.

Peter Shute

From:   On 
Behalf Of Peter Shute 
Sent: Sunday, 13 January 2013 8:15 PM
To: 
Subject: Re: [Nature Recordists] Re: More on scrolling spectrograms


I ended up using sox, the command line audio program, to dump the image. Not 
quite as good as some of the other programs I tried, but it has the advantage 
that I have full control of the scales, and I can now probably automate the 
whole process.

It will only create an image a maximum of 5000 pixels wide (3 minutes at the 
scale I chose), so I had to join dozens of them together, but that can be 
automated too. The program authors have agreed to increase it to 200,000 pixels 
in the next release, probably sometime this year.






<Prev in Thread] Current Thread [Next in Thread>
Admin

The University of NSW School of Computer and Engineering takes no responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the naturerecordists mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU