Line 1: Line 1:
 
==sound files==
 
==sound files==
<pre>
+
 
 
File [[Media:songfoward_ECE301Fall2008mboutin.wav]]
 
File [[Media:songfoward_ECE301Fall2008mboutin.wav]]
 
File [[Media:songrevrese_ECE301Fall2008mboutin.wav]]
 
File [[Media:songrevrese_ECE301Fall2008mboutin.wav]]
 
File [[Media:songslow_ECE301Fall2008mboutin.wav]]
 
File [[Media:songslow_ECE301Fall2008mboutin.wav]]
</pre>
+
 
 
==matlab command==
 
==matlab command==
 
<pre>
 
<pre>

Revision as of 14:19, 5 September 2008

sound files

File Media:songfoward_ECE301Fall2008mboutin.wav File Media:songrevrese_ECE301Fall2008mboutin.wav File Media:songslow_ECE301Fall2008mboutin.wav

matlab command

%Sourabh Ranka
%email== sranka@purdue.edu
%ece 301

%to clear data
clear;
clc;

%using the waveread command to convert the .wav file to the digital signal 'song'
[song, samplerate, bitspersample] = wavread('H:\pu.data\Desktop\Jpforward.wav');

%using the waveplay command to listen the digital signal we have just converted at 44100 hz sampling rate
wavplay(song, samplerate);

songback = flipud(song);
%to play the file backwardwe use the waveplay command and it runs it at the same frequency as the original sample rate  
wavplay(songback, samplerate);

%to play  the song at half the sample rate
wavplay (songback,samplerate*0.5);

% to write the program on wave file
wavwrite(song,samplerate,bitspersample,'H:\pu.data\Desktop\songforward.wav');
wavwrite(songback,samplerate,bitspersample,'H:\pu.data\Desktop\songbackward.wav');
wavwrite(songback,samplerate*0.5,bitspersample,'H:\pu.data\Desktop\songslow.wav');

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang