How can I regulate the time of play sound[s] - duration in Mathematica 8. I want to import and save wav file in *.nb document & manipulate (with) the sound duration, for example, select sound fragment, split etc. I can not present sounds with duration more than 5 or 7 seconds in wavelet form - problem with CPU or memory ("very large..."). Thank you for answers.
I really tried to solve the problem of primitive –
file="C:/**.wav";
data=Flatten@Import[file,"Data"];
Import[file,"Options"];
data=Import[file,"Sound"];
L=Length[data]; Manipulate[Sound[data,t],{t,0.1,L}]
it works, but probably not optimal. It works slowly. In general, my problem has arisen from a desire to manipulate with time (duration) of the wav sound file. Your perfect solution, since it allows to allocate the sample.
Before that I was faced with freezing when trying to view 10-second file in the wavelet form. «No more memory available. Mathematica kernel has shut down. Try quitting other applications and then retry». I used the "Direct conversion of acoustic data" Mathematica code - Direct analysis of acoustic data using continuous wavelet transforms.
http://www.wolfram.com/mathematica/new-in-8/wavelet-analysis/directly-transform-sound.html
snd = ExampleData[{"Sound", "Apollo11ReturnSafely"}]
cwd = ContinuousWaveletTransform[snd,
GaborWavelet[6], {Automatic, 12}]
sty = Directive[14, FontFamily -> "Helvetica"];
WaveletScalogram[cwd, {3 | 4 | 5 | 6 | 7, _}, ImageSize -> 570,
Ticks -> {Automatic, {#, Superscript[2, #]} & /@ Range[7]},
TicksStyle -> sty, AxesLabel -> {Style["Time", sty], Style["Scale", sty]},
ColorFunction -> ColorData["SiennaTones"]]
But it hangs when I try to submit a file whose duration is 10 seconds or more. Maybe it depends on the record a sound file.