Skip to content

Instantly share code, notes, and snippets.

@pepijn-devries
Last active February 6, 2019 13:45
Show Gist options
  • Save pepijn-devries/90f057f89f48661b7c52 to your computer and use it in GitHub Desktop.
Save pepijn-devries/90f057f89f48661b7c52 to your computer and use it in GitHub Desktop.
Download and play a ProTracker module in R
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment