pt2_note | R Documentation |
Gets note information from a cell in a pattern table in a ProTracker Module.
pt2_note(x, ...)
pt2_note(x, silent = TRUE, ...) <- value
x |
An object of class |
... |
Ignored |
silent |
Don't warn about replacement values not being used or recycled. |
value |
A |
A string representing the note's key is returned by the function.
The first letter indicates the position of the note in the
diatonic scale.
The second character indicates if it is a sharp key (with a hash
symbol, and a dash if it is not). The third character indicates
the octave of the note. In ProTracker allowed notes range from
"C-1"
to "B-3"
.
Returns a string representing the note's key.
mod <- pt2_read_mod(pt2_demo())
## select a specific cell from the first pattern
cell <- pt2_cell(mod$patterns[[1]], 0L, 0L)
## get the note played by this particular cell
pt2_note(cell)
## Replace the notes in the first pattern
## with those of the first bar of
## 'Frère Jacques'
pt2_note(mod$patterns[[1]][]) <-
c("C-2", "---", "---", "---",
"D-2", "---", "---", "---",
"E-2", "---", "---", "---",
"C-2", "---", "---", "---")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.