(Sound Files)
(Matlab Code)
Line 7: Line 7:
 
== Matlab Code ==
 
== Matlab Code ==
  
 +
<pre>
 +
%Phil Cannon
 +
%pjcannon@purdue.edu
 +
%ECE301 HW1_2
 +
 +
%This file imports the file 'jpforward.wav' in the local directory.  It
 +
%then plays the file forwards at 44khz, backwards at 44khz, and backwards
 +
%at 22khz.  I found it easiest to interpret the subliminal message at
 +
%44khz.
 +
 +
[x,fs,nbits]=wavread('jpforward.wav');
 +
 +
%Reverse the matrix array
 +
for count=1:length(x)
 +
    jpbackward(length(x)-(count-1))=x(count);
 +
end
 +
 +
%Forwards at 44100 Hz
 +
wavplay(x,44100)
 +
wavwrite(x, 44100, 'Forward44k.wav');
 +
%Backwards at 44100 Hz
 +
wavplay(jpbackward,44100)
 +
wavwrite(jpbackward, 44100, 'Backward44k.wav');
 +
%Backwards at 22050 Hz
 +
wavplay(jpbackward,22050)
 +
wavwrite(jpbackward, 22050, 'Backward22k.wav');
 +
</pre>
  
 
== Results ==
 
== Results ==

Revision as of 09:42, 3 September 2008

Sound Files

Matlab Code

%Phil Cannon 
%pjcannon@purdue.edu
%ECE301 HW1_2

%This file imports the file 'jpforward.wav' in the local directory.  It
%then plays the file forwards at 44khz, backwards at 44khz, and backwards
%at 22khz.  I found it easiest to interpret the subliminal message at
%44khz.

[x,fs,nbits]=wavread('jpforward.wav');

%Reverse the matrix array
for count=1:length(x)
    jpbackward(length(x)-(count-1))=x(count);
end

%Forwards at 44100 Hz
wavplay(x,44100)
wavwrite(x, 44100, 'Forward44k.wav');
%Backwards at 44100 Hz
wavplay(jpbackward,44100)
wavwrite(jpbackward, 44100, 'Backward44k.wav');
%Backwards at 22050 Hz
wavplay(jpbackward,22050)
wavwrite(jpbackward, 22050, 'Backward22k.wav');

Results

Alumni Liaison

Prof. Math. Ohio State and Associate Dean
Outstanding Alumnus Purdue Math 2008

Jeff McNeal