Collects a specific pattern table from a tracker module and presents it as
a matrix of formatted character
strings in case of pattern()
. The other
functions return a single string for a specific cell inside the pattern table.
pattern(mod, pattern = 0L, width = 0L, pad = TRUE, ...)
format_pattern_row_channel(mod, pattern, row, channel, width, pad, ...)
format_pattern_row_channel_command(mod, pattern, row, channel, command, ...)
highlight_pattern_row_channel(mod, pattern, row, channel, width, pad, ...)
highlight_pattern_row_channel_command(mod, pattern, row, channel, command, ...)
A tracker module object of class openmpt
.
The pattern index (starting at 0
) of the pattern to get.
The maximum number of characters the string should contain. 0
means no limit.
If TRUE
, the string will be resized to the exact length provided in the width parameter.
Ignored
A row index (starting at 0
) for the row inside the pattern table.
a channel (i.e., column) index (starting at 0
) inside the pattern table.
One of "note"
, "instrument"
, "volumeffect"
, "effect"
, "volume"
, or
"parameter"
.
A matrix
of pattern cells formatted as character
strings in case of pattern()
.
Each column represents. All other methods return a single string for a specific cell.
an audio channel.
mod <- demo_mod()
pattern(mod)
#> [,1] [,2] [,3] [,4]
#> [1,] "C-5 01 .. C20" "G-6 09 .. C30" "A#4 0D .. C30" "... .. .. F05"
#> [2,] "... .. .. E01" "... .. .. C10" "C-5 .. .. 310" "A#4 0D .. C10"
#> [3,] "... .. .. C20" "... .. .. C20" "... .. .. 310" "C-5 .. .. 310"
#> [4,] "... .. .. C05" "... .. .. C10" "... .. .. ..." "... .. .. 310"
#> [5,] "... .. .. C20" "... .. .. C30" "G-5 0D .. C30" "... .. .. ..."
#> [6,] "... .. .. C05" "... .. .. C10" "... .. .. A0A" "G-5 0D .. C10"
#> [7,] "... .. .. C20" "... .. .. C20" "C-5 0D .. C10" "... .. .. A04"
#> [8,] "... .. .. C20" "... .. .. C10" "... .. .. ..." "C-5 0D .. C02"
#> [9,] "... .. .. C05" "... .. .. C30" "F-5 0D .. C30" "... .. .. ..."
#> [10,] "... .. .. C05" "... .. .. C10" "G-5 .. .. 309" "F-5 0D .. C10"
#> [11,] "... .. .. C18" "... .. .. C20" "F-5 0D .. C30" "G-5 .. .. 30A"
#> [12,] "... .. .. C05" "... .. .. C10" "... .. .. A0A" "F-5 0D .. C10"
#> [13,] "... .. .. C15" "... .. .. C30" "C-5 0D .. C30" "... .. .. A0A"
#> [14,] "... .. .. C05" "... .. .. C10" "... .. .. A0A" "C-5 0D .. C10"
#> [15,] "... .. .. C10" "G-6 09 .. C20" "A#5 0D .. C30" "... .. .. A0A"
#> [16,] "... .. .. C05" "... .. .. C10" "C-6 .. .. 305" "A#5 0D .. C10"
#> [17,] "... .. .. C10" "G-6 09 .. C30" "... .. .. 305" "C-6 .. .. 305"
#> [18,] "... .. .. C05" "... .. .. C10" "... .. .. 205" "... .. .. 305"
#> [19,] "... .. .. C10" "... .. .. C20" "G-5 0D .. C30" "... .. .. 205"
#> [20,] "... .. .. C05" "... .. .. C10" "... .. .. A0A" "G-5 0D .. C10"
#> [21,] "... .. .. C10" "... .. .. C30" "C-6 0D .. C10" "... .. .. A0A"
#> [22,] "... .. .. C05" "... .. .. C10" "... .. .. ..." "C-6 0D .. C02"
#> [23,] "... .. .. C10" "... .. .. C20" "F-5 0D .. C30" "... .. .. ..."
#> [24,] "... .. .. C05" "... .. .. C10" "G-5 .. .. 308" "F-5 0D .. C10"
#> [25,] "... .. .. C10" "... .. .. C30" "... .. .. 308" "G-5 .. .. 308"
#> [26,] "... .. .. C15" "... .. .. C10" "... .. .. ..." "... .. .. 308"
#> [27,] "A#4 01 .. C20" "... .. .. C20" "F-5 0D .. C30" "... .. .. ..."
#> [28,] "... .. .. C20" "... .. .. C10" "... .. .. A0A" "F-5 0D .. C10"
#> [29,] "... .. .. C20" "G-6 09 .. C30" "A#4 0D .. C30" "... .. .. A0A"
#> [30,] "... .. .. C05" "... .. .. C10" "C-5 .. .. 303" "A#4 0D .. C10"
#> [31,] "... .. .. C20" "... .. .. C20" "... .. .. 303" "C-5 .. .. 303"
#> [32,] "... .. .. C05" "... .. .. C10" "... .. .. 303" "... .. .. 303"
#> [33,] "C-5 01 .. C20" "G-6 09 .. C30" "... .. .. 303" "... .. .. 303"
#> [34,] "... .. .. C20" "... .. .. C10" "... .. .. 303" "... .. .. 303"
#> [35,] "... .. .. C20" "... .. .. C20" "... .. .. 303" "... .. .. 303"
#> [36,] "... .. .. C05" "... .. .. C10" "... .. .. 303" "... .. .. 303"
#> [37,] "... .. .. C20" "... .. .. C30" "... .. .. ..." "... .. .. 303"
#> [38,] "... .. .. C05" "... .. .. C10" "... .. .. 4C1" "... .. .. ..."
#> [39,] "... .. .. C20" "... .. .. C20" "... .. .. 400" "... .. .. 4C1"
#> [40,] "... .. .. C20" "... .. .. C10" "... .. .. 400" "... .. .. 400"
#> [41,] "... .. .. C05" "... .. .. C30" "... .. .. 400" "... .. .. 400"
#> [42,] "... .. .. C05" "... .. .. C10" "... .. .. 402" "... .. .. 400"
#> [43,] "... .. .. C18" "... .. .. C20" "... .. .. 400" "... .. .. 402"
#> [44,] "... .. .. C05" "... .. .. C10" "... .. .. 400" "... .. .. 400"
#> [45,] "... .. .. C15" "... .. .. C30" "... .. .. 400" "... .. .. 400"
#> [46,] "... .. .. C05" "... .. .. C10" "... .. .. 400" "... .. .. 400"
#> [47,] "... .. .. C10" "G-6 09 .. C20" "... .. .. 601" "... .. .. 400"
#> [48,] "... .. .. C05" "... .. .. C10" "... .. .. 400" "... .. .. 400"
#> [49,] "... .. .. C10" "G-6 09 .. C30" "... .. .. 601" "... .. .. 400"
#> [50,] "... .. .. C05" "... .. .. C10" "... .. .. 400" "... .. .. 400"
#> [51,] "... .. .. C10" "... .. .. C20" "... .. .. 601" "... .. .. 400"
#> [52,] "... .. .. C05" "... .. .. C10" "... .. .. 400" "... .. .. 601"
#> [53,] "... .. .. C10" "... .. .. C30" "... .. .. 601" "... .. .. 400"
#> [54,] "... .. .. C05" "... .. .. C10" "... .. .. 400" "... .. .. 601"
#> [55,] "... .. .. C10" "... .. .. C20" "... .. .. 601" "... .. .. 400"
#> [56,] "... .. .. C05" "... .. .. C10" "... .. .. 400" "... .. .. 601"
#> [57,] "... .. .. C10" "... .. .. C30" "... .. .. 601" "... .. .. 400"
#> [58,] "... .. .. C15" "... .. .. C10" "... .. .. 601" "... .. .. 601"
#> [59,] "D#5 01 .. C20" "... .. .. C20" "... .. .. 601" "... .. .. 601"
#> [60,] "... .. .. C20" "... .. .. C10" "... .. .. 601" "... .. .. 601"
#> [61,] "... .. .. C20" "G-6 09 .. C30" "... .. .. 601" "... .. .. 601"
#> [62,] "... .. .. C05" "... .. .. C10" "... .. .. 601" "... .. .. 601"
#> [63,] "... .. .. C20" "... .. .. C20" "... .. .. 601" "... .. .. 601"
#> [64,] "... .. .. C05" "... .. .. C10" "... .. .. 601" "... .. .. ..."
format_pattern_row_channel(mod, 0L, 1L, 2L, 0L, TRUE)
#> [1] "C-5 .. .. 310"
format_pattern_row_channel_command(mod, 0L, 1L, 2L, "parameter")
#> [1] "10"
highlight_pattern_row_channel(mod, 0L, 1L, 2L, 0L, TRUE)
#> [1] "nnn .. .. eff"
highlight_pattern_row_channel_command(mod, 0L, 1L, 2L, "note")
#> [1] "nnn"