Daniel@0: function movie = CorrelogramMovie(data, sr, frameRate, width) Daniel@0: % function movie = CorrelogramMovie(data, sr, frameRate, width) Daniel@0: % Compute a Matlab movie of a sound array called "data" which has Daniel@0: % a sampling rate of sr Hz. Compute frameRate frames per second, each Daniel@0: % time taking "width" samples for analysis. Daniel@0: Daniel@0: % (c) 1998 Interval Research Corporation Daniel@0: Daniel@0: if nargin < 2, sr = 16000; end Daniel@0: if nargin < 3, frameRate = 12; end Daniel@0: if nargin < 4, width = 256; end Daniel@0: Daniel@0: [channels, len] = size(data); Daniel@0: frameIncrement = fix(sr/frameRate); Daniel@0: frameCount = floor((len-width)/frameIncrement)+1; Daniel@0: Daniel@0: movie = moviein(frameCount); Daniel@0: for i=1:frameCount Daniel@0: start = (i-1)*frameIncrement + 1; Daniel@0: pic = CorrelogramFrame(data, width, start, frameIncrement*2); Daniel@0: minimum = min(min(pic)); Daniel@0: maximum = max(max(pic)); Daniel@0: image((pic-minimum)/(maximum-minimum)*length(colormap)); Daniel@0: drawnow; Daniel@0: movie(:,i) = getframe; Daniel@0: end