create_song.m

create_song.m - function create_song(first_bun,last_bun) %...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 function create_song(first_bun,last_bun) % $Revision: 1.3 $ $Date: 2004/05/10 02:13:50 $ $Author: mmccann $ global Gmaster Galigns Gall_waves Gdir Gnum_scans buns = first_bun:last_bun num_buns = length(buns) samples = 0 for i=buns samples = samples + max_bundle_size(i) end Gmaster = zeros(1,samples) mwLast = 0 % find first sector and groove [secCur grCur] = find_bundle_begin(buns(1)) % Initialize Gmaster with this sector and groove load_aligns(buns(1)) load_waves(buns(1)) len = length(Gall_waves(secCur).waves) Gmaster(mwLast+1:mwLast+len) = Gall_waves(secCur).waves(grCur,:) mwLast = mwLast+len [secPre grPre secCur grCur] = incSecGr(secCur, grCur) for i=buns % we assume that Gmaster has been initialized. load_aligns(i) load_waves(i) % Calculate the Starting Point if (i == buns(1)) % We are first and therefore the starting point is already initialized else % We are not first so we can use secNextOne and grNextOne as a starting % point. We must also calculate secPre and grPre [secPre grPre secCur grCur] = incSecGr(secNextOne,grNextOne) end % Calculate the Stopping Point if (i ~= buns(end)) % we know that we are not the end and we should therefore use the jump % alignment information for the stopping point. S = load(sprintf('%s/%d.jump.mat',Gdir,i)) secLastT = 1 grLastT = S.groove(1) secNextOne = 1 grNextOne = S.groove(2) % we must also make sure that we can get to this position. We might have
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.

This note was uploaded on 04/20/2008 for the course ENGR 190 taught by Professor Staff during the Spring '08 term at Santa Clara.

Page1 / 8

create_song.m - function create_song(first_bun,last_bun) %...

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