loadSample {sound} | R Documentation |
Load a WAV File from Disk
Description
Load a wav file from disk and create a Sample object.
Usage
loadSample(filename, filecheck=TRUE)
Arguments
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. |
Details
All kinds of wav files are supported: mono / stereo, 8 / 16 bits per sample, 1000 to 48000 samples/second.
Value
the Sample object that is equivalent to the wav file.
Note
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.
Author(s)
Author: Matthias Heymann [aut], Stefan Langenberg [cre] (<https://orcid.org/0000-0001-5817-5469>)
Maintainer: Stefan Langenberg <langenberg@uni-bonn.de>
See Also
Examples
## Not run:
s <- loadSample("soundfile.wav")
play(s)
## End(Not run)