get_separation.asv

get_separation.asv - % $Revision: 1.5 $ $Author: nailon $...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 % $Revision: 1.5 $ $Author: nailon $ $Date: 2004/05/09 03:18:48 $ function [sep_list,mn,st, section,f,kernel,section_conv_kernel] = get_separation(y,x,r1,r2) % Returns a vector of song separators. Each separator % is specified as its distance from the center. % y,x - The record center. % r1,r2 - upper,lower limit of search % Assumes that the part above the record and the area of % the center of the record are not between r1 and r2 global Grecord global section global Gdebug global Gstart_end_thresh global Gend_panic_skip sep_list = [] mn=0 st=0 if (Gdebug == 1) y x r1 r2 y-r1 y-r2 x end section = transpose(Grecord(floor(y-r1):floor(y-r2),floor(x)-50:floor(x)+50)) f=0 [h w] = size(section) for i=1:h for j=1:3 rndm=floor(rand*(w-w/3)+1) f=f+abs(fft single((section(i,rndm:floor(rndm+w/3))))) % f=f+abs(fft(single(op))) end end f(1:30) = 0 f(floor(w/6):end) = 0 [maxval maxind] = max(abs(f)) track_width = floor((w/3)/maxind) if (Gdebug==1) track_width end %%%%% Find top point and low point of the record inside %%%%% the given interval kernel = 1:floor(track_width*30)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

get_separation.asv - % $Revision: 1.5 $ $Author: nailon $...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online