view toolboxes/bioakustik_tools/visualisation/filespecgram.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
line wrap: on
line source
function out=filespecgram(working_file, varargin)

[starts,stops, unused]=process_options(varargin,'starts',0,'stops',-1);


filesize=wavread(working_file,'size');
audiodatalen=filesize(1);
num_channels=filesize(2);
[src,sr,bits] = wavread(working_file,[1 2]);


startspl=max(1,starts*sr);
if stops =-1,
    stopspl=audiodatalen;
else
    stopspl=max(1,starts*sr);
end
 
sgram=dataspecgram(src(startspl:stopspl,1),'sr',sr);