as.character {ProTrackR}R Documentation

Character representation of ProTrackR objects

Description

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

Usage

## S4 method for signature 'PTCell'
as.character(x)

## S4 method for signature 'PTTrack'
as.character(x)

## S4 method for signature 'PTPattern'
as.character(x)

Arguments

x

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

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.

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.

Author(s)

Pepijn de Vries

See Also

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

Other track.operations: PTTrack-method

Examples

data("mod.intro")

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

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

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


[Package ProTrackR version 0.4.3 Index]