Learn R Programming

ProTrackR (version 0.4.4)

patternOrderLength: Get the length of the pattern order table

Description

The pattern order table is a vector of numeric indices of PTPattern tables, which determines in which order the patterns need to be played. This method returns the visible length of this vector.

Usage

# S4 method for PTModule
patternOrderLength(x)

# S4 method for PTModule,numeric patternOrderLength(x) <- value

Value

For patternOrderLength the visible length of the pattern order table of PTModule

x is returned as a numeric

value, ranging from 1 up to 128.

For patternOrderLength<- an updated version of object x is returned, in which the visible length of the pattern order table is set to value. Note that this does not change the pattern order table itself, only which part is `visible'.

Arguments

x

A PTModule object for which the length of the visible part of the pattern order table is to be returned.

value

A numeric value which is to be used to set the visible length of the pattern order table.

Author

Pepijn de Vries

Details

The actual length of the vector containing the pattern order is 128 as per ProTracker standards. Only part of this vector is `visible' and will be used to determine in which order pattern tables are to be played. The length returned by this method is the length of this visible part of the pattern order table. The length of this visible part can also be set with this method.

See Also

Other pattern.operations: MODPlugToPTPattern(), PTPattern-class, PTPattern-method, PTPatternToMODPlug(), appendPattern(), deletePattern(), pasteBlock(), patternLength(), patternOrder()

Other module.operations: PTModule-class, appendPattern(), clearSamples(), clearSong(), deletePattern(), fix.PTModule(), modToWave(), moduleSize(), patternLength(), patternOrder(), playMod(), playingtable(), rawToPTModule(), read.module(), trackerFlag(), write.module()

Examples

Run this code
data("mod.intro")

## get the length of the pattern order table:
patternOrderLength(mod.intro)

## set the length of the pattern order table to 1:
patternOrderLength(mod.intro) <- 1

## note that the pattern order table remained intact:
patternOrder(mod.intro, full = TRUE)

Run the code above in your browser using DataLab