tests/readMP3Test.R

library("tuneR")
d <- list.files("Testfiles", pattern="\\.mp3$")
garbage <- lapply(d, 
    function(x) {
        wav <- readMP3(file.path("Testfiles", x))
        cat(x, "\n")
        print(wav)
        if(is(wav, "Wave")){
            print(rev(wav@left)[1:10])
            if(wav@stereo)
                print(rev(wav@right)[1:10])
        } else {
            print(wav@.Data[1:10,])
        }
    }
)

Try the tuneR package in your browser

Any scripts or data that you put into this service are public.

tuneR documentation built on May 29, 2017, 1:04 p.m.