(Sound Files)
(Sound Files)
Line 1: Line 1:
 
== Sound Files ==
 
== Sound Files ==
*[[Media:HW1.1_ECE301Fall2008mboutin.wav|Hail Purdue]]  at normal speed using wavewrite command
+
*[[Media:HW1.1_ECE301Fall2008mboutin.wav|Hail Purdue]]  at normal speed using wavwrite command
 
*[[Media:hw1faster_ECE301Fall2008mboutin.wav|Hail Purdue]]  at double speed
 
*[[Media:hw1faster_ECE301Fall2008mboutin.wav|Hail Purdue]]  at double speed
 
*[[Media:hw1frequency_ECE301Fall2008mboutin.wav|Hail Purdue]]  at twice the frequency
 
*[[Media:hw1frequency_ECE301Fall2008mboutin.wav|Hail Purdue]]  at twice the frequency

Revision as of 06:58, 1 September 2008

Sound Files

MATLAB Code

% Scott Erdbruegger
% Homework 1.1
% Note this Code takes a while to run due to the number of calculations(5000*28)
format compact
clc
clear
delta = .00005;
i=1;
C=261.626;A=5*C/3;B=15*C/8;D=9*C/8;E=5*C/4;F=4*C/3;G=3*C/2;
notes=[E,F,G,A,B,C*2,C*2,D*2,D*2,D*2,A,B,B,C*2,C*2,C*2,B,A,B,C*2,C*2,B,F,G,A,G,F,B];
Lengthofnote=.25;%Note Each syllable has one note aproixamently .25 of a second long
numnotes=28;
t=0;
while t<numnotes*Lengthofnote-.05
    if(mod(i,5000)==0)
        x(i)=0;z(i)=0;t
    else
         x(i)=sin(2*pi*notes(ceil(i/5000))*t);%normal
         z(i)=sin(2*pi*2*notes(ceil(i/5000))*t);%twice frequency
    end
    t=t+delta;i=i+1;
end
t=0;i=1;
while t<numnotes*Lengthofnote/2-.05
    if(mod(i,2500/2)==0)
        y(i)=0;t
    else        
        y(i)=sin(2*pi*notes(ceil(i/2500))*t);%twice as fast
    end
    t=t+delta;i=i+1;
end
wavwrite(x,'hw1normal.wav');
wavwrite(y,'hw1faster.wav');
wavwrite(z,'hw1frequency.wav');

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood