> they are. I'm -0 on the spectrogram, having personally spent time
> trying to use a naive spectrogram as a power spectrum estimator. I
> only spent enough time on that task
> to come to the understanding that it wasn't as simple as it seemed
> it should be.
it is easy, example Matlab code (maybe works in Octave or Scilab)
only "calc the spectrogram" should be implemented in commons.apache.org
------------------------------------------------------------------------------------
clear; clc;
% read sound
[sound fs nbits] = wavread('test.wav');
sound = sound(:,1);
% sonagram parameters
fftsize = 8192;
overlap = 15/16;
window = hann(fftsize);
stepsize = floor(fftsize - (fftsize * overlap));
% initialise memory
sona = zeros(fftsize/2+1,
floor((length(sound)-round(overlap*fftsize))/stepsize));
% calc the spectrogram
index = 1;
for pos=1:stepsize:length(sound)-fftsize,
spectrum = fft(window .* sound(pos:pos + fftsize - 1));
sona(:, index) = spectrum(1:fftsize/2+1);
index = index + 1;
end;
% show graphic
[row column] = size(sona);
t = 1:column;
f = 1:row;
surf(t,f,10*log10(abs(sona)),'EdgeColor','none');
axis xy; axis tight; colormap(Jet); view(0,90);
------------------------------------------------------------------------------------
> I would prefer that the package provide a function that "does what most
> people think of when
> thinking about a spectrogram" rather than the naive spectrogram.
it does exactly the same that Audacity, Wavelab, Raven etc. does
greetings
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]