Revision as of 14:05, 5 September 2008 by Sranka (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

%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

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood