wav files and pitch shift (Signal Processing)

3 views (last 30 days)
James
James on 28 Feb 2012
Hi im new to this so sorry if this is a bit noobish i'm at uni at the moment and have just started using matlab and have been given several tasks to complete this is the first one i have been given and i am a little confused of how to complete it i can't find that much infomation on the internet to help me out at least in this specific sense. here is the taks below
n this task you will need to generate wav file, input it using native format, convert it into float point, then pitch shift by altering sampling frequency and record the pitch shifted version back to Matlab for analysis. The following are outline of tasks:
1) Generate 440 Hz sinusoidal “wav” file with sampling frequency 44100 Hz and duration of 1 second.
2) Read the wav file into Matlab as an array of integer values. (Hint: look into the ‘fmt’ option in the wavread help file).
3) Convert the integer array obtained from step 2) into float point array.
4) Using command “sound(y,Fs)”, play the samples at pitches 220Hz, 880Hz, 1760Hz, 3520Hz and 7040Hz.
5) Record the 5 signals using an external or internal recording device at 44100 Hz and import them back to Matlab. Using suitable spectral analysis tools, verify your results.
For this task, you will need to verify and explain the WAV file format, integer and float point conversation. Explain, in pitch shifting and recording process, where the sample rate conversion happens? What can you do with duration differences by this method? Create the algorithm to deal with fixed duration requirements.
i was wondering if anyone could explain the code i would need to use and describe the reason for doing it thanks.
  2 Comments
Wayne King
Wayne King on 29 Feb 2012
What have you tried to solve your homework assignment?
James
James on 29 Feb 2012
well ive tried to look into it by nothing so far really ive got a class next week on it looking into the code in more depth but i thought i would try an get ahead of my self by asking experienced people on here

Sign in to comment.

Answers (1)

Daniel Shub
Daniel Shub on 29 Feb 2012
Start with the first part of the problem and work your way from there.
The first step is to mathematically represent a continuous sinusoidal signal with frequency f:
x(t) = sin(2*pi*f*t)
Then think about how you would convert that to MATLAB code ...
  3 Comments
Walter Roberson
Walter Roberson on 1 Mar 2012
http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab
Daniel Shub
Daniel Shub on 1 Mar 2012
No, the problem is you don't want to try and figure out how to do it and you just want the code to work.

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!