[scilab-Users] Generating Wav files in Stereo

Mathieu Dubois mathieu.dubois at limsi.fr
Thu Mar 19 13:12:34 CET 2009


Hi Evan,

To produce a stereo file you have to pass a 2*N matrix to savewave.

Try the attached script which produce a stereo file (one sinus at 440Hz
and one at 460Hz) and then plot the power spectrum (showing 2 peaks). On
my computer I can read the file.

Another possibility is that you have a sound problem under scilab. Can you
read a wav file with playsnd?

Hope that helps,
Mathieu

> Hi all,
>
> Is it possible to generate .wav files, with a different sin wav in each
> channel? I want to demonstrate out-of-phase sound. I use the following to
> generate a basic wave in at 440 Hz:
>
> fsampling = 44100;                   	// sampling frequency
> t = 0 : 1/fsampling : 4;             	// 4 seconds at this frequency
> x = 2 * %pi * 440 * t;
> sinwav = sin (x);    				// a wave at 440 Hz - A
>
> savewave ('beep_L.wav',sinwav,fsampling);
>
> I have found this on the net: sinwav_add = [sinwav ; sinwav_oof]; -
> however,
> no sound is generated using this method.
>
> Regards,
> Evan
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_wave.sce
Type: application/octet-stream
Size: 592 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20090319/3c1d3843/attachment.obj>


More information about the users mailing list