read.module | R Documentation |
Reads a ProTracker module file and coerces it to a PTModule
object.
## S4 method for signature 'character,logical'
read.module(file, ignore.validity = F)
## S4 method for signature 'ANY,missing'
read.module(file, ignore.validity = F)
## S4 method for signature 'ANY,missing'
read.module(file, ignore.validity = F)
## S4 method for signature 'ANY,logical'
read.module(file, ignore.validity = F)
file |
either a filename or a file connection, that
allows reading binary data (see e.g., |
ignore.validity |
A |
The routine to read ProTracker modules is based on the referenced version of ProTracker 2.3A. This means that the routine may not be able to read files produced with later ProTracker versions, or earlier versions with back-compatibility issues. So far I've successfully tested this method on all modules I've composed with ProTracker version 2.3A (which I believe was one of the more popular versions of ProTracker back in the days).
It should also be able to read most of the .mod files in The Mod Archive.
Returns a PTModule
object read from the provided ProTracker file
Pepijn de Vries
https://wiki.multimedia.cx/index.php?title=Protracker_Module
Other io.operations:
read.sample()
,
write.module()
,
write.sample()
Other module.operations:
PTModule-class
,
appendPattern()
,
clearSamples()
,
clearSong()
,
deletePattern()
,
fix.PTModule()
,
modToWave()
,
moduleSize()
,
patternLength()
,
patternOrderLength()
,
patternOrder()
,
playMod()
,
playingtable()
,
rawToPTModule()
,
trackerFlag()
,
write.module()
## Not run:
## first create an module file from example data:
data("mod.intro")
write.module(mod.intro, "intro.mod")
## read the module:
mod <- read.module("intro.mod")
## or create a connection yourself:
con <- file("intro.mod", "rb")
## note that you can also read from URL connections!
mod2 <- read.module(con)
## don't forget to close the file:
close(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.