
clear all

nfft = 512 ;
ampthreshold = -45 ;
max_freq_plot = 5000 ;
render_method = 'color_2_dot' ;
fft_overlap = fix(nfft*0.9) ;

pathname = 'C:\Documents and Settings\Bruce Land\My Documents\Octave\reassigment\' ;

%fname = 'Porichthys_growl1_22_5.wav';

fname= 'Opsanus_beta_1.wav' ;

[y,Fs] = wavread([pathname,fname]);

%y = y(21000:31000,1);
y = y(fix(.01*Fs):fix(0.7*Fs),1) ;

figure(1);clf;
specgram(y(:,1),nfft,Fs,[], fft_overlap);
colormap gray
set(gca,'ylim', [0 max_freq_plot])

figure(2);clf;
raspecgram(y(:,1), nfft, Fs, [], fft_overlap, ampthreshold, render_method);
set(gca,'ylim', [0 max_freq_plot])