fastReadWave | R Documentation |
loads data from a WAVE file
fastReadWave(where, from = 0, to = NA_real_, header = FALSE, toWaveMC = FALSE)
where |
file to load data from |
from |
starting point to load data from (seconds) |
to |
end point to read data to (seconds), |
header |
logical flag to read only header information |
toWaveMC |
logical flag to return a WaveMC object |
WAVE is a RIFF (Resource Interchange File Format) widely used for storage of uncompressed audio data. It is often identified by the extension .WAV on DOS-legacy systems (such as Windows). Although WAVE files may contain compressed data, the above functions only support plain, uncompressed PCM data.
This function was originally written Simon Urbanek, all credit for the bulk of the C programming goes to him. Adapted by Taiki Sakai to add additional features and fix some bugs. See additional license comments in file.c
returns an object of the class audioSample
as loaded from
the WAVE file, or if header=TRUE
a named list with the sample.rate,
num channels, bit rate, and sample length. audioSample
objects
store the wav data as a matrix wth one row for every channel and
attributes "rate" and "bits"
Taiki Sakai taiki.sakai@noaa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.