(Matlab Code)
(Sound Files)
 
Line 2: Line 2:
 
[[Media:serekson_hailpurdue1_ECE301Fall2008mboutin.wav]]
 
[[Media:serekson_hailpurdue1_ECE301Fall2008mboutin.wav]]
 
[[Media:serekson_hailpurdue2_ECE301Fall2008mboutin.wav]]
 
[[Media:serekson_hailpurdue2_ECE301Fall2008mboutin.wav]]
 +
[[Media:serekson_hailpurdue3_ECE301Fall2008mboutin.wav]]
  
 
==Matlab Code==
 
==Matlab Code==

Latest revision as of 16:01, 5 September 2008

Sound Files

Media:serekson_hailpurdue1_ECE301Fall2008mboutin.wav Media:serekson_hailpurdue2_ECE301Fall2008mboutin.wav Media:serekson_hailpurdue3_ECE301Fall2008mboutin.wav

Matlab Code

%Spencer Erekson
%ECE 301 Homework 1 Problem 1
%September 4, 2008

delta=1/20000;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Normal Speed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A  = sin(2*pi*(0:delta:1)*220.000);
Bb = sin(2*pi*(0:delta:1)*233.082);
B  = sin(2*pi*(0:delta:1)*246.942);
C  = sin(2*pi*(0:delta:1)*261.626);
Db = sin(2*pi*(0:delta:1)*277.183);
D  = sin(2*pi*(0:delta:1)*293.665);
Eb = sin(2*pi*(0:delta:1)*311.127);
E  = sin(2*pi*(0:delta:1)*329.628);
F  = sin(2*pi*(0:delta:1)*349.228);
Gb = sin(2*pi*(0:delta:1)*369.994);
G  = sin(2*pi*(0:delta:1)*391.995);

%an array of the notes 
notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb];

sound(notes,1/delta);

wavwrite(notes,1/delta,32,'serekson_hailpurdue1.wav');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Twice Speed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A  = sin(2*pi*(0:delta:.5)*220.000);
Bb = sin(2*pi*(0:delta:.5)*233.082);
B  = sin(2*pi*(0:delta:.5)*246.942);
C  = sin(2*pi*(0:delta:.5)*261.626);
Db = sin(2*pi*(0:delta:.5)*277.183);
D  = sin(2*pi*(0:delta:.5)*293.665);
Eb = sin(2*pi*(0:delta:.5)*311.127);
E  = sin(2*pi*(0:delta:.5)*329.628);
F  = sin(2*pi*(0:delta:.5)*349.228);
Gb = sin(2*pi*(0:delta:.5)*369.994);
G  = sin(2*pi*(0:delta:.5)*391.995);

notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb];

sound(notes,1/delta);

wavwrite(notes,1/delta,32,'serekson_hailpurdue2.wav');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Twice Frequency
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A  = sin(2*2*pi*(0:delta:1)*220.000);
Bb = sin(2*2*pi*(0:delta:1)*233.082);
B  = sin(2*2*pi*(0:delta:1)*246.942);
C  = sin(2*2*pi*(0:delta:1)*261.626);
Db = sin(2*2*pi*(0:delta:1)*277.183);
D  = sin(2*2*pi*(0:delta:1)*293.665);
Eb = sin(2*2*pi*(0:delta:1)*311.127);
E  = sin(2*2*pi*(0:delta:1)*329.628);
F  = sin(2*2*pi*(0:delta:1)*349.228);
Gb = sin(2*2*pi*(0:delta:1)*369.994);
G  = sin(2*2*pi*(0:delta:1)*391.995);

notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb];

sound(notes,1/delta);

wavwrite(notes,1/delta,32,'serekson_hailpurdue3.wav');

Alumni Liaison

ECE462 Survivor

Seraj Dosenbach