Learn R Programming

ProTrackR (version 0.4.4)

as.character: Character representation of ProTrackR objects

Description

Create a character representation of PTCell, PTTrack or PTPattern objects.

Usage

# S4 method for PTCell
as.character(x)

# S4 method for PTTrack as.character(x)

# S4 method for PTPattern as.character(x)

Value

Returns a single character string when x is of class PTCell.

Returns a vector of length 64 of the type character when x is of class PTTrack.

Returns a 64 by 4 matrix of the type character when x is of class PTPattern.

Arguments

x

An object of any of the following classes: PTCell, PTTrack or PTPattern.

Author

Pepijn de Vries

Details

A PTCell is an element of a PTTrack which in turn is an element of a PTPattern. A PTPattern tells a tracker which sample to play at which frequency on which of the four audio channels and with which effects. A PTCell in essence holds all this information as described at the documentation of the PTCell.

Data in these objects are stored in these objects in a raw form, to save working memory and to comply to the ProTracker file specifications. As the raw data is not easy to interpret, this method is provided to make your life (and the interpretation of the objects) easier.

This method generates a character representation of each of the three objects. These character representations can be coerced back to their original classes with the following methods: PTCell-method, PTTrack-method and PTPattern-method.

See Also

Other character.operations: name, periodToChar(), rawToCharNull(), sampleRate

Other track.operations: PTTrack-method

Examples

Run this code
data("mod.intro")

as.character(   PTCell(mod.intro, 1, 1, 1))

as.character(PTTrack(mod.intro, 1, 1))

as.character(PTPattern(mod.intro, 1))

Run the code above in your browser using DataLab