Description Usage Arguments Value Examples
View source: R/random_modify.R
Takes sequence produced by drum_machine function and applies modification to this sequence.
1 2 3 |
seq_arg |
The sequence to be modified. This should be the output of the drum_machine function. |
modifier |
("double", "flam", "roll", "cc") The modification to apply. |
prob |
(default = 1) The probability a note in the sequence will receive the modification. |
position |
(default = "all") The position of items in the sequence to be modified. |
track_apply |
An integer or vector of integers indicating which tracks (hh, kick, snare) to apply the modification to. |
cc_parm |
If using cc modifier, this specifies the control change value. |
cc_map |
If using cc modifier, this specifies the mapping of control changes. |
A modified MIDI sequence to be entered into the create_midi function.
1 2 3 4 | # Applies double modification to first track (hh, or hi-hat) of drum sequence with .5 probability.
drum_machine(hh = 1:16, kick = seq(1, 16, by = 4), snare = c(5, 13)) %>%
random_modify(., modifier = "double", prob = .5, track_apply = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.