rawToPTModule | R Documentation |
This method treats a vector of raw
data as if it where a
file, and converts it into a PTModule
object.
## S4 method for signature 'raw'
rawToPTModule(x, ignore.validity = F)
x |
A vector of |
ignore.validity |
A |
Data is read from a vector of raw
data as if it where a file
and converted into a PTModule
object. This
method can be useful for module files stored on virtual Amiga Disk Files
(adf), which can be read as raw data, using the AmigaFFH
package.
Use as.raw
to achieve the inverse.
returns a PTModule
object.
Pepijn de Vries
Other module.operations:
PTModule-class
,
appendPattern()
,
clearSamples()
,
clearSong()
,
deletePattern()
,
fix.PTModule()
,
modToWave()
,
moduleSize()
,
patternLength()
,
patternOrderLength()
,
patternOrder()
,
playMod()
,
playingtable()
,
read.module()
,
trackerFlag()
,
write.module()
Other raw.operations:
as.raw()
,
nybbleToSignedInt()
,
nybble()
,
rawToCharNull()
,
rawToSignedInt()
,
rawToUnsignedInt()
,
signedIntToNybble()
,
signedIntToRaw()
,
unsignedIntToRaw()
## Not run:
## convert the example mod into raw data
data("mod.intro")
mod.raw <- as.raw(mod.intro)
## restore it as a PTModule-class object
mod.restored <- rawToPTModule(mod.raw)
## In this case the result is identical to the original:
identical(mod.restored, mod.intro)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.