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

write.module

Export an PTModule object as a ProTracker module file


Description

Export an PTModule object as a ProTracker module file, conform ProTracker 2.3A specifications.

Usage

## S4 method for signature 'PTModule,ANY'
write.module(mod, file)

## S4 method for signature 'PTModule,character'
write.module(mod, file)

Arguments

mod

A valid PTModule object to be saved as a ProTracker *.mod file

file

either a filename to write to, or a file connection, that allows to write binary data (see file).

Details

The routine to write ProTracker modules is based on the referenced version of ProTracker 2.3A. This means that the routine may not be able to write files that ar compatible with later or earlier ProTracker versions.

Value

Writes to a module file but returns nothing.

Author(s)

Pepijn de Vries

References

See Also

Other io.operations: read.module(), read.sample(), write.sample()

Examples

## Not run: 
## get the PTModule object provided with the ProTrackR package
data("mod.intro")

## save the object as a valid ProTracker module file:
write.module(mod.intro, "intro.mod")

## or create the connection yourself:
con <- file("intro2.mod", "wb")
write.module(mod.intro, con)

## don't forget to close the connection after you're done:
close(con)

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