Audio
Home ] Up ] 54622D ] [ Audio ] Excel ] Maple ] MATLAB ] PSpice ]

 

NOTE: The method described here assumes that MATLAB is available to make the conversion. If MATLAB is not available, then use whatever software you can find that can read a .WAV file and write the audio samples to a text file as one sample per line.

Step 1: Read the .WAV audio file

In MATLAB, do the following:

[x fs bits] = wavread('file.wav');

The audio samples are stored in the variable "x"', the sampling frequency is stored in "fs", and the number of bits per sample is stored in "bits".

Step 2: Create the .CSV file

In MATLAB, do:

save file.csv -ascii x

Step 3: Calculate the 33120A frequency setting

Assuming you wish to preserve the sampling frequency of the original .WAV audio file, calculate the 33120A frequency setting as follows:

fs/length(x)

Example files

curly.wav (audio source file... famous quote from The Three Stooges)
audio_csv.m (converts audio file to CSV format)
audio_csv.csv (audio data after conversion to .CSV format)
0.6891 Hz (frequency setting for 33120A; enter 0.0006891 in IntuiLink Waveform Editor)
 

 

Department of Electrical and Computer Engineering
Rose-Hulman Institute of Technology
Terre Haute, IN 47803-3999

Page last updated 06/05/01