Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

readMP3

Read an MPEG-2 layer 3 file into a Wave object


Description

A bare bones MPEG-2 layer 3 (MP3) file reader that returns the results as 16bit PCM data stored in a Wave object.

Usage

readMP3(filename)

Arguments

filename

Filename of MP3 file.

Value

A Wave object.

Note

The decoder can currently only handle files which are either mono or stereo. This is a limitation of the Wave object and the underlying MAD decoder.

Author(s)

References

The decoder source code is taken from the MAD library, see http://www.underbit.com/products/mad/.

See Also

Examples

## Not run: 
## Requires an mp3 file named sample.mp3 in the current directory.
mpt <- readMP3("sample.mp3")
summary(mpt)

## End(Not run)

tuneR

Analysis of Music and Speech

v1.3.3
GPL-2 | GPL-3
Authors
Uwe Ligges <ligges@statistik.tu-dortmund.de> with contributions from Sebastian Krey, Olaf Mersmann, Sarah Schnackenberg, Guillaume Guenard, Andrea Preusser, Anita Thieler, Johanna Mielke and Claus Weihs, as well as code fragments and ideas from the former package 'sound' by Matthias Heymann and functions from 'rastamat' by Daniel P. W. Ellis. The included parts of the libmad MPEG audio decoder library are authored by Underbit Technologies.
Initial release
2018-07-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.