This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load the required packages | |
require(ProTrackR) | |
# set up a connection to 'cyberrid.mod': | |
con <- url("http://api.modarchive.org/downloads.php?moduleid=40293", "rb") | |
# download module: | |
mod <- read.module(con) | |
close(con) | |
rm(con) | |
# and play it: | |
mod.wave <- playMod(mod, | |
max.duration = 300, | |
target.rate = 22050) | |
# plot the waveform: | |
plot(mod.wave) |
No comments:
Post a Comment