Skip to contents

Method to obtain a tracker flag, which indicates the version compatibility of a ProTracker module (PTModule object).

Usage

# S4 method for PTModule
trackerFlag(x)

# S4 method for PTModule
trackerFlag(x) <- value

Arguments

x

A PTModule object for which the flag needs to returned or replaced.

value

A character string representing the tracker flag with which that of object x needs to be replaced with. Should either be "M.K." or "M!K!". Note that if a current flag "M!K!" is replaced by "M.K.", PTPatterns may get lost as the latter supports less patterns.

Value

For trackerFlag, the tracker flag of object x is returned.

For trackerFlag<-, a copy of object x with an updated tracker flag is returned.

Details

ProTrackR supports two tracker flags: "M.K." and "M!K!". M.K. are presumably the initials of programmers Mahony and Kaktus, unfortunately documentation on this matter is ambiguous. In any case, modules with the flag "M.K." can hold up to 64 patterns, whereas modules with the flag "M!K!" can hold up to 100 patterns. Use this method to obtain or replace the tracker flag of a PTModule.

Author

Pepijn de Vries

Examples

data("mod.intro")

## the current trackerFlag of mod.intro is "M.K.",
## meaning that it can hold a maximum of 64 patterns:
trackerFlag(mod.intro)
#> [1] "M.K."

patternOrder(mod.intro, full = TRUE) <- 0:63

## If we upgrade the trackerFlag of mod.intro to "M!K!"
## it can hold a maximum of 100 patterns!:
trackerFlag(mod.intro) <- "M!K!"

patternOrder(mod.intro, full = TRUE) <- 0:99

## Now let's do something dangerous:
## current flag is "M!K!", by setting it
## back to "M.K.", patterns 65:100 are lost...
trackerFlag(mod.intro) <- "M.K."
#> Warning: PTModule holds more patterns than M.K. flag allows. Higher patterns are removed!