(New page: %Howard Ho %first we figure out the scale frequency a=440; c=3*a/5; uc=2*c; %upper c b=15*c/8; lg=3*c/2; %lower g g=lg*2; f=4*c/3; le=5*c/4; %lower e d=9*c/8; e=2*le; as=16*a/15; %a sha...)
 
 
Line 80: Line 80:
 
y = sin(2*pi*a*t);
 
y = sin(2*pi*a*t);
 
sound(y,1/del); %a
 
sound(y,1/del); %a
 +
 +
%NOTE: edit mode

Latest revision as of 18:47, 23 June 2009

%Howard Ho %first we figure out the scale frequency a=440; c=3*a/5; uc=2*c; %upper c b=15*c/8; lg=3*c/2; %lower g g=lg*2; f=4*c/3; le=5*c/4; %lower e d=9*c/8; e=2*le; as=16*a/15; %a sharp

%time of those notes and play them~! del = 0.0001;

t = 0:del:1/6; y = sin(2*pi*e*t); sound(y,1/del); %e

y = sin(2*pi*e*t); sound(y,1/del); %e

y = sin(2*pi*e*t); sound(y,1/del); %e

%there shouldn't be g in the actually song.

t = 0:del:1/8; y = 0; sound(y,1/del); %rest

t = 0:del:1/6; y = sin(2*pi*uc*t); sound(y,1/del); %c

y = sin(2*pi*e*t); sound(y,1/del); %e

t = 0:del:1/2; y = sin(2*pi*g*t); sound(y,1/del); %g

y = 0; sound(y,1/del); %rest

t = 0:del:1/6; y = sin(2*pi*uc*t); sound(y,1/del); %c

y = sin(2*pi*lg*t); sound(y,1/del);%low g

y = 0; sound(y,1/del); %rest

y = sin(2*pi*le*t); sound(y,1/del); %low e

t = 0:del:1/8; y = 0; sound(y,1/del); %rest

t = 0:del:1/6; y = sin(2*pi*a*t); sound(y,1/del); %a

y = sin(2*pi*b*t); sound(y,1/del); %b

t = 0:del:1/8; y = 0; sound(y,1/del); %rest

t = 0:del:1/6; y = sin(2*pi*as*t); sound(y,1/del); %a#

y = sin(2*pi*a*t); sound(y,1/del); %a

%NOTE: edit mode

Alumni Liaison

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

Buyue Zhang