How does one make a wav file?
31 views (last 30 days)
Show older comments
I am using the wavwrite command on MatLab and I am having a lot of problems. I have in my workspace "X" and "Y" data points in a (1 X 59 array) on both. They are points I need to make a specific signal. I am unsure about how to set up the command.
wavwrite(y,filename)
For y being used in my case I have 2 workspace data how would that work?
What does the filename have to be shared to?
Or maybe I'm going about this the wrong way to make a Wav file...
1 Comment
Jan
on 23 Mar 2012
A [1 x 59] vector means a very short sound. What are the values of X and Y? Is it a stereo sound or does X represent the time?
Answers (1)
Wayne King
on 23 Mar 2012
Here is an example
Fs = 2e4;
t = 0:1/2e4:1-(1/2e4);
x = 1/2*cos(2*pi*5000*t);
% write the signal x to a .wav file
wavwrite(x,Fs,16,'test.wav');
0 Comments
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!