note_ngram {tabr} | R Documentation |
Note/chord n-gram
Description
Convert a noteworthy string to a list of noteworthy n-grams.
Usage
note_ngram(notes, n = 2, tally = FALSE, rests = FALSE)
Arguments
notes |
a noteworthy string. |
n |
Number of grams. Must be >= 1 and <= number of timesteps in
|
tally |
logical, tally n-grams in a data frame. Otherwise a list. |
rests |
logical, exclude rests. Affects the number of timesteps. |
Value
list of noteworthy objects or a tibble
Examples
x <- as_noteworthy("c r ceg dfa ceg dfa")
note_ngram(x)
(x <- note_ngram(x, tally = TRUE))
x$ngram <- as.character(x$ngram)
x
[Package tabr version 0.5.0 Index]