(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Media:SmokeWaterSanthakumar.wav]]
+
[[Media:SmokeWaterSanthakumar.wav]]  
[[Media:SmokeWater2xSpeedSanthakumar.wav]]
+
[[Media:SmokeWaterTransformedSanthakumar.wav]]
+
  
% Sachin Santhakumar<br>% ECE 301<br>% HW 01 Problem 01<br>% Playing Music<br>% 01/19/2011
+
[[Media:SmokeWater2xSpeedSanthakumar.wav]]
  
clear;<br>clc;
+
[[Media:SmokeWaterTransformedSanthakumar.wav]]
  
% beats per second<br>bps = 112/60;<br>% seconds per beat<br>beat_time = bps^-1;
+
% Sachin Santhakumar<br>% ECE 301<br>% HW 01 Problem 01<br>% Playing Music<br>% 01/19/2011
  
% Length of time for each entry in the sound array<br>delta = 0.00005;
+
clear;<br>clc;  
  
% Note lengths<br>quarter = 0:delta:beat_time;<br>half = 0:delta:beat_time*2;<br>dotquart = 0:delta:beat_time*(3/2);<br>eighth = 0:delta:beat_time*(1/2);
+
% beats per second<br>bps = 112/60;<br>% seconds per beat<br>beat_time = bps^-1;  
  
% Note frequencies<br>freqG = 391.995;<br>freqBf = 466.164;<br>freqC = 523.251;<br>freqDf = 554.365;
+
% Length of time for each entry in the sound array<br>delta = 0.00005;  
  
% Construction of the signal of all the required notes<br>GQ = sin(2*pi*freqG*quarter);<br>BfQ = sin(2*pi*freqBf*quarter);<br>CDq = sin(2*pi*freqC*dotquart);<br>DfE = sin(2*pi*freqDf*eighth);<br>CH = sin(2*pi*freqC*half);<br>CDq = sin(2*pi*freqC*dotquart);<br>Erest = zeros((eighth/delta),1);<br>Hrest = zeros((half/delta),1);
+
% Note lengths<br>quarter = 0:delta:beat_time;<br>half = 0:delta:beat_time*2;<br>dotquart = 0:delta:beat_time*(3/2);<br>eighth = 0:delta:beat_time*(1/2);  
  
% Signal for the song<br>X = [GQ,BfQ,CDq,GQ,BfQ,DfE,CH,GQ,BfQ,CDq,BfQ,GQ,Erest,Hrest];
+
% Note frequencies<br>freqG = 391.995;<br>freqBf = 466.164;<br>freqC = 523.251;<br>freqDf = 554.365;  
  
% Plays wav file<br>wavplay(X,1/delta);<br>wavwrite(X,1/delta,32,'SmokeWaterSanthakumar');
+
% Construction of the signal of all the required notes<br>GQ = sin(2*pi*freqG*quarter);<br>BfQ = sin(2*pi*freqBf*quarter);<br>CDq = sin(2*pi*freqC*dotquart);<br>DfE = sin(2*pi*freqDf*eighth);<br>CH = sin(2*pi*freqC*half);<br>CDq = sin(2*pi*freqC*dotquart);<br>Erest = zeros((eighth/delta),1);<br>Hrest = zeros((half/delta),1);  
  
% Plays wav file twice as fast<br>wavplay(X,(2/delta));<br>wavwrite(X,2/delta,32,'SmokeWater2xSpeedSanthakumar');
+
% Signal for the song<br>X = [GQ,BfQ,CDq,GQ,BfQ,DfE,CH,GQ,BfQ,CDq,BfQ,GQ,Erest,Hrest];  
  
% Transformation of y(t) = x(2t);<br>GQ = sin(4*pi*freqG*quarter);<br>BfQ = sin(4*pi*freqBf*quarter);<br>CDq = sin(4*pi*freqC*dotquart);<br>DfE = sin(4*pi*freqDf*eighth);<br>CH = sin(4*pi*freqC*half);<br>CDq = sin(4*pi*freqC*dotquart);<br>Erest = zeros((2*eighth/delta),1);<br>Hrest = zeros((2*half/delta),1);
+
% Plays wav file<br>wavplay(X,1/delta);<br>wavwrite(X,1/delta,32,'SmokeWaterSanthakumar');  
  
Y = [GQ,BfQ,CDq,GQ,BfQ,DfE,CH,GQ,BfQ,CDq,BfQ,GQ,Erest,Hrest];
+
% Plays wav file twice as fast<br>wavplay(X,(2/delta));<br>wavwrite(X,2/delta,32,'SmokeWater2xSpeedSanthakumar');  
  
% Plays modified wav file<br>wavplay(Y,1/delta);<br>wavwrite(X,1/delta,32,'SmokeWaterTransformedSanthakumar');
+
% Transformation of y(t) = x(2t);<br>GQ = sin(4*pi*freqG*quarter);<br>BfQ = sin(4*pi*freqBf*quarter);<br>CDq = sin(4*pi*freqC*dotquart);<br>DfE = sin(4*pi*freqDf*eighth);<br>CH = sin(4*pi*freqC*half);<br>CDq = sin(4*pi*freqC*dotquart);<br>Erest = zeros((2*eighth/delta),1);<br>Hrest = zeros((2*half/delta),1);  
  
% Sachin Santhakumar<br>% ECE 301<br>% HW 01 Problem 02<br>% Hidden Backward Message<br>% 01/19/2011
+
Y = [GQ,BfQ,CDq,GQ,BfQ,DfE,CH,GQ,BfQ,CDq,BfQ,GQ,Erest,Hrest];
  
clear;<br>clc;
+
% Plays modified wav file<br>wavplay(Y,1/delta);<br>wavwrite(Y,1/delta,32,'SmokeWaterTransformedSanthakumar');  
  
% Reads in wav file<br>[Y, f] = wavread ('Beatles.wav');
+
% Sachin Santhakumar<br>% ECE 301<br>% HW 01 Problem 02<br>% Hidden Backward Message<br>% 01/19/2011
  
Yrev = flipud (Y);<br>% Plays backwards wav file<br>wavplay(Yrev,f);
+
clear;<br>clc;
 +
 
 +
% Reads in wav file<br>[Y, f] = wavread ('Beatles.wav');
 +
 
 +
Yrev = flipud (Y);<br>% Plays backwards wav file<br>wavplay(Yrev,f);  
  
 
% Forwards the sound clip seems to say "Number Nine"<br>% Backwards the sound clip seems to say "Turn Me On Dead Man"<br>
 
% Forwards the sound clip seems to say "Number Nine"<br>% Backwards the sound clip seems to say "Turn Me On Dead Man"<br>

Latest revision as of 07:58, 19 January 2011

Media:SmokeWaterSanthakumar.wav

Media:SmokeWater2xSpeedSanthakumar.wav

Media:SmokeWaterTransformedSanthakumar.wav

% Sachin Santhakumar
% ECE 301
% HW 01 Problem 01
% Playing Music
% 01/19/2011

clear;
clc;

% beats per second
bps = 112/60;
% seconds per beat
beat_time = bps^-1;

% Length of time for each entry in the sound array
delta = 0.00005;

% Note lengths
quarter = 0:delta:beat_time;
half = 0:delta:beat_time*2;
dotquart = 0:delta:beat_time*(3/2);
eighth = 0:delta:beat_time*(1/2);

% Note frequencies
freqG = 391.995;
freqBf = 466.164;
freqC = 523.251;
freqDf = 554.365;

% Construction of the signal of all the required notes
GQ = sin(2*pi*freqG*quarter);
BfQ = sin(2*pi*freqBf*quarter);
CDq = sin(2*pi*freqC*dotquart);
DfE = sin(2*pi*freqDf*eighth);
CH = sin(2*pi*freqC*half);
CDq = sin(2*pi*freqC*dotquart);
Erest = zeros((eighth/delta),1);
Hrest = zeros((half/delta),1);

% Signal for the song
X = [GQ,BfQ,CDq,GQ,BfQ,DfE,CH,GQ,BfQ,CDq,BfQ,GQ,Erest,Hrest];

% Plays wav file
wavplay(X,1/delta);
wavwrite(X,1/delta,32,'SmokeWaterSanthakumar');

% Plays wav file twice as fast
wavplay(X,(2/delta));
wavwrite(X,2/delta,32,'SmokeWater2xSpeedSanthakumar');

% Transformation of y(t) = x(2t);
GQ = sin(4*pi*freqG*quarter);
BfQ = sin(4*pi*freqBf*quarter);
CDq = sin(4*pi*freqC*dotquart);
DfE = sin(4*pi*freqDf*eighth);
CH = sin(4*pi*freqC*half);
CDq = sin(4*pi*freqC*dotquart);
Erest = zeros((2*eighth/delta),1);
Hrest = zeros((2*half/delta),1);

Y = [GQ,BfQ,CDq,GQ,BfQ,DfE,CH,GQ,BfQ,CDq,BfQ,GQ,Erest,Hrest];

% Plays modified wav file
wavplay(Y,1/delta);
wavwrite(Y,1/delta,32,'SmokeWaterTransformedSanthakumar');

% Sachin Santhakumar
% ECE 301
% HW 01 Problem 02
% Hidden Backward Message
% 01/19/2011

clear;
clc;

% Reads in wav file
[Y, f] = wavread ('Beatles.wav');

Yrev = flipud (Y);
% Plays backwards wav file
wavplay(Yrev,f);

% Forwards the sound clip seems to say "Number Nine"
% Backwards the sound clip seems to say "Turn Me On Dead Man"

Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett