Arguments
- x
Either a
PTPattern
object or aPTBlock
object from which an Open MODPlug Tracker pattern should be created.- to.clipboard
A
logical
value, indicating whether the result should be copied to the system's clipboard (TRUE
) or should be returned as avector
ofcharacter
s (FALSE
). Note that copying to clipboard only works on Windows machines
Value
Returns an invisible NULL
when
argument to.clipboard
is set to TRUE
.
Returns an Open MODPlug Tracker flavoured pattern table as
a vector
of character
s when it is set to FALSE
.
Details
The Open MODPlug Tracker (https://openmpt.org) is a modern music tracker that is for free. It too can handle ProTracker modules. This function assists in moving pattern data from R to Open MPT.
See also
Other MODPlug.operations:
MODPlugToPTPattern()
Other pattern.operations:
MODPlugToPTPattern()
,
PTPattern-class
,
PTPattern-method
,
appendPattern()
,
deletePattern()
,
pasteBlock()
,
patternLength()
,
patternOrderLength()
,
patternOrder()
Examples
## get some pattern data
pattern <- PTPattern(mod.intro, 1)
## Now create a MODPlug pattern from this.
## The result is placed on the system clipboard.
## You can check by pasting it into a text
## editor, or better yet, the MODPlug Tracker.
if (.Platform$OS.type == "windows") {
PTPatternToMODPlug(pattern)
}
## If you want to handle the pattern data
## in R:
patModPlug <- PTPatternToMODPlug(pattern, FALSE)
## We can do the same with a block:
block <- PTBlock(pattern, 1:10, 2:3)
PTPatternToMODPlug(block, FALSE)
#> [1] "ModPlug Tracker MOD" "|C-602...C40|A#403...F06"
#> [3] "|C-602...C30|........A01" "|C-602......|........A01"
#> [5] "|C-602......|........A02" "|C-602......|........120"
#> [7] "|A#504...C08|........A02" "|C-602......|........220"
#> [9] "|A#504...C08|........A01" "|C-602......|........A01"
#> [11] "|A#604...C08|........A01"