HW1, ECE301, Prof. Boutin

In this homework assignment, we were asked to write a Matlab code to play the "Hail Purdue" song with different speeds and pitch.


%Splitting the song into phases :

ph1 = 320;ph2 = 340;ph3= 400;ph4= 420;ph5= 475;ph6= 540;ph7= 561;ph8= 497;

brk = 0;

%Giving the parameters

smps = 21500;

bitrate = 65/130;

x = bitrate;

j = 2*x;

w = 1.5*x;

d = .5*x;

phases = [ph1, ph2 ph3 ph4 ph5 ph6 ph6 ph7 ph7 ph7 ph4 ph5 ph8 ph6]; freq = [j x x w d x x x d d x d d j]

  • after this point i wasnt sure of what to do

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood