Tag Info

New answers tagged

2

You can calculate the duration by counting the number of samples, and dividing by the sampling rate. For example, importing the stereo file="soundfile.wav" sr = Import[file, "SampleRate"]; {channels, samples} = Dimensions[Import[file, "Data"]]; duration = samples/sr // N


1

You comment: I've also tried simply to copy the graphics that is displayed when I import a sound. But then I don't know how to get a sound out of it automatically. You can work with sound files by dragging and dropping, then extracting the desired parts from the sound objects. For example, you can type snd = and then drag and drop the .wav file into ...



Top 50 recent answers are included