Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rawToPTModule

Convert a vector of raw data into a PTModule object


Description

This method treats a vector of raw data as if it where a file, and converts it into a PTModule-class object.

Usage

## S4 method for signature 'raw'
rawToPTModule(x, ignore.validity = F)

Arguments

x

A vector of raw data, conform ProTracker file specs.

ignore.validity

A logical value. When set as TRUE this method will attempt to decode the raw data (x), even when it is invalid. When set to FALSE (default) validity is checked and an error is thrown when invalidity occurs.

Details

Data is read from a vector of raw data as if it where a file and converted into a PTModule-class 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.

Value

returns a PTModule-class object.

Author(s)

Pepijn de Vries

See Also

Examples

## 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)

ProTrackR

Manipulate and Play 'ProTracker' Modules

v0.3.7
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2020-02-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.