readMP3 {monitoR}R Documentation

Read MP3 Files into a Wave Object

Description

A variation of the MP3 file reader supplied in tuneR. Reads MP3 files in as 16bit PCM data stored in a Wave object.

Usage

readMP3(filename, from, to)

Arguments

filename

Filename of MP3 file.

from

Seconds to begin reading, measured from beginning of file. See details.

to

Seconds to end reading, measured from beginning of file. See details.

Details

The bare bones MP3 file reader supplied in tuneR reads the entire file in. When the user installs the third party software mp3splt and libmp3splt, this variant will allow from and to to be specified, and mp3splt will attempt to read in the MP3 segment without first decoding the file. Because mp3splt will cut the MP3 file at frame boundaries the from and to arguments are necessarily only guiding values; actual values may differ. Supplemental mp3splt installation instructions are provided in the document "Installing_mp3splt.pdf", available the monitoR website http://www.uvm.edu/rsenr/vtcfwru/R/?Page=monitoR/monitoR.htm.

Value

An object of class Wave.

Note

If mp3splt is not installed a prompt will suggest falling back on the version from tuneR.

Author(s)

Jon Katz

References

mp3splt is documented at http://mp3splt.sourceforge.net/mp3splt_page/home.php.

See Also

readMP3, readWave

Examples

## Not run: 
# Assume myMP3 is an MP3 file with a duration of at least 60 seconds:
readMP3 (filename = "myMP3.mp3", from = "30", to = "60")
## End(Not run) 

[Package monitoR version 1.0.7 Index]