Line 16: Line 16:
 
  HailP = [soundA soundB soundC soundD soundE soundF];  %Programming statement
 
  HailP = [soundA soundB soundC soundD soundE soundF];  %Programming statement
 
  sound(HailP,1/steps);                                %sound command
 
  sound(HailP,1/steps);                                %sound command
 +
 +
 +
sound(HailP,1/steps*2);  %To get the song to play at two times the actual speed.

Revision as of 19:22, 4 September 2008

%Jayanth Athreya %Home Work 1.1 Hail Purdue Song %Not very sure. Thought it sounds something like it

 steps = 0.00025;   % Initialising the steps.I think it is very lengthy
 t=0:steps:0.5;     % Setting the interval
soundA = sin(2*pi*330*t);  %First sound
t=0:steps:0.6;             %Break between the previous and the next sound  
soundB = sin(2*pi*338*t);  %Second sound
soundC = sin(2*pi*390*t);  %Third sound
soundD = sin(2*pi*420*t);  %fourth sound
soundE = sin(2*pi*490*t);  %fifth sound
t=0:steps:0.53;            %break 
soundE = sin(2*pi*490*t);  %Repitition of the fifth sound
t=0:steps:0.5;             %break
soundF = sin(2*pi*500*t);  %Ending sound
HailP = [soundA soundB soundC soundD soundE soundF];  %Programming statement
sound(HailP,1/steps);                                 %sound command


sound(HailP,1/steps*2);   %To get the song to play at two times the actual speed.

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang