loadSample {sound} | R Documentation |
Load a wav file from disk and create a Sample object.
loadSample(filename, filecheck=TRUE)
filename |
a string giving the path and the name of the wav file. |
filecheck |
logical. If FALSE, no check for existance and read permission of the file will be performed. |
All kinds of wav files are supported: mono / stereo, 8 / 16 bits per sample, 1000 to 48000 samples/second.
the Sample object that is equivalent to the wav file.
filename
can also be a Sample object. In this case, the same object will be returned immediately. This can be useful when writing functions that accept both Sample objects and the names of a wav file as an argument. See is.Sample
for an example.
Matthias Heymann
## Not run: s <- loadSample("soundfile.wav") play(s) ## End(Not run)