WAV file Export and Import
- To: mathgroup at smc.vnet.net
- Subject: [mg107058] WAV file Export and Import
- From: Hugh Goyder <h.g.d.goyder at cranfield.ac.uk>
- Date: Tue, 2 Feb 2010 03:24:23 -0500 (EST)
I am trying to Export and Import WAV files. Unfortunately, in the
example below the file that I export becomes garbled and is not the
same when re - Imported. Am I doing something wrong? Is there a work
around? You can tell from both the sound and the data that something
is going wrong. The imported data is completely different to that
which is generated initially.
Version 7 Windows
Thanks in advance
Hugh Goyder
d = Table[8*Sin[100*2*Pi*t], {t, 0, 2. - 1/4000., 1/4000.}];
Length[d]
ListPlot[Take[d, {1, 100}]]
d1 = Sound[SampledSoundList[d, 4000]]
Export["try1.WAV", d1]
g = Import["try1.WAV", "SampleRate" -> 4000]
ListPlot[Take[g[[1, 1, 1]], {1, 100}], Joined -> False,
PlotRange -> All]