File: Export: Sound (WAV)
Export data as Microsoft PCM wave file
Please refer to the page for additional option switches when accessing the x-function from script
This variable specifies the channel mode.
Specify the input range to be converted to WAV
Specify which column of the worksheet is the left channel. And it will represent the Channel when Channel Mode selected as moto.
Specify which column of the worksheet is the Right channel. It is only avaliable when Channel Mode selected as Stereo
The begin of the data to be exported
The end of the data to be exported
Specify the path and filename of the output WAV file
Specify the Sample Bits of the output WAV file
The expWAV function exports worksheet data as Microsoft PCM wave file. It can be accessed from menu or command window
Noted that the value of the Sampling Interval in the worksheet must be larger than 22Hz.
This script shows how to import a sound wave file and do some processing then export the result.
The sample data is located in exe_path\Samples\Signal Processing\.
1. Import a wav file to a new book.
2. Perform low-pass filters on the data to remove the high frequency part of the sound.
3. Export the data to a new wav file.
// Import the wav file
fname$ = system.path.program$ + "Samples\Signal Processing\sample.wav";
// Remove the high frequency part
fft_filters [bkn$]1!col(1) cutoff:=2000 oy:=(<input>,<new name:="Low Frequency of the Sound">);
// Set the new wav column's format to be short(2) type
// Export to a new wav file;
expWav iw:=[bkn$]1 left:=2;