(One intermediate revision by the same user not shown)
Line 19: Line 19:
 
% beats per second beat = bpm/60;  
 
% beats per second beat = bpm/60;  
  
<br>&nbsp;%Eighth note E=0:delta:(beat/8);&nbsp;%Half note H=0:delta:(beat/2);&nbsp;%Dotted Quarter note Dq=0:delta:(beat*(3/8));&nbsp;%Quarter note Q=0:delta:(beat/4);  
+
<br>&nbsp;
  
<br>&nbsp;%G-note Freq G=391.995;&nbsp;%B-flat freq Bf=466.164;&nbsp;%C freq C=523.251;&nbsp;%D-flat freq Df=554.365;  
+
%Eighth note <br>
 +
E=0:delta:(beat/8);&nbsp;
 +
 
 +
%Half note <br>
 +
H=0:delta:(beat/2);&nbsp;
 +
 
 +
%Dotted Quarter note <br>
 +
Dq=0:delta:(beat*(3/8));&nbsp;
 +
 
 +
%Quarter note <br>
 +
Q=0:delta:(beat/4);
 +
 +
<br>&nbsp;
 +
%G-note Freq <br>
 +
G=391.995;&nbsp;
 +
 
 +
%B-flat freq <br>
 +
Bf=466.164;&nbsp;
 +
 
 +
%C freq <br>
 +
C=523.251;&nbsp;
 +
 
 +
%D-flat freq <br>
 +
Df=554.365;  
  
 
if var==3  
 
if var==3  
  
    G=2*G;
+
G=2*G;
 
  Bf=2*Bf;
 
  Bf=2*Bf;
 
  C=2*C;
 
  C=2*C;
 
  Df=2*Df;
 
  Df=2*Df;
  
end&nbsp;%Establish all notes used in the song&nbsp;%in the form of (Note Letter)_(Length Letter)_note=... G_Q_note=sin(2*pi*G*Q); Bf_Q_note=sin(2*pi*Bf*Q); C_Dq_note=sin(2*pi*C*Dq); C_H_note=sin(2*pi*C*H); Df_E_note=sin(2*pi*Df*E);  
+
end&nbsp; <br>
 +
%Establish all notes used in the song&nbsp;%in the form of (Note Letter)_(Length Letter)_note=... <br>
 +
G_Q_note=sin(2*pi*G*Q); <br>
 +
Bf_Q_note=sin(2*pi*Bf*Q); <br>
 +
C_Dq_note=sin(2*pi*C*Dq); <br>
 +
C_H_note=sin(2*pi*C*H); <br>
 +
Df_E_note=sin(2*pi*Df*E); <br>
  
<br>&nbsp;%Song at normal speed smoke=[G_Q_note, Bf_Q_note, C_Dq_note, G_Q_note,Bf_Q_note, Df_E_note, C_H_note, G_Q_note, Bf_Q_note, C_Dq_note, Bf_Q_note, G_Q_note];  
+
<br>&nbsp;
 +
%Song at normal speed <br>
 +
smoke=[G_Q_note, Bf_Q_note, C_Dq_note, G_Q_note,Bf_Q_note, Df_E_note, C_H_note, G_Q_note, Bf_Q_note, C_Dq_note, Bf_Q_note, G_Q_note];  
  
<br>&nbsp;%create the normal tempo sound file if var==1  
+
<br>&nbsp;
 +
%create the normal tempo sound file <br>
 +
if var==1  
  
 
     wavwrite(smoke,1/delta,'smoke_normal.wav');
 
     wavwrite(smoke,1/delta,'smoke_normal.wav');
  
%create the fast tempo sound file elseif var==2  
+
%create the fast tempo sound file  
 +
elseif var==2  
  
 
     wavwrite(smoke,1/delta,'smoke_fast.wav');  
 
     wavwrite(smoke,1/delta,'smoke_fast.wav');  
Line 54: Line 88:
 
% a) The forward meesage from the Beatles is "Number 9"  
 
% a) The forward meesage from the Beatles is "Number 9"  
  
% reverse signal [Beatles_normal, Fs]=wavread('Beatles.wav'); Beatles_reverse=flipud(Beatles_normal); wavwrite(Beatles_reverse,Fs,'backwards_Beatles')  
+
% reverse signal
 +
[Beatles_normal, Fs]=wavread('Beatles.wav'); <br>
 +
Beatles_reverse=flipud(Beatles_normal)<br>wavwrite(Beatles_reverse,Fs,'backwards_Beatles') <br>
  
% b) In the past I have heard that peolpe think it is saying&nbsp;% "Turn me on dead man." And because of this previous knowledge&nbsp;% it sounds like this, but had I not known this, I probably would&nbsp;% not be able to make anything out.  
+
% b) In the past I have heard that peolpe think it is saying&nbsp; <br>
 +
% "Turn me on dead man." And because of this previous knowledge&nbsp; <br>
 +
% it sounds like this, but had I not known this, I probably would&nbsp;% not be able to make anything out.  
  
[[smoke_normal_zbright.wav]] <br>
+
[[Media:smoke_normal_zbright.wav|smoke_normal]]<br>
[[smoke_fast_zbright.wav]] <br>
+
[[Media:smoke_fast_zbright.wav|smoke_fast]]<br>
[[smoke_high_pitch_zbright.wav]] <br>
+
[[Media:smoke_high_pitch_zbright.wav|smoke_HighPitch]]<br>
[[smoke_backwards_Beatles_zbright.wav]]
+
[[Media:backwards_Beatles_zbright.wav|BeatlesReverse]]<br>
  
 
<br>  
 
<br>  
  
 
<br>
 
<br>

Latest revision as of 08:47, 19 January 2011

%Zach Bright 

%ECE 301

clc; clear all;


 % PART 1


delta = 0.00005;

for var = 1:3 %beats per minute bpm = 112;

if var ==2

   bpm=112/2;

end

% beats per second beat = bpm/60;


 

%Eighth note
E=0:delta:(beat/8); 

%Half note
H=0:delta:(beat/2); 

%Dotted Quarter note
Dq=0:delta:(beat*(3/8)); 

%Quarter note
Q=0:delta:(beat/4);


  %G-note Freq
G=391.995; 

%B-flat freq
Bf=466.164; 

%C freq
C=523.251; 

%D-flat freq
Df=554.365;

if var==3

G=2*G;
Bf=2*Bf;
C=2*C;
Df=2*Df;

end 
%Establish all notes used in the song %in the form of (Note Letter)_(Length Letter)_note=...
G_Q_note=sin(2*pi*G*Q);
Bf_Q_note=sin(2*pi*Bf*Q);
C_Dq_note=sin(2*pi*C*Dq);
C_H_note=sin(2*pi*C*H);
Df_E_note=sin(2*pi*Df*E);


  %Song at normal speed
smoke=[G_Q_note, Bf_Q_note, C_Dq_note, G_Q_note,Bf_Q_note, Df_E_note, C_H_note, G_Q_note, Bf_Q_note, C_Dq_note, Bf_Q_note, G_Q_note];


  %create the normal tempo sound file
if var==1

   wavwrite(smoke,1/delta,'smoke_normal.wav');

%create the fast tempo sound file elseif var==2

   wavwrite(smoke,1/delta,'smoke_fast.wav'); 

%create the high pitch sound file else

   wavwrite(smoke,1/delta,'smoke_high_pitch.wav');

end

end

% PART 2

% a) The forward meesage from the Beatles is "Number 9"

% reverse signal [Beatles_normal, Fs]=wavread('Beatles.wav');
Beatles_reverse=flipud(Beatles_normal)
wavwrite(Beatles_reverse,Fs,'backwards_Beatles')

% b) In the past I have heard that peolpe think it is saying 
% "Turn me on dead man." And because of this previous knowledge 
% it sounds like this, but had I not known this, I probably would % not be able to make anything out.

smoke_normal
smoke_fast
smoke_HighPitch
BeatlesReverse



Alumni Liaison

ECE462 Survivor

Seraj Dosenbach